summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xConfigure2906
-rw-r--r--INSTALL13
-rw-r--r--MANIFEST19
-rw-r--r--Makefile.SH29
-rw-r--r--Policy_sh.SH77
-rw-r--r--Porting/Glossary732
-rw-r--r--Porting/config.sh525
-rw-r--r--Porting/config_H (renamed from config_H)1032
-rw-r--r--Porting/pumpkin.pod25
-rw-r--r--atomic.h85
-rw-r--r--bytecode.h28
-rw-r--r--bytecode.pl40
-rw-r--r--byterun.c26
-rw-r--r--byterun.h20
-rw-r--r--config_h.SH1118
-rw-r--r--djgpp/djgpp.c174
-rw-r--r--doio.c6
-rw-r--r--dosish.h2
-rw-r--r--embed.h3
-rw-r--r--embedvar.h3
-rw-r--r--ext/B/B.xs16
-rw-r--r--ext/B/B/Asmdata.pm2
-rw-r--r--ext/B/Makefile.PL11
-rw-r--r--ext/DB_File/DB_File.xs8
-rw-r--r--ext/POSIX/POSIX.xs6
-rw-r--r--ext/SDBM_File/Makefile.PL34
-rw-r--r--ext/SDBM_File/sdbm/Makefile.PL4
-rw-r--r--ext/SDBM_File/sdbm/sdbm.h20
-rw-r--r--global.sym68
-rw-r--r--hints/aix.sh3
-rw-r--r--hints/amigaos.sh4
-rw-r--r--hints/bsdos.sh3
-rw-r--r--hints/dec_osf.sh4
-rw-r--r--hints/dos_djgpp.sh11
-rw-r--r--hints/freebsd.sh5
-rw-r--r--hints/hpux.sh10
-rw-r--r--hints/irix_6.sh5
-rw-r--r--hints/linux.sh3
-rw-r--r--hints/netbsd.sh4
-rw-r--r--hints/next_3.sh2
-rw-r--r--hints/next_4.sh2
-rw-r--r--hints/os2.sh4
-rw-r--r--hints/solaris_2.sh3
-rw-r--r--lib/AutoLoader.pm2
-rw-r--r--lib/Cwd.pm71
-rw-r--r--lib/ExtUtils/MM_VMS.pm14
-rw-r--r--lib/Term/ReadLine.pm43
-rw-r--r--lib/Test.pm131
-rw-r--r--lib/Tie/Handle.pm161
-rw-r--r--lib/perl5db.pl27
-rwxr-xr-xmakedepend.SH2
-rw-r--r--miniperlmain.c7
-rw-r--r--op.c35
-rw-r--r--os2/diff.configure248
-rw-r--r--os2/os2.c4
-rw-r--r--patchlevel.h2
-rw-r--r--perl.c49
-rw-r--r--perl.h10
-rw-r--r--perlvars.h1
-rw-r--r--pod/perldiag.pod5
-rw-r--r--pod/perltie.pod24
-rw-r--r--pod/perlvar.pod7
-rw-r--r--pp.c10
-rw-r--r--pp.h6
-rw-r--r--pp_ctl.c14
-rw-r--r--pp_sys.c33
-rw-r--r--regcomp.c31
-rw-r--r--sv.c11
-rw-r--r--sv.h37
-rwxr-xr-xt/lib/anydbm.t16
-rwxr-xr-xt/lib/sdbm.t23
-rw-r--r--t/lib/thread.t2
-rw-r--r--t/op/nothread.t2
-rwxr-xr-xt/op/tiehandle.t137
-rw-r--r--thread.h2
-rw-r--r--toke.c10
-rw-r--r--util.c19
-rw-r--r--vms/descrip.mms30
-rw-r--r--vms/perlvms.pod24
-rw-r--r--vms/test.com5
-rw-r--r--win32/Makefile85
-rw-r--r--win32/bin/search.pl5
-rw-r--r--win32/config.bc7
-rw-r--r--win32/config.gc7
-rw-r--r--win32/config.vc7
-rw-r--r--win32/config_H.bc1130
-rw-r--r--win32/config_H.gc1132
-rw-r--r--win32/config_H.vc1123
-rw-r--r--win32/config_h.PL2
-rw-r--r--win32/makedef.pl2
-rw-r--r--win32/makefile.mk93
-rw-r--r--win32/win32.c12
-rw-r--r--win32/win32.h1
-rwxr-xr-xx2p/Makefile.SH11
94 files changed, 6581 insertions, 5386 deletions
diff --git a/Configure b/Configure
index 62249dd580..a34a5db6f4 100755
--- a/Configure
+++ b/Configure
@@ -14,13 +14,13 @@
# (Note: this Configure script was generated automatically. Rather than
# working with this copy of Configure, you may wish to get metaconfig.
# The dist-3.0 package (which contains metaconfig) was posted in
-# comp.sources.misc so you may fetch it yourself from your nearest
-# archive site. Check with Archie if you don't know where that can be.)
+# comp.sources.misc and is available on CPAN under authors/id/RAM so
+# you may fetch it yourself from your nearest archive site.)
#
-# $Id: Head.U,v 3.0.1.8 1995/07/25 13:40:02 ram Exp $
+# $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $
#
-# Generated on Sat Feb 1 00:26:40 EST 1997 [metaconfig 3.0 PL60]
+# Generated on Wed Feb 25 16:44:06 EST 1998 [metaconfig 3.0 PL70]
cat >/tmp/c1$$ <<EOF
ARGGGHHHH!!!!!
@@ -55,16 +55,17 @@ case "$0" in
;;
esac
-: Proper PATH separator
+: Proper separator for the PATH environment variable
p_=:
: On OS/2 this directory should exist if this is not floppy only system :-]
-if test -d c:/. -a -n "$OS2_SHELL"; then
- p_=\;
- PATH=`cmd /c "echo %PATH%" | tr '\\\\' / `
- OS2_SHELL=`cmd /c "echo %OS2_SHELL%" | tr '\\\\' / | tr '[A-Z]' '[a-z]'`
-fi
-if test -d c:/. -a -n "$DJDIR"; then
- p_=\;
+if test -d c:/. ; then
+ if test -n "$OS2_SHELL"; then
+ p_=\;
+ PATH=`cmd /c "echo %PATH%" | tr '\\\\' / `
+ OS2_SHELL=`cmd /c "echo %OS2_SHELL%" | tr '\\\\' / | tr '[A-Z]' '[a-z]'`
+ elif test -n "$DJDIR"; then
+ p_=\;
+ fi
fi
: Proper PATH setting
@@ -88,56 +89,58 @@ done
PATH=.$p_$PATH
export PATH
-: This should not matter in scripts, but apparently it does, sometimes
-case "$CDPATH" in
-'') ;;
-*) CDPATH='' ;;
-esac
-
-: Sanity checks
-if test ! -t 0; then
- echo "Say 'sh $me', not 'sh <$me'"
- exit 1
-fi
-
-: Test and see if we are running under ksh, either blatantly or in disguise.
+: shall we be using ksh?
+inksh=''
+needksh=''
+avoidksh=''
+newsh=/bin/ksh
+changesh=''
if (PATH=.; alias -x) >/dev/null 2>&1; then
- : running under ksh. Is this a good thing?
- if test -d /usr/lpp -a -f /usr/bin/bsh -a -f /usr/bin/uname ; then
- if test X`/usr/bin/uname -v` = X4 ; then
- : on AIX 4, /bin/sh is really ksh, and it causes us problems.
- : Avoid it
- cat <<'EOM'
-(Feeding myself to /usr/bin/bsh to avoid AIX 4's /bin/sh.)
-EOM
- unset ENV
- exec /usr/bin/bsh $0 "$@"
+ inksh=true
+fi
+if test -f /hp-ux -a -f /bin/ksh; then
+ needksh='to avoid sh bug in "here document" expansion'
+fi
+if test -d /usr/lpp -a -f /usr/bin/bsh -a -f /usr/bin/uname; then
+ if test X`/usr/bin/uname -v` = X4; then
+ avoidksh="to avoid AIX 4's /bin/sh"
+ newsh=/usr/bin/bsh
fi
- else
- if test ! -f /hp-ux ; then
- : Warn them if they use ksh on other systems
+fi
+case "$inksh/$needksh" in
+/[a-z]*)
+ unset ENV
+ changesh=true
+ reason="$needksh"
+ ;;
+esac
+case "$inksh/$avoidksh" in
+true/[a-z]*)
+ changesh=true
+ reason="$avoidksh"
+ ;;
+esac
+case "$inksh/$needksh-$avoidksh-" in
+true/--)
cat <<EOM
(I see you are using the Korn shell. Some ksh's blow up on $me,
-especially on older exotic systems. If yours does, try the Bourne
-shell instead.)
+mainly on older exotic systems. If yours does, try the Bourne shell instead.)
EOM
- unset ENV
- fi
- fi
-else
- : Not running under ksh. Maybe we should be?
- : On HP-UX, large Configure scripts may exercise a bug in /bin/sh
- if test -f /hp-ux -a -f /bin/ksh; then
- cat <<'EOM'
-(Feeding myself to ksh to avoid nasty sh bug in "here document" expansion.)
-EOM
- unset ENV
- exec /bin/ksh $0 "$@"
- fi
-fi
+ ;;
+esac
+case "$changesh" in
+true)
+ echo "(Feeding myself to $newsh $reason.)"
+ case "$0" in
+ Configure|*/Configure) exec $newsh $0 "$@";;
+ *) exec $newsh Configure "$@";;
+ esac
+ ;;
+esac
: Configure runs within the UU subdirectory
test -d UU || mkdir UU
+unset CDPATH
cd UU && rm -f ./*
dynamic_ext=''
@@ -151,6 +154,7 @@ d_eunice=''
d_xenix=''
eunicefix=''
Mcc=''
+ar=''
awk=''
bash=''
bison=''
@@ -186,6 +190,7 @@ lpr=''
ls=''
mail=''
mailx=''
+make=''
mkdir=''
more=''
mv=''
@@ -212,7 +217,6 @@ tr=''
troff=''
uname=''
uniq=''
-usethreads=''
uuname=''
vi=''
zcat=''
@@ -233,7 +237,9 @@ RCSfile=''
Revision=''
Source=''
State=''
-ar=''
+_a=''
+_exe=''
+_o=''
archobjs=''
exe_ext=''
firstmakefile=''
@@ -315,25 +321,15 @@ d_ftime=''
d_gettimeod=''
d_Gconvert=''
d_getgrps=''
-d_setgrps=''
-d_gethent=''
d_gethbyaddr=''
-netdb_host_type=''
-netdb_hlen_type=''
d_gethbyname=''
-netdb_name_type=''
-d_getnbyaddr=''
-d_getnbyname=''
-netdb_net_type=''
+d_gethent=''
aphostname=''
d_gethname=''
-d_getpbyname=''
-d_getpbynumber=''
-d_getsbyname=''
-d_getsbyport=''
d_phostname=''
d_uname=''
d_getlogin=''
+d_getnbyaddr=''
d_getpgid=''
d_getpgrp2=''
d_bsdgetpgrp=''
@@ -372,6 +368,9 @@ d_pause=''
d_pipe=''
d_poll=''
d_portable=''
+d_pthread_yield=''
+d_sched_yield=''
+d_pthreads_created_joinable=''
d_readdir=''
d_rewinddir=''
d_seekdir=''
@@ -389,11 +388,11 @@ d_semget=''
d_semop=''
d_setegid=''
d_seteuid=''
+d_setgrps=''
d_setlinebuf=''
d_setlocale=''
d_setpgid=''
d_setpgrp2=''
-d_bsdpgrp=''
d_bsdsetpgrp=''
d_setpgrp=''
d_setprior=''
@@ -428,6 +427,7 @@ d_stdstdio=''
stdio_base=''
stdio_bufsiz=''
stdio_cnt=''
+stdio_filbuf=''
stdio_ptr=''
d_index=''
d_strchr=''
@@ -475,8 +475,6 @@ usedl=''
fpostype=''
gidtype=''
groupstype=''
-d_sched_yield=''
-d_pthread_yield=''
h_fcntl=''
h_sysfile=''
db_hashtype=''
@@ -503,7 +501,6 @@ i_netdb=''
i_neterrno=''
i_niin=''
i_sysin=''
-d_pthreads_created_joinable=''
d_pwage=''
d_pwchange=''
d_pwclass=''
@@ -561,7 +558,6 @@ xlibpth=''
libs=''
lns=''
lseektype=''
-make=''
make_set_make=''
d_mymalloc=''
freetype=''
@@ -593,12 +589,13 @@ d_eofnblk=''
eagain=''
o_nonblock=''
rd_nodata=''
+netdb_hlen_type=''
+netdb_host_type=''
+netdb_name_type=''
+netdb_net_type=''
groupcat=''
hostcat=''
passcat=''
-d_oldarchlib=''
-oldarchlib=''
-oldarchlibexp=''
orderlib=''
ranlib=''
package=''
@@ -608,6 +605,7 @@ patchlevel=''
subversion=''
perladmin=''
perlpath=''
+pidtype=''
prefix=''
prefixexp=''
installprivlib=''
@@ -621,6 +619,7 @@ scriptdirexp=''
selecttype=''
sh=''
sig_name=''
+sig_name_init=''
sig_num=''
installsitearch=''
sitearch=''
@@ -633,6 +632,7 @@ so=''
sharpbang=''
shsharp=''
spitshell=''
+src=''
ssizetype=''
startperl=''
startsh=''
@@ -644,6 +644,7 @@ nm_so_opt=''
runnm=''
usenm=''
useperlio=''
+usethreads=''
incpath=''
mips=''
mips_type=''
@@ -731,26 +732,7 @@ al="$al tower32_800 tower32_850 tss u370 u3b u3b2 u3b20 u3b200"
al="$al u3b20d u3b5 ultrix unix unixpc unos vax venix vms"
al="$al xenix z8000"
-groupstype=''
i_whoami=''
-: default library list
-libswanted=''
-: set useposix=false in your hint file to disable the POSIX extension.
-useposix=true
-: set useopcode=false in your hint file to disable the Opcode extension.
-useopcode=true
-: Define several unixisms. These can be used in hint files.
-exe_ext=''
-: Extra object files, if any, needed on this platform.
-archobjs=''
-: Possible local include directories to search.
-: Set locincpth to "" in a hint file to defeat local include searches.
-locincpth="/usr/local/include /opt/local/include /usr/gnu/include"
-locincpth="$locincpth /opt/gnu/include /usr/GNU/include /opt/GNU/include"
-:
-: no include file wanted by default
-inclwanted=''
-
: change the next line if compiling for Xenix/286 on Xenix/386
xlibpth='/usr/lib/386 /lib/386'
@@ -759,7 +741,7 @@ loclibpth="/usr/local/lib /opt/local/lib /usr/gnu/lib"
loclibpth="$loclibpth /opt/gnu/lib /usr/GNU/lib /opt/GNU/lib"
: general looking path for locating libraries
-glibpth="/shlib /usr/shlib /usr/lib/pa1.1 /usr/lib/large"
+glibpth="/shlib /usr/shlib /lib/pa1.1 /usr/lib/large"
glibpth="$glibpth /lib /usr/lib $xlibpth"
glibpth="$glibpth /lib/large /usr/lib/small /lib/small"
glibpth="$glibpth /usr/ccs/lib /usr/ucblib /usr/local/lib"
@@ -769,9 +751,29 @@ glibpth="$glibpth /usr/ccs/lib /usr/ucblib /usr/local/lib"
: machines, like the mips. Usually, it should be empty.
plibpth=''
+: default library list
+libswanted=''
: full support for void wanted by default
defvoidused=15
+: Possible local include directories to search.
+: Set locincpth to "" in a hint file to defeat local include searches.
+locincpth="/usr/local/include /opt/local/include /usr/gnu/include"
+locincpth="$locincpth /opt/gnu/include /usr/GNU/include /opt/GNU/include"
+:
+: no include file wanted by default
+inclwanted=''
+
+: Trailing extension. Override this in a hint file, if needed.
+_exe=''
+: Extra object files, if any, needed on this platform.
+archobjs=''
+groupstype=''
+: set useposix=false in your hint file to disable the POSIX extension.
+useposix=true
+: set useopcode=false in your hint file to disable the Opcode extension.
+useopcode=true
+: set usethreads on the Configure command line to enable threads.
: List of libraries we want.
libswanted='sfio net socket inet nsl nm ndbm gdbm dbm db malloc dl'
libswanted="$libswanted dld ld sun m c cposix posix ndir dir crypt"
@@ -786,8 +788,6 @@ usevfork=false
: Find the basic shell for Bourne shell scripts
case "$sh" in
'')
- : SYSTYPE is for some older MIPS systems.
- : I do not know if it is still needed.
case "$SYSTYPE" in
*bsd*|sys5*) xxx="/$SYSTYPE/bin/sh";;
*) xxx='/bin/sh';;
@@ -805,11 +805,9 @@ case "$sh" in
for xxx in $try; do
if test -f "$xxx"; then
sh="$xxx";
- echo "Your Bourne shell appears to be in $sh."
break
elif test -f "$xxx.exe"; then
sh="$xxx";
- echo "Hmm. Your Bourne shell appears to be in $sh."
break
fi
done
@@ -820,9 +818,10 @@ esac
case "$sh" in
'') cat <<EOM >&2
$me: Fatal Error: I can't find a Bourne Shell anywhere.
+
Usually it's in /bin/sh. How did you even get this far?
-Please contact me (Chip Salzenberg) at chip@perl.com and
-we'll try to straigten this all out.
+Please contact me (Andy Dougherty) at doughera@lafcol.lafayette.edu and
+we'll try to straighten this all out.
EOM
exit 1
;;
@@ -832,7 +831,6 @@ esac
if `$sh -c '#' >/dev/null 2>&1`; then
shsharp=true
spitshell=cat
- echo " "
xcat=/bin/cat
test -f $xcat || xcat=/usr/bin/cat
echo "#!$xcat" >try
@@ -849,12 +847,11 @@ if `$sh -c '#' >/dev/null 2>&1`; then
if test -s today; then
sharpbang='#! '
else
- echo "Okay, let's see if #! works on this system..."
- echo "It's just a comment."
sharpbang=': use '
fi
fi
else
+ echo " "
echo "Your $sh doesn't grok # comments--I will strip them later on."
shsharp=false
cd ..
@@ -884,60 +881,11 @@ $eunicefix try
if ./try; then
: echo "Yup, it does."
else
- echo "Hmm. '$startsh' didn't work."
- echo "You may have to fix up the shell scripts to make sure sh runs them."
+ echo "Hmm... '$startsh' does not guarantee sh startup..."
+ echo "You may have to fix up the shell scripts to make sure $sh runs them."
fi
rm -f try
-: script used to extract .SH files with variable substitutions
-cat >extract <<EOS
-$startsh
-EOS
-cat >>extract <<'EOS'
-CONFIG=true
-echo "Doing variable substitutions on .SH files..."
-if test -f MANIFEST; then
- shlist=`awk '{print $1}' <MANIFEST | grep '\.SH'`
- : Pick up possible extension manifests.
- for dir in ext/* ; do
- if test -f $dir/MANIFEST; then
- xxx=`awk '{print $1}' < $dir/MANIFEST |
- sed -n "/\.SH$/ s@^@$dir/@p"`
- shlist="$shlist $xxx"
- fi
- done
- set x $shlist
-else
- echo "(Looking for .SH files under the current directory.)"
- set x `find . -name "*.SH" -print`
-fi
-shift
-case $# in
-0) set x *.SH; shift;;
-esac
-if test ! -f $1; then
- shift
-fi
-for file in $*; do
- case "$file" in
- */*)
- dir=`expr X$file : 'X\(.*\)/'`
- file=`expr X$file : 'X.*/\(.*\)'`
- (cd $dir && . ./$file)
- ;;
- *)
- . ./$file
- ;;
- esac
-done
-if test -f config_h.SH; then
- if test ! -f config.h; then
- : oops, they left it out of MANIFEST, probably, so do it anyway.
- . ./config_h.SH
- fi
-fi
-EOS
-
: produce awk script to parse command line options
cat >options.awk <<'EOF'
BEGIN {
@@ -1001,12 +949,12 @@ silent=''
extractsh=''
override=''
knowitall=''
-
rm -f optdef.sh
cat >optdef.sh <<EOS
$startsh
EOS
+
: option parsing
while test $# -gt 0; do
case "$1" in
@@ -1025,11 +973,11 @@ while test $# -gt 0; do
shift;;
-h) shift; error=true;;
-r) shift; reuseval=true;;
- -s) shift; silent=true;;
+ -s) shift; silent=true; realsilent=true;;
-E) shift; alldone=exit;;
-K) shift; knowitall=true;;
-O) shift; override=true;;
- -S) shift; extractsh=true;;
+ -S) shift; silent=true; extractsh=true;;
-D)
shift
case "$1" in
@@ -1055,7 +1003,7 @@ while test $# -gt 0; do
esac
shift
;;
- -V) echo "$me generated by metaconfig 3.0 PL60." >&2
+ -V) echo "$me generated by metaconfig 3.0 PL70." >&2
exit 0;;
--) break;;
-*) echo "$me: unknown option $1" >&2; shift; error=true;;
@@ -1090,6 +1038,17 @@ EOM
;;
esac
+: Sanity checks
+case "$fastread$alldone" in
+yescont|yesexit) ;;
+*)
+ if test ! -t 0; then
+ echo "Say 'sh Configure', not 'sh <Configure'"
+ exit 1
+ fi
+ ;;
+esac
+
exec 4>&1
case "$silent" in
true) exec 1>/dev/null;;
@@ -1099,26 +1058,6 @@ esac
touch optdef.sh
. ./optdef.sh
-case "$extractsh" in
-true)
- case "$config_sh" in
- '') config_sh='config.sh'; config='./config.sh';;
- /*) config="$config_sh";;
- *) config="./$config_sh";;
- esac
- echo " "
- echo "Fetching answers from $config_sh..."
- cd ..
- . $config
- test "$override" && . ./optdef.sh
- echo " "
- . ./UU/extract
- rm -rf UU
- echo "Done."
- exit 0
- ;;
-esac
-
: set package name
package=perl5
first=`echo $package | sed -e 's/^\(.\).*/\1/'`
@@ -1128,13 +1067,6 @@ ABYZ) spackage=`echo $first | tr '[:lower:]' '[:upper:]'`$last;;
*) spackage=`echo $first | tr '[a-z]' '[A-Z]'`$last;;
esac
-: Eunice requires " " instead of "", can you believe it
-echo " "
-: Here we go...
-echo "Beginning of configuration questions for $package."
-
-trap 'echo " "; test -d ../UU && rm -rf X $rmlist; exit 1' 1 2 3 15
-
: Some greps do not return status, grrr.
echo "grimblepritz" >grimble
if grep blurfldyick grimble >/dev/null 2>&1 ; then
@@ -1156,6 +1088,152 @@ EOSS
chmod +x contains
esac
+: Find the path to the source tree
+case "$src" in
+'') case "$0" in
+ */*) src=`echo $0 | sed -e 's%/[^/][^/]*$%%'`;;
+ *) src='.';;
+ esac;;
+esac
+case "$src" in
+'') src=/
+ rsrc=/
+ ;;
+/*) rsrc="$src";;
+*) rsrc="../$src";;
+esac
+if test -f $rsrc/Configure && \
+ $contains "^package=$package$" $rsrc/Configure >/dev/null 2>&1
+then
+ : found it, so we are ok.
+else
+ rsrc=''
+ for src in . .. ../.. ../../.. ../../../..; do
+ if test -f ../$src/Configure && \
+ $contains "^package=$package$" ../$src/Configure >/dev/null 2>&1
+ then
+ rsrc=../$src
+ break
+ fi
+ done
+fi
+case "$rsrc" in
+'')
+ cat <<EOM >&4
+
+Sorry, I can't seem to locate the source dir for $package. Please start
+Configure with an explicit path -- i.e. /some/path/Configure.
+
+EOM
+ exit 1
+ ;;
+../.) rsrc='..';;
+*)
+ echo " "
+ echo "Sources for $package found in \"$src\"." >&4
+ ;;
+esac
+
+: script used to extract .SH files with variable substitutions
+cat >extract <<'EOS'
+CONFIG=true
+echo "Doing variable substitutions on .SH files..."
+if test -f $src/MANIFEST; then
+ set x `awk '{print $1}' <$src/MANIFEST | grep '\.SH'`
+else
+ echo "(Looking for .SH files under the source directory.)"
+ set x `(cd $src; find . -name "*.SH" -print)`
+fi
+shift
+case $# in
+0) set x `(cd $src; echo *.SH)`; shift;;
+esac
+if test ! -f $src/$1; then
+ shift
+fi
+mkdir_p='
+name=$1;
+create="";
+while test $name; do
+ if test ! -d "$name"; then
+ create="$name $create";
+ name=`echo $name | sed -e "s|^[^/]*$||"`;
+ name=`echo $name | sed -e "s|\(.*\)/.*|\1|"`;
+ else
+ name="";
+ fi;
+done;
+for file in $create; do
+ mkdir $file;
+done
+'
+for file in $*; do
+ case "$src" in
+ ".")
+ case "$file" in
+ */*)
+ dir=`expr X$file : 'X\(.*\)/'`
+ file=`expr X$file : 'X.*/\(.*\)'`
+ (cd $dir && . ./$file)
+ ;;
+ *)
+ . ./$file
+ ;;
+ esac
+ ;;
+ *)
+ case "$file" in
+ */*)
+ dir=`expr X$file : 'X\(.*\)/'`
+ file=`expr X$file : 'X.*/\(.*\)'`
+ (set x $dir; shift; eval $mkdir_p)
+ sh <$src/$dir/$file
+ ;;
+ *)
+ sh <$src/$file
+ ;;
+ esac
+ ;;
+ esac
+done
+if test -f $src/config_h.SH; then
+ if test ! -f config.h; then
+ : oops, they left it out of MANIFEST, probably, so do it anyway.
+ . $src/config_h.SH
+ fi
+fi
+EOS
+
+: extract files and exit if asked to do so
+case "$extractsh" in
+true)
+ case "$realsilent" in
+ true) ;;
+ *) exec 1>&4;;
+ esac
+ case "$config_sh" in
+ '') config_sh='config.sh';;
+ esac
+ echo " "
+ echo "Fetching answers from $config_sh..."
+ cd ..
+ . $config_sh
+ test "$override" && . ./optdef.sh
+ echo " "
+ . UU/extract
+ rm -rf UU
+ echo "Done."
+ exit 0
+ ;;
+esac
+
+: Eunice requires " " instead of "", can you believe it
+echo " "
+: Here we go...
+echo "Beginning of configuration questions for $package."
+
+trap 'echo " "; test -d ../UU && rm -rf X $rmlist; exit 1' 1 2 3 15
+
: first determine how to suppress newline on echo command
echo " "
echo "Checking echo to see how to suppress newlines..."
@@ -1177,12 +1255,13 @@ rm -f .echotmp
: Now test for existence of everything in MANIFEST
echo " "
-if test -f ../MANIFEST; then
+if test -f $rsrc/MANIFEST; then
echo "First let's make sure your kit is complete. Checking..." >&4
- awk '$1 !~ /PACK[A-Z]+/ {print $1}' ../MANIFEST | split -50
+ awk '$1 !~ /PACK[A-Z]+/ {print $1}' $rsrc/MANIFEST | split -50
rm -f missing
+ tmppwd=`pwd`
for filelist in x??; do
- (cd ..; ls `cat UU/$filelist` >/dev/null 2>>UU/missing)
+ (cd $rsrc; ls `cat $tmppwd/$filelist` >/dev/null 2>>$tmppwd/missing)
done
if test -s missing; then
cat missing >&4
@@ -1193,7 +1272,7 @@ THIS PACKAGE SEEMS TO BE INCOMPLETE.
You have the option of continuing the configuration process, despite the
distinct possibility that your kit is damaged, by typing 'y'es. If you
do, don't blame me if something goes wrong. I advise you to type 'n'o
-and contact the author (chip@perl.com).
+and contact the author (doughera@lafcol.lafayette.edu).
EOM
echo $n "Continue? [n] $c" >&4
@@ -1209,7 +1288,7 @@ EOM
;;
esac
else
- echo "Looks good..." >&4
+ echo "Looks good..."
fi
else
echo "There is no MANIFEST file. I hope your kit is complete !"
@@ -1262,8 +1341,20 @@ while expr "X\$ans" : "X!" >/dev/null; do
read answ
set x \$xxxm
shift
- aok=''; eval ans="\\"\$answ\\"" && aok=y
+ aok=''; eval "ans=\\"\$answ\\"" && aok=y
case "\$answ" in
+ "!")
+ sh 1>&4
+ echo " "
+ $myecho
+ ;;
+ !*)
+ set x \`expr "X\$ans" : "X!\(.*\)\$"\`
+ shift
+ sh 1>&4 -c "\$*"
+ echo " "
+ $myecho
+ ;;
"\$ans")
case "\$ans" in
\\&*)
@@ -1281,18 +1372,6 @@ while expr "X\$ans" : "X!" >/dev/null; do
$myecho
ans=!
;;
- "!")
- sh 1>&4
- echo " "
- $myecho
- ;;
- !*)
- set x \`expr "X\$ans" : "X!\(.*\)\$"\`
- shift
- sh 1>&4 -c "\$*"
- echo " "
- $myecho
- ;;
esac;;
*)
case "\$aok" in
@@ -1327,7 +1406,7 @@ EOSC
test -d ../.config || mkdir ../.config
cat >../.config/README <<EOF
This directory created by Configure to save information that should
-persist across sessions.
+persist across sessions for $package.
You may safely delete it if you wish.
EOF
@@ -1336,8 +1415,8 @@ EOF
needman=true
firsttime=true
user=`(logname) 2>/dev/null`
-case "$user" in "")
- user=`whoami 2>&1` ;;
+case "$user" in
+'') user=`whoami 2>&1`;;
esac
if $contains "^$user\$" ../.config/instruct >/dev/null 2>&1; then
firsttime=false
@@ -1352,7 +1431,7 @@ if $contains "^$user\$" ../.config/instruct >/dev/null 2>&1; then
fi
if $needman; then
cat <<EOH
-
+
This installation shell script will examine your system and ask you questions
to determine how the perl5 package should be installed. If you get
stuck on a question, you may use a ! shell escape to start a subshell or
@@ -1384,7 +1463,7 @@ If you are in a hurry, you may run 'Configure -d'. This will bypass nearly all
the questions and use the computed defaults (or the previous answers if there
was already a config.sh file). Type 'Configure -h' for a list of options.
You may also start interactively and then answer '& -d' at any prompt to turn
-on the non-interactive behavior for the remainder of the execution.
+on the non-interactive behaviour for the remainder of the execution.
EOH
. ./myread
@@ -1394,7 +1473,7 @@ Much effort has been expended to ensure that this shell script will run on any
Unix system. If despite that it blows up on yours, your best bet is to edit
Configure and run it again. If you can't run Configure for some reason,
you'll have to generate a config.sh file by hand. Whatever problems you
-have, let me (chip@perl.com) know how I blew it.
+have, let me (doughera@lafcol.lafayette.edu) know how I blew it.
This installation script affects things in two ways:
@@ -1465,6 +1544,7 @@ expr
find
grep
ls
+make
mkdir
rm
sed
@@ -1475,6 +1555,7 @@ uniq
"
trylist="
Mcc
+ar
byacc
cpp
csh
@@ -1496,7 +1577,19 @@ zip
pth=`echo $PATH | sed -e "s/$p_/ /g"`
pth="$pth /lib /usr/lib"
for file in $loclist; do
- xxx=`./loc $file $file $pth`
+ eval xxx=\$$file
+ case "$xxx" in
+ /*|?:[\\/]*)
+ if test -f "$xxx"; then
+ : ok
+ else
+ echo "WARNING: no $xxx -- ignoring your setting for $file." >&4
+ xxx=`./loc $file $file $pth`
+ fi
+ ;;
+ '') xxx=`./loc $file $file $pth`;;
+ *) xxx=`./loc $xxx $xxx $pth`;;
+ esac
eval $file=$xxx
eval _$file=$xxx
case "$xxx" in
@@ -1517,7 +1610,19 @@ echo " "
echo "Don't worry if any of the following aren't found..."
say=offhand
for file in $trylist; do
- xxx=`./loc $file $file $pth`
+ eval xxx=\$$file
+ case "$xxx" in
+ /*|?:[\\/]*)
+ if test -f "$xxx"; then
+ : ok
+ else
+ echo "WARNING: no $xxx -- ignoring your setting for $file." >&4
+ xxx=`./loc $file $file $pth`
+ fi
+ ;;
+ '') xxx=`./loc $file $file $pth`;;
+ *) xxx=`./loc $xxx $xxx $pth`;;
+ esac
eval $file=$xxx
eval _$file=$xxx
case "$xxx" in
@@ -1678,13 +1783,14 @@ fi
if test ! -f config.sh; then
$cat <<EOM
-First time through, eh? I have some defaults handy for the following systems:
+First time through, eh? I have some defaults handy for some systems
+that need some extra help getting the Configure answers right:
EOM
- cd hints; ls -C *.sh | $sed 's/\.sh/ /g' >&4
+ (cd $src/hints; ls -C *.sh) | $sed 's/\.sh/ /g' >&4
dflt=''
: Half the following guesses are probably wrong... If you have better
- : tests or hints, please send them to chip@perl.com
+ : tests or hints, please send them to doughera@lafcol.lafayette.edu
: The metaconfig authors would also appreciate a copy...
$test -f /irix && osname=irix
$test -f /xenix && osname=sco_xenix
@@ -1700,12 +1806,12 @@ EOM
$test -f /etc/saf/_sactab && osname=svr4
$test -d /usr/include/minix && osname=minix
if $test -d /MachTen; then
- osname=machten
+ osname=machten
if $test -x /sbin/version; then
- osvers=`/sbin/version | $awk '{print $2}' |
+ osvers=`/sbin/version | $awk '{print $2}' |
$sed -e 's/[A-Za-z]$//'`
elif $test -x /usr/etc/version; then
- osvers=`/usr/etc/version | $awk '{print $2}' |
+ osvers=`/usr/etc/version | $awk '{print $2}' |
$sed -e 's/[A-Za-z]$//'`
else
osvers="$2.$3"
@@ -1900,12 +2006,12 @@ EOM
;;
esac
else
- if test -f /vmunix -a -f newsos4.sh; then
- (what /vmunix | ../UU/tr '[A-Z]' '[a-z]') > ../UU/kernel.what 2>&1
- if $contains news-os ../UU/kernel.what >/dev/null 2>&1; then
- osname=newsos4
+ if test -f /vmunix -a -f $src/hints/news_os.sh; then
+ (what /vmunix | UU/tr '[A-Z]' '[a-z]') > UU/kernel.what 2>&1
+ if $contains news-os UU/kernel.what >/dev/null 2>&1; then
+ osname=news_os
fi
- $rm -f ../UU/kernel.what
+ $rm -f UU/kernel.what
elif test -d c:/.; then
set X $myuname
osname=os2
@@ -1932,17 +2038,17 @@ EOM
*) case "$osvers" in
'') dflt=$file
;;
- *) if $test -f $file.sh ; then
+ *) if $test -f $src/hints/$file.sh ; then
dflt=$file
- elif $test -f $xfile.sh ; then
+ elif $test -f $src/hints/$xfile.sh ; then
dflt=$xfile
- elif $test -f $xxfile.sh ; then
+ elif $test -f $src/hints/$xxfile.sh ; then
dflt=$xxfile
- elif $test -f $xxxfile.sh ; then
+ elif $test -f $src/hints/$xxxfile.sh ; then
dflt=$xxxfile
- elif $test -f $xxxxfile.sh ; then
+ elif $test -f $src/hints/$xxxxfile.sh ; then
dflt=$xxxxfile
- elif $test -f "${osname}.sh" ; then
+ elif $test -f "$src/hints/${osname}.sh" ; then
dflt="${osname}"
else
dflt=none
@@ -1951,25 +2057,46 @@ EOM
esac
;;
esac
+ if $test -f Policy.sh ; then
+ case "$dflt" in
+ *Policy*) ;;
+ none) dflt="Policy" ;;
+ *) dflt="Policy $dflt" ;;
+ esac
+ fi
;;
*)
dflt=`echo $hintfile | $sed 's/\.sh$//'`
;;
esac
+ if $test -f Policy.sh ; then
+ $cat <<EOM
+
+There's also a Policy hint file available, which should make the
+site-specific (policy) questions easier to answer.
+EOM
+
+ fi
+
$cat <<EOM
You may give one or more space-separated answers, or "none" if appropriate.
-If your OS version has no hints, DO NOT give a wrong version -- say "none".
+A well-behaved OS will have no hints, so answering "none" or just "Policy"
+is a good thing. DO NOT give a wrong version.
EOM
+
rp="Which of these apply, if any?"
- . ../UU/myread
+ . UU/myread
tans=$ans
for file in $tans; do
- if $test -f $file.sh; then
- . ./$file.sh
- $cat $file.sh >> ../UU/config.sh
+ if $test X$file = XPolicy -a -f Policy.sh; then
+ . Policy.sh
+ $cat Policy.sh >> UU/config.sh
+ elif $test -f $src/hints/$file.sh; then
+ . $src/hints/$file.sh
+ $cat $src/hints/$file.sh >> UU/config.sh
elif $test X$tans = X -o X$tans = Xnone ; then
: nothing
else
@@ -1977,11 +2104,11 @@ EOM
echo "$file.sh does not exist"
dflt=$file
rp="hint to use instead?"
- . ../UU/myread
+ . UU/myread
for file in $ans; do
- if $test -f "$file.sh"; then
- . ./$file.sh
- $cat $file.sh >> ../UU/config.sh
+ if $test -f "$src/hints/$file.sh"; then
+ . $src/hints/$file.sh
+ $cat $src/hints/$file.sh >> UU/config.sh
elif $test X$ans = X -o X$ans = Xnone ; then
: nothing
else
@@ -1993,13 +2120,11 @@ EOM
hint=recommended
: Remember our hint file for later.
- if $test -f "$file.sh" ; then
+ if $test -f "$src/hints/$file.sh" ; then
hintfile="$file"
else
hintfile=''
fi
-
- cd ..
fi
cd UU
;;
@@ -2072,18 +2197,60 @@ none) osvers='' ;;
*) osvers="$ans" ;;
esac
-
-
: who configured the system
cf_time=`LC_ALL=C; export LC_ALL; $date 2>&1`
cf_by=`(logname) 2>/dev/null`
-case "$cf_by" in "")
+case "$cf_by" in
+"")
cf_by=`(whoami) 2>/dev/null`
- case "$cf_by" in "")
- cf_by=unknown ;;
+ case "$cf_by" in
+ "") cf_by=unknown ;;
esac ;;
esac
+: set up the script used to warn in case of inconsistency
+cat <<EOS >whoa
+$startsh
+EOS
+cat <<'EOSC' >>whoa
+dflt=y
+echo " "
+echo "*** WHOA THERE!!! ***" >&4
+echo " The $hint value for \$$var on this machine was \"$was\"!" >&4
+rp=" Keep the $hint value?"
+. ./myread
+case "$ans" in
+y) td=$was; tu=$was;;
+esac
+EOSC
+
+: function used to set $1 to $val
+setvar='var=$1; eval "was=\$$1"; td=$define; tu=$undef;
+case "$val$was" in
+$define$undef) . ./whoa; eval "$var=\$td";;
+$undef$define) . ./whoa; eval "$var=\$tu";;
+*) eval "$var=$val";;
+esac'
+
+cat <<EOM
+
+Perl can be built to take advantage of threads, on some systems.
+To do so, Configure must be run with -Dusethreads.
+(See README.threads for details.)
+EOM
+case "$usethreads" in
+$define|true|[yY]*) dflt='y';;
+*) dflt='n';;
+esac
+rp='Build a threading Perl?'
+. ./myread
+case "$ans" in
+y|Y) val="$define" ;;
+*) val="$undef" ;;
+esac
+set usethreads
+eval $setvar
+
: determine the architecture name
echo " "
if xxx=`./loc arch blurfl $pth`; $test -f "$xxx"; then
@@ -2126,7 +2293,6 @@ $define) echo "Threads selected." >&4
*) archname="$ans" ;;
esac
myarchname="$tarch"
-
: is AFS running?
echo " "
case "$afs" in
@@ -2509,9 +2675,9 @@ baserev=5.0
: get the patchlevel
echo " "
echo "Getting the current patchlevel..." >&4
-if $test -r ../patchlevel.h;then
- patchlevel=`awk '/PATCHLEVEL/ {print $3}' ../patchlevel.h`
- subversion=`awk '/SUBVERSION/ {print $3}' ../patchlevel.h`
+if $test -r $rsrc/patchlevel.h;then
+ patchlevel=`awk '/PATCHLEVEL/ {print $3}' $rsrc/patchlevel.h`
+ subversion=`awk '/SUBVERSION/ {print $3}' $rsrc/patchlevel.h`
else
patchlevel=0
subversion=0
@@ -2598,33 +2764,6 @@ else
d_archlib="$define"
fi
-: set up the script used to warn in case of inconsistency
-cat <<EOS >whoa
-$startsh
-EOS
-cat <<'EOSC' >>whoa
-dflt=y
-echo " "
-echo "*** WHOA THERE!!! ***" >&4
-echo " The $hint value for \$$var on this machine was \"$was\"!" >&4
-rp=" Keep the $hint value?"
-. ./myread
-case "$ans" in
-y) td=$was; tu=$was;;
-esac
-EOSC
-
-: function used to set $1 to $val
-setvar='var=$1; eval "was=\$$1"; td=$define; tu=$undef;
-case "$val$was" in
-$define$undef) . ./whoa; eval "$var=\$td";;
-$undef$define) . ./whoa; eval "$var=\$tu";;
-*) eval "$var=$val";;
-esac'
-
-: bincompat3 is no more even possible starting with 5.005
-d_bincompat3=$undef
-
: make some quick guesses about what we are up against
echo " "
$echo $n "Hmm... $c"
@@ -2827,11 +2966,393 @@ esac
set d_dosuid
eval $setvar
+: determine where public executables go
+echo " "
+set dflt bin bin
+eval $prefixit
+fn=d~
+rp='Pathname where the public executables will reside?'
+. ./getfile
+if $test "X$ansexp" != "X$binexp"; then
+ installbin=''
+fi
+bin="$ans"
+binexp="$ansexp"
+if $afs; then
+ $cat <<EOM
+
+Since you are running AFS, I need to distinguish the directory in which
+executables reside from the directory in which they are installed (and from
+which they are presumably copied to the former directory by occult means).
+
+EOM
+ case "$installbin" in
+ '') dflt=`echo $binexp | sed 's#^/afs/#/afs/.#'`;;
+ *) dflt="$installbin";;
+ esac
+ fn=de~
+ rp='Where will public executables be installed?'
+ . ./getfile
+ installbin="$ans"
+else
+ installbin="$binexp"
+fi
+
+
+: Binary compatibility with 5.003 is not possible with 5.004_50 and later.
+if test $patchlevel -ge 4 -o $subversion -ge 50; then
+ val=$undef
+else
+ $cat <<EOM
+
+Perl 5.004 can be compiled for binary compatibility with 5.003.
+If you decide to do so, you will be able to continue using any
+extensions that were compiled for Perl 5.003. However, binary
+compatibility forces Perl to expose some of its internal symbols
+in the same way that 5.003 did. So you may have symbol conflicts
+if you embed a binary-compatible Perl in other programs.
+
+EOM
+ case "$d_bincompat3" in
+ "$undef") dflt=n ;;
+ *) dflt=y ;;
+ esac
+ rp='Binary compatibility with Perl 5.003?'
+ . ./myread
+ case "$ans" in
+ y*) val="$define" ;;
+ *) val="$undef" ;;
+ esac
+fi
+set d_bincompat3
+eval $setvar
+case "$d_bincompat3" in
+"$define") bincompat3=y ;;
+*) bincompat3=n ;;
+esac
+
+: determine where manual pages are on this system
+echo " "
+case "$sysman" in
+'')
+ syspath='/usr/man/man1 /usr/man/mann /usr/man/manl /usr/man/local/man1'
+ syspath="$syspath /usr/man/u_man/man1 /usr/share/man/man1"
+ syspath="$syspath /usr/catman/u_man/man1 /usr/man/l_man/man1"
+ syspath="$syspath /usr/local/man/u_man/man1 /usr/local/man/l_man/man1"
+ syspath="$syspath /usr/man/man.L /local/man/man1 /usr/local/man/man1"
+ sysman=`./loc . /usr/man/man1 $syspath`
+ ;;
+esac
+if $test -d "$sysman"; then
+ echo "System manual is in $sysman." >&4
+else
+ echo "Could not find manual pages in source form." >&4
+fi
+
+: determine where manual pages go
+set man1dir man1dir none
+eval $prefixit
+$cat <<EOM
+
+$spackage has manual pages available in source form.
+EOM
+case "$nroff" in
+nroff)
+ echo "However, you don't have nroff, so they're probably useless to you."
+ case "$man1dir" in
+ '') man1dir="none";;
+ esac;;
+esac
+echo "If you don't want the manual sources installed, answer 'none'."
+case "$man1dir" in
+' ') dflt=none
+ ;;
+'')
+ lookpath="$prefixexp/man/man1 $prefixexp/man/l_man/man1"
+ lookpath="$lookpath $prefixexp/man/p_man/man1"
+ lookpath="$lookpath $prefixexp/man/u_man/man1"
+ lookpath="$lookpath $prefixexp/man/man.1"
+ case "$sysman" in
+ */?_man*) dflt=`./loc . $prefixexp/l_man/man1 $lookpath` ;;
+ *) dflt=`./loc . $prefixexp/man/man1 $lookpath` ;;
+ esac
+ set dflt
+ eval $prefixup
+ ;;
+*) dflt="$man1dir"
+ ;;
+esac
+echo " "
+fn=dn+~
+rp="Where do the main $spackage manual pages (source) go?"
+. ./getfile
+if $test "X$man1direxp" != "X$ansexp"; then
+ installman1dir=''
+fi
+man1dir="$ans"
+man1direxp="$ansexp"
+case "$man1dir" in
+'') man1dir=' '
+ installman1dir='';;
+esac
+if $afs; then
+ $cat <<EOM
+
+Since you are running AFS, I need to distinguish the directory in which
+manual pages reside from the directory in which they are installed (and from
+which they are presumably copied to the former directory by occult means).
+
+EOM
+ case "$installman1dir" in
+ '') dflt=`echo $man1direxp | sed 's#^/afs/#/afs/.#'`;;
+ *) dflt="$installman1dir";;
+ esac
+ fn=de~
+ rp='Where will man pages be installed?'
+ . ./getfile
+ installman1dir="$ans"
+else
+ installman1dir="$man1direxp"
+fi
+
+: What suffix to use on installed man pages
+
+case "$man1dir" in
+' ')
+ man1ext='0'
+ ;;
+*)
+ rp="What suffix should be used for the main $spackage man pages?"
+ case "$man1ext" in
+ '') case "$man1dir" in
+ *1) dflt=1 ;;
+ *1p) dflt=1p ;;
+ *1pm) dflt=1pm ;;
+ *l) dflt=l;;
+ *n) dflt=n;;
+ *o) dflt=o;;
+ *p) dflt=p;;
+ *C) dflt=C;;
+ *L) dflt=L;;
+ *L1) dflt=L1;;
+ *) dflt=1;;
+ esac
+ ;;
+ *) dflt="$man1ext";;
+ esac
+ . ./myread
+ man1ext="$ans"
+ ;;
+esac
+
+: see if we can have long filenames
+echo " "
+rmlist="$rmlist /tmp/cf$$"
+$test -d /tmp/cf$$ || mkdir /tmp/cf$$
+first=123456789abcdef
+second=/tmp/cf$$/$first
+$rm -f $first $second
+if (echo hi >$first) 2>/dev/null; then
+ if $test -f 123456789abcde; then
+ echo 'You cannot have filenames longer than 14 characters. Sigh.' >&4
+ val="$undef"
+ else
+ if (echo hi >$second) 2>/dev/null; then
+ if $test -f /tmp/cf$$/123456789abcde; then
+ $cat <<'EOM'
+That's peculiar... You can have filenames longer than 14 characters, but only
+on some of the filesystems. Maybe you are using NFS. Anyway, to avoid problems
+I shall consider your system cannot support long filenames at all.
+EOM
+ val="$undef"
+ else
+ echo 'You can have filenames longer than 14 characters.' >&4
+ val="$define"
+ fi
+ else
+ $cat <<'EOM'
+How confusing! Some of your filesystems are sane enough to allow filenames
+longer than 14 characters but some others like /tmp can't even think about them.
+So, for now on, I shall assume your kernel does not allow them at all.
+EOM
+ val="$undef"
+ fi
+ fi
+else
+ $cat <<'EOM'
+You can't have filenames longer than 14 chars. You can't even think about them!
+EOM
+ val="$undef"
+fi
+set d_flexfnam
+eval $setvar
+$rm -rf /tmp/cf$$ 123456789abcde*
+
+: determine where library module manual pages go
+set man3dir man3dir none
+eval $prefixit
+$cat <<EOM
+
+$spackage has manual pages for many of the library modules.
+EOM
+
+case "$nroff" in
+nroff)
+ $cat <<'EOM'
+However, you don't have nroff, so they're probably useless to you.
+EOM
+ case "$man3dir" in
+ '') man3dir="none";;
+ esac;;
+esac
+
+case "$d_flexfnam" in
+undef)
+ $cat <<'EOM'
+However, your system can't handle the long file names like File::Basename.3.
+EOM
+ case "$man3dir" in
+ '') man3dir="none";;
+ esac;;
+esac
+
+echo "If you don't want the manual sources installed, answer 'none'."
+prog=`echo $package | $sed 's/-*[0-9.]*$//'`
+case "$man3dir" in
+'') case "$prefix" in
+ *$prog*) dflt=`echo $man1dir |
+ $sed -e 's/man1/man3/g' -e 's/man\.1/man\.3/g'` ;;
+ *) dflt="$privlib/man/man3" ;;
+ esac
+ ;;
+' ') dflt=none;;
+*) dflt="$man3dir" ;;
+esac
+echo " "
+
+fn=dn+~
+rp="Where do the $package library man pages (source) go?"
+. ./getfile
+if test "X$man3direxp" != "X$ansexp"; then
+ installman3dir=''
+fi
+
+man3dir="$ans"
+man3direxp="$ansexp"
+case "$man3dir" in
+'') man3dir=' '
+ installman3dir='';;
+esac
+if $afs; then
+ $cat <<EOM
+
+Since you are running AFS, I need to distinguish the directory in which
+manual pages reside from the directory in which they are installed (and from
+which they are presumably copied to the former directory by occult means).
+
+EOM
+ case "$installman3dir" in
+ '') dflt=`echo $man3direxp | sed 's#^/afs/#/afs/.#'`;;
+ *) dflt="$installman3dir";;
+ esac
+ fn=de~
+ rp='Where will man pages be installed?'
+ . ./getfile
+ installman3dir="$ans"
+else
+ installman3dir="$man3direxp"
+fi
+
+: What suffix to use on installed man pages
+
+case "$man3dir" in
+' ')
+ man3ext='0'
+ ;;
+*)
+ rp="What suffix should be used for the $package library man pages?"
+ case "$man3ext" in
+ '') case "$man3dir" in
+ *3) dflt=3 ;;
+ *3p) dflt=3p ;;
+ *3pm) dflt=3pm ;;
+ *l) dflt=l;;
+ *n) dflt=n;;
+ *o) dflt=o;;
+ *p) dflt=p;;
+ *C) dflt=C;;
+ *L) dflt=L;;
+ *L3) dflt=L3;;
+ *) dflt=3;;
+ esac
+ ;;
+ *) dflt="$man3ext";;
+ esac
+ . ./myread
+ man3ext="$ans"
+ ;;
+esac
+
+: determine where public executable scripts go
+set scriptdir scriptdir
+eval $prefixit
+case "$scriptdir" in
+'')
+ dflt="$bin"
+ : guess some guesses
+ $test -d /usr/share/scripts && dflt=/usr/share/scripts
+ $test -d /usr/share/bin && dflt=/usr/share/bin
+ $test -d /usr/local/script && dflt=/usr/local/script
+ $test -d $prefixexp/script && dflt=$prefixexp/script
+ set dflt
+ eval $prefixup
+ ;;
+*) dflt="$scriptdir"
+ ;;
+esac
+$cat <<EOM
+
+Some installations have a separate directory just for executable scripts so
+that they can mount it across multiple architectures but keep the scripts in
+one spot. You might, for example, have a subdirectory of /usr/share for this.
+Or you might just lump your scripts in with all your other executables.
+
+EOM
+fn=d~
+rp='Where do you keep publicly executable scripts?'
+. ./getfile
+if $test "X$ansexp" != "X$scriptdirexp"; then
+ installscript=''
+fi
+scriptdir="$ans"
+scriptdirexp="$ansexp"
+if $afs; then
+ $cat <<EOM
+
+Since you are running AFS, I need to distinguish the directory in which
+scripts reside from the directory in which they are installed (and from
+which they are presumably copied to the former directory by occult means).
+
+EOM
+ case "$installscript" in
+ '') dflt=`echo $scriptdirexp | sed 's#^/afs/#/afs/.#'`;;
+ *) dflt="$installscript";;
+ esac
+ fn=de~
+ rp='Where will public scripts be installed?'
+ . ./getfile
+ installscript="$ans"
+else
+ installscript="$scriptdirexp"
+fi
+
: determine where site specific libraries go.
set sitelib sitelib
eval $prefixit
case "$sitelib" in
-'') dflt="$privlib/site_perl" ;;
+'')
+ prog=`echo $package | $sed 's/-*[0-9.]*$//'`
+ dflt="$privlib/site_$prog" ;;
*) dflt="$sitelib" ;;
esac
$cat <<EOM
@@ -2915,100 +3436,6 @@ else
installsitearch="$sitearchexp"
fi
-: determine where old public architecture dependent libraries might be
-case "$oldarchlib" in
-'') case "$privlib" in
- '') ;;
- *) dflt="$privlib/$archname"
- ;;
- esac
- ;;
-*) dflt="$oldarchlib"
- ;;
-esac
-if $test ! -d "$dflt/auto"; then
- dflt=none
-fi
-cat <<EOM
-
-In 5.001, Perl stored architecture-dependent library files in a directory
-with a name such as $privlib/$archname,
-and this directory contained files from the standard extensions and
-files from any additional extensions you might have added. Starting
-with version 5.002, all the architecture-dependent standard extensions
-will go into a version-specific directory such as
-$archlib,
-while locally-added extensions will go into
-$sitearch.
-
-If you wish Perl to continue to search the old architecture-dependent
-library for your local extensions, give the path to that directory.
-If you do not wish to use your old architecture-dependent library
-files, answer 'none'.
-
-EOM
-fn=dn~
-rp='Directory for your old 5.001 architecture-dependent libraries?'
-. ./getfile
-oldarchlib="$ans"
-oldarchlibexp="$ansexp"
-case "$oldarchlib" in
-''|' ') val="$undef" ;;
-*) val="$define" ;;
-esac
-set d_oldarchlib
-eval $setvar
-
-: determine where public executables go
-echo " "
-set dflt bin bin
-eval $prefixit
-fn=d~
-rp='Pathname where the public executables will reside?'
-. ./getfile
-if $test "X$ansexp" != "X$binexp"; then
- installbin=''
-fi
-bin="$ans"
-binexp="$ansexp"
-if $afs; then
- $cat <<EOM
-
-Since you are running AFS, I need to distinguish the directory in which
-executables reside from the directory in which they are installed (and from
-which they are presumably copied to the former directory by occult means).
-
-EOM
- case "$installbin" in
- '') dflt=`echo $binexp | sed 's#^/afs/#/afs/.#'`;;
- *) dflt="$installbin";;
- esac
- fn=de~
- rp='Where will public executables be installed?'
- . ./getfile
- installbin="$ans"
-else
- installbin="$binexp"
-fi
-
-: determine where manual pages are on this system
-echo " "
-case "$sysman" in
-'')
- syspath='/usr/man/man1 /usr/man/mann /usr/man/manl /usr/man/local/man1'
- syspath="$syspath /usr/man/u_man/man1 /usr/share/man/man1"
- syspath="$syspath /usr/catman/u_man/man1 /usr/man/l_man/man1"
- syspath="$syspath /usr/local/man/u_man/man1 /usr/local/man/l_man/man1"
- syspath="$syspath /usr/man/man.L /local/man/man1 /usr/local/man/man1"
- sysman=`./loc . /usr/man/man1 $syspath`
- ;;
-esac
-if $test -d "$sysman"; then
- echo "System manual is in $sysman." >&4
-else
- echo "Could not find manual pages in source form." >&4
-fi
-
: see what memory models we can support
case "$models" in
'')
@@ -3021,7 +3448,7 @@ main() {
#endif
}
EOP
- (cc -o pdp11 pdp11.c) >/dev/null 2>&1
+ ( cc -o pdp11 pdp11.c ) >/dev/null 2>&1
if $test -f pdp11 && ./pdp11 2>/dev/null; then
dflt='unsplit split'
else
@@ -3151,6 +3578,7 @@ none)
echo "Unrecognized memory models--you may have to edit Makefile.SH" >&4
;;
esac
+$rm -f pdp11.* pdp11
: see if we need a special compiler
echo " "
@@ -3262,13 +3690,13 @@ else
fi
chmod +x mips
$eunicefix mips
-echo " "
case "$usrinc" in
'') ;;
*) dflt="$usrinc";;
esac
case "$xxx_prompt" in
y) fn=d/
+ echo " "
rp='Where are the include files you want to use?'
. ./getfile
usrinc="$ans"
@@ -3323,25 +3751,6 @@ none) libpth=' ';;
*) libpth="$ans";;
esac
-: Define several unixisms. Hints files or command line options
-: can be used to override them.
-case "$ar" in
-'') ar='ar';;
-esac
-case "$lib_ext" in
-'') lib_ext='.a';;
-esac
-case "$obj_ext" in
-'') obj_ext='.o';;
-esac
-case "$path_sep" in
-'') path_sep=':';;
-esac
-: Which makefile gets called first. This is used by make depend.
-case "$firstmakefile" in
-'') firstmakefile='makefile';;
-esac
-
: compute shared library extension
case "$so" in
'')
@@ -3364,6 +3773,48 @@ rp='What is the file extension used for shared libraries?'
. ./myread
so="$ans"
+: Define several unixisms.
+: Hints files or command line option can be used to override them.
+: The convoluted testing is in case hints files set either the old
+: or the new name.
+case "$_exe" in
+'') case "$exe_ext" in
+ '') ;;
+ *) _exe="$exe_ext" ;;
+ esac
+ ;;
+esac
+case "$_a" in
+'') case "$lib_ext" in
+ '') _a='.a';;
+ *) _a="$lib_ext" ;;
+ esac
+ ;;
+esac
+case "$_o" in
+'') case "$obj_ext" in
+ '') _o='.o';;
+ *) _o="$obj_ext";;
+ esac
+ ;;
+esac
+case "$p_" in
+'') case "$path_sep" in
+ '') p_=':';;
+ *) p_="$path_sep";;
+ esac
+ ;;
+esac
+exe_ext=$_exe
+lib_ext=$_a
+obj_ext=$_o
+path_sep=$p_
+
+: Which makefile gets called first. This is used by make depend.
+case "$firstmakefile" in
+'') firstmakefile='makefile';;
+esac
+
: Looking for optional libraries
echo " "
echo "Checking for optional libraries..." >&4
@@ -3388,25 +3839,25 @@ for thislib in $libswanted; do
*"-l$thislib "*);;
*) dflt="$dflt -l$thislib";;
esac
- elif xxx=`./loc lib$thislib$lib_ext X $libpth`; $test -f "$xxx"; then
+ elif xxx=`./loc lib$thislib$_a X $libpth`; $test -f "$xxx"; then
echo "Found -l$thislib."
case " $dflt " in
*"-l$thislib "*);;
*) dflt="$dflt -l$thislib";;
esac
- elif xxx=`./loc $thislib$lib_ext X $libpth`; $test -f "$xxx"; then
+ elif xxx=`./loc $thislib$_a X $libpth`; $test -f "$xxx"; then
echo "Found -l$thislib."
case " $dflt " in
*"-l$thislib "*);;
*) dflt="$dflt -l$thislib";;
esac
- elif xxx=`./loc lib${thislib}_s$lib_ext X $libpth`; $test -f "$xxx"; then
+ elif xxx=`./loc lib${thislib}_s$_a X $libpth`; $test -f "$xxx"; then
echo "Found -l${thislib}_s."
case " $dflt " in
*"-l$thislib "*);;
*) dflt="$dflt -l${thislib}_s";;
esac
- elif xxx=`./loc Slib$thislib$lib_ext X $xlibpth`; $test -f "$xxx"; then
+ elif xxx=`./loc Slib$thislib$_a X $xlibpth`; $test -f "$xxx"; then
echo "Found -l$thislib."
case " $dflt " in
*"-l$thislib "*);;
@@ -3679,8 +4130,7 @@ Your C compiler may want other flags. For this question you should include
-I/whatever and -DWHATEVER flags and any other flags used by the C compiler,
but you should NOT include libraries or ld flags like -lwhatever. If you
want $package to honor its debug switch, you should include -DDEBUGGING here.
-Your C compiler might also need additional flags, such as -D_POSIX_SOURCE,
--DHIDEMYMALLOC or -DCRIPPLED_CC.
+Your C compiler might also need additional flags, such as -D_POSIX_SOURCE.
To use no flags, specify the word "none".
@@ -3726,7 +4176,7 @@ EOM
esac
if $cppstdin -DLFRULB=bar $cppflags $ftry $cppminus <cpp.c \
>cpp1.out 2>/dev/null && \
- $cpprun -DLFRULB=bar $ftry $cpplast <cpp.c \
+ $cpprun -DLFRULB=bar $cppflags $ftry $cpplast <cpp.c \
>cpp2.out 2>/dev/null && \
$contains 'foo.*xx.*bar' cpp1.out >/dev/null 2>&1 && \
$contains 'foo.*xx.*bar' cpp2.out >/dev/null 2>&1
@@ -3748,7 +4198,6 @@ EOM
esac
: flags used in final linking phase
-
case "$ldflags" in
'') if ./venix; then
dflt='-i -z'
@@ -3802,7 +4251,7 @@ rmlist="$rmlist pdp11"
: coherency check
echo " "
-echo "Checking your choice of C compiler, libs, and flags for coherency..." >&4
+echo "Checking your choice of C compiler and flags for coherency..." >&4
set X $cc $optimize $ccflags $ldflags -o try try.c $libs
shift
$cat >try.msg <<EOM
@@ -3816,20 +4265,37 @@ and I got the following output:
EOM
$cat > try.c <<'EOF'
#include <stdio.h>
-main() { exit(0); }
+main() { printf("Ok\n"); exit(0); }
EOF
dflt=y
-if sh -c "$cc $optimize $ccflags -o try try.c $ldflags $libs" >>try.msg 2>&1; then
+if sh -c "$cc $optimize $ccflags $ldflags -o try try.c $libs" >>try.msg 2>&1; then
if sh -c './try' >>try.msg 2>&1; then
- dflt=n
+ xxx=`./try`
+ case "$xxx" in
+ "Ok") dflt=n ;;
+ *) echo 'The program compiled OK, but produced no output.' >> try.msg
+ case " $libs " in
+ *" -lsfio "*)
+ cat >> try.msg <<'EOQS'
+If $libs contains -lsfio, and sfio is mis-configured, then it
+sometimes (apparently) runs and exits with a 0 status, but with no
+output! It may have to do with sfio's use of _exit vs. exit.
+
+EOQS
+ rp="You have a big problem. Shall I abort Configure"
+ dflt=y
+ ;;
+ esac
+ ;;
+ esac
else
echo "The program compiled OK, but exited with status $?." >>try.msg
- rp="You have a problem. Shall I abort Configure (and explain the problem)"
+ rp="You have a problem. Shall I abort Configure"
dflt=y
fi
else
echo "I can't compile the test program." >>try.msg
- rp="You have a BIG problem. Shall I abort Configure (and explain the problem)"
+ rp="You have a BIG problem. Shall I abort Configure"
dflt=y
fi
case "$dflt" in
@@ -3854,17 +4320,24 @@ n) echo "OK, that should do.";;
esac
$rm -f try try.* core
+: define a shorthand compile call
+compile='
+mc_file=$1;
+shift;
+$cc $optimize $ccflags $ldflags -o ${mc_file}$_exe $* ${mc_file}.c $libs > /dev/null 2>&1;'
+
echo " "
echo "Checking for GNU C Library..." >&4
cat >gnulibc.c <<EOM
int
main()
{
- return __libc_main();
+ return __libc_main();
}
EOM
-if $cc $ccflags $ldflags -o gnulibc gnulibc.c $libs >/dev/null 2>&1 && \
- ./gnulibc | $contains '^GNU C Library' >/dev/null 2>&1; then
+set gnulibc
+if eval $compile && \
+ ./gnulibc | $contains '^GNU C Library' >/dev/null 2>&1; then
val="$define"
echo "You are using the GNU C Library"
else
@@ -3957,7 +4430,7 @@ echo " "
case "$libc" in
'') libc=unknown
case "$libs" in
- *-lc_s*) libc=`./loc libc_s$lib_ext $libc $libpth`
+ *-lc_s*) libc=`./loc libc_s$_a $libc $libpth`
esac
;;
esac
@@ -3975,15 +4448,15 @@ case "$libs" in
:
elif try=`./loc lib$thislib.$so X $libpth`; $test -f "$try"; then
:
- elif try=`./loc lib$thislib$lib_ext X $libpth`; $test -f "$try"; then
+ elif try=`./loc lib$thislib$_a X $libpth`; $test -f "$try"; then
:
- elif try=`./loc $thislib$lib_ext X $libpth`; $test -f "$try"; then
+ elif try=`./loc $thislib$_a X $libpth`; $test -f "$try"; then
:
elif try=`./loc lib$thislib X $libpth`; $test -f "$try"; then
:
elif try=`./loc $thislib X $libpth`; $test -f "$try"; then
:
- elif try=`./loc Slib$thislib$lib_ext X $xlibpth`; $test -f "$try"; then
+ elif try=`./loc Slib$thislib$_a X $xlibpth`; $test -f "$try"; then
:
else
try=''
@@ -4004,18 +4477,18 @@ unknown)
: The messy sed command sorts on library version numbers.
$test -r $1 || \
set `echo blurfl; echo $xxx/libc.$so.[0-9]* | \
- tr ' ' '\012' | egrep -v '\.[A-Za-z]*$' | $sed -e '
+ tr ' ' '\012' | egrep -v '\.[A-Za-z]*$' | $sed -e '
h
s/[0-9][0-9]*/0000&/g
s/0*\([0-9][0-9][0-9][0-9][0-9]\)/\1/g
G
s/\n/ /' | \
- sort | $sed -e 's/^.* //'`
+ sort | $sed -e 's/^.* //'`
eval set \$$#
done
$test -r $1 || set /usr/ccs/lib/libc.$so
- $test -r $1 || set /lib/libsys_s$lib_ext
- ;;
+ $test -r $1 || set /lib/libsys_s$_a
+ ;;
*)
set blurfl
;;
@@ -4033,25 +4506,25 @@ elif $test -r /lib/libc && $test -r /lib/clib; then
fi
elif $test -r "$libc" || (test -h "$libc") >/dev/null 2>&1; then
echo "Your C library seems to be in $libc, as you said before."
-elif $test -r $incpath/usr/lib/libc$lib_ext; then
- libc=$incpath/usr/lib/libc$lib_ext;
+elif $test -r $incpath/usr/lib/libc$_a; then
+ libc=$incpath/usr/lib/libc$_a;
echo "Your C library seems to be in $libc. That's fine."
-elif $test -r /lib/libc$lib_ext; then
- libc=/lib/libc$lib_ext;
+elif $test -r /lib/libc$_a; then
+ libc=/lib/libc$_a;
echo "Your C library seems to be in $libc. You're normal."
else
- if tans=`./loc libc$lib_ext blurfl/dyick $libpth`; $test -r "$tans"; then
+ if tans=`./loc libc$_a blurfl/dyick $libpth`; $test -r "$tans"; then
:
elif tans=`./loc libc blurfl/dyick $libpth`; $test -r "$tans"; then
libnames="$libnames "`./loc clib blurfl/dyick $libpth`
elif tans=`./loc clib blurfl/dyick $libpth`; $test -r "$tans"; then
:
- elif tans=`./loc Slibc$lib_ext blurfl/dyick $xlibpth`; $test -r "$tans"; then
+ elif tans=`./loc Slibc$_a blurfl/dyick $xlibpth`; $test -r "$tans"; then
:
- elif tans=`./loc Mlibc$lib_ext blurfl/dyick $xlibpth`; $test -r "$tans"; then
+ elif tans=`./loc Mlibc$_a blurfl/dyick $xlibpth`; $test -r "$tans"; then
:
else
- tans=`./loc Llibc$lib_ext blurfl/dyick $xlibpth`
+ tans=`./loc Llibc$_a blurfl/dyick $xlibpth`
fi
if $test -r "$tans"; then
echo "Your C library seems to be in $tans, of all places."
@@ -4099,15 +4572,12 @@ $sed 's/^/ /' libnames >&4
echo " "
$echo $n "This may take a while...$c" >&4
-: Linux may need the special Dynamic option to nm for shared libraries.
-: In general, this is stored in the nm_so_opt variable.
-: Unfortunately, that option may be fatal on non-shared libraries.
-for nm_libs_ext in $*; do
- case $nm_libs_ext in
- *$so*) nm $nm_so_opt $nm_opt $nm_libs_ext 2>/dev/null ;;
- *) nm $nm_opt $nm_libs_ext 2>/dev/null ;;
+for file in $*; do
+ case $file in
+ *$so*) nm $nm_so_opt $nm_opt $file 2>/dev/null;;
+ *) nm $nm_opt $file 2>/dev/null;;
esac
-done > libc.tmp
+done >libc.tmp
$echo $n ".$c"
$grep fprintf libc.tmp > libc.ptf
@@ -4183,16 +4653,16 @@ else
for thisname in $libnames; do
ar t $thisname >>libc.tmp
done
- $sed -e 's/\.o$//' < libc.tmp > libc.list
+ $sed -e "s/\\$_o\$//" < libc.tmp > libc.list
echo "Ok." >&4
else
echo "ar didn't seem to work right." >&4
echo "Maybe this is a Cray...trying bld instead..." >&4
- if bld t $libc | $sed -e 's/.*\///' -e 's/\.o:.*$//' > libc.list
+ if bld t $libc | $sed -e 's/.*\///' -e "s/\\$_o:.*\$//" > libc.list
then
for thisname in $libnames; do
bld t $libnames | \
- $sed -e 's/.*\///' -e 's/\.o:.*$//' >>libc.list
+ $sed -e 's/.*\///' -e "s/\\$_o:.*\$//" >>libc.list
ar t $thisname >>libc.tmp
done
echo "Ok." >&4
@@ -4329,7 +4799,7 @@ yes)
fi;;
*)
echo "main() { extern short $1$tdc; printf(\"%hd\", $1$tc); }" > t.c;
- if $cc $ccflags $ldflags -o t t.c $libs >/dev/null 2>&1;
+ if $cc $optimize $ccflags $ldflags -o t t.c $libs >/dev/null 2>&1;
then tval=true;
else tval=false;
fi;
@@ -4443,18 +4913,25 @@ EOM
'') case "$osname" in
hpux) dflt='+z' ;;
next) dflt='none' ;;
- svr4*|esix*) dflt='-Kpic' ;;
irix*) dflt='-KPIC' ;;
- solaris) case "$ccflags" in
- *-DDEBUGGING*) dflt='-KPIC' ;;
- *) dflt='-Kpic' ;;
- esac ;;
+ svr4*|esix*|solaris)
+ case "$ccflags" in
+ *-DDEBUGGING*) dflt='-KPIC' ;;
+ *) dflt='-Kpic' ;;
+ esac
+ ;;
sunos) dflt='-pic' ;;
*) dflt='none' ;;
- esac ;;
- *) case "$osname/$ccflags" in
- solaris/*-DDEBUGGING*) dflt='-fPIC' ;;
- *) dflt='-fpic' ;;
+ esac
+ ;;
+ *) case "$osname" in
+ svr4*|esix*|solaris)
+ case "$ccflags" in
+ *-DDEBUGGING*) dflt='-fPIC' ;;
+ *) dflt='-fpic' ;;
+ esac
+ ;;
+ *) dflt='-fpic' ;;
esac ;;
esac ;;
*) dflt="$cccdlflags" ;;
@@ -4623,7 +5100,7 @@ $undef)
$cat << EOM
The perl executable is normally obtained by linking perlmain.c with
-libperl${lib_ext}, any static extensions (usually just DynaLoader), and
+libperl${_a}, any static extensions (usually just DynaLoader), and
any other libraries needed on this system (such as -lm, etc.). Since
your system supports dynamic loading, it is probably possible to build
a shared libperl.$so. If you will have more than one executable linked
@@ -4715,7 +5192,7 @@ EOM
echo "Ok, I'll use $libperl"
;;
*)
- libperl="libperl${lib_ext}"
+ libperl="libperl${_a}"
;;
esac
@@ -4725,8 +5202,8 @@ case "$shrpdir" in
*) $cat >&4 <<EOM
WARNING: Use of the shrpdir variable for the installation location of
the shared $libperl is not supported. It was never documented and
-will not work in this version. Let me (chip@perl.com) know of any
-problems this may cause.
+will not work in this version. Let me (doughera@lafcol.lafayette.edu)
+know of any problems this may cause.
EOM
case "$shrpdir" in
@@ -4799,264 +5276,6 @@ case "$shrpenv" in
'') shrpenv="$tmp_shrpenv" ;;
esac
-: determine where manual pages go
-set man1dir man1dir none
-eval $prefixit
-$cat <<EOM
-
-$spackage has manual pages available in source form.
-EOM
-case "$nroff" in
-nroff)
- echo "However, you don't have nroff, so they're probably useless to you."
- case "$man1dir" in
- '') man1dir="none";;
- esac;;
-esac
-echo "If you don't want the manual sources installed, answer 'none'."
-case "$man1dir" in
-' ') dflt=none
- ;;
-'')
- lookpath="$prefixexp/man/man1 $prefixexp/man/l_man/man1"
- lookpath="$lookpath $prefixexp/man/p_man/man1"
- lookpath="$lookpath $prefixexp/man/u_man/man1"
- lookpath="$lookpath $prefixexp/man/man.1"
- : If prefix contains 'perl' then we want to keep the man pages
- : under the prefix directory. Otherwise, look in a variety of
- : other possible places. This is debatable, but probably a
- : good compromise. Well, apparently not.
- : Experience has shown people expect man1dir to be under prefix,
- : so we now always put it there. Users who want other behavior
- : can answer interactively or use a command line option.
- : Does user have System V-style man paths.
- case "$sysman" in
- */?_man*) dflt=`./loc . $prefixexp/l_man/man1 $lookpath` ;;
- *) dflt=`./loc . $prefixexp/man/man1 $lookpath` ;;
- esac
- set dflt
- eval $prefixup
- ;;
-*) dflt="$man1dir"
- ;;
-esac
-echo " "
-fn=dn+~
-rp="Where do the main $spackage manual pages (source) go?"
-. ./getfile
-if $test "X$man1direxp" != "X$ansexp"; then
- installman1dir=''
-fi
-man1dir="$ans"
-man1direxp="$ansexp"
-case "$man1dir" in
-'') man1dir=' '
- installman1dir='';;
-esac
-if $afs; then
- $cat <<EOM
-
-Since you are running AFS, I need to distinguish the directory in which
-manual pages reside from the directory in which they are installed (and from
-which they are presumably copied to the former directory by occult means).
-
-EOM
- case "$installman1dir" in
- '') dflt=`echo $man1direxp | sed 's#^/afs/#/afs/.#'`;;
- *) dflt="$installman1dir";;
- esac
- fn=de~
- rp='Where will man pages be installed?'
- . ./getfile
- installman1dir="$ans"
-else
- installman1dir="$man1direxp"
-fi
-
-: What suffix to use on installed man pages
-
-case "$man1dir" in
-' ')
- man1ext='0'
- ;;
-*)
- rp="What suffix should be used for the main $spackage man pages?"
- case "$man1ext" in
- '') case "$man1dir" in
- *1) dflt=1 ;;
- *1p) dflt=1p ;;
- *1pm) dflt=1pm ;;
- *l) dflt=l;;
- *n) dflt=n;;
- *o) dflt=o;;
- *p) dflt=p;;
- *C) dflt=C;;
- *L) dflt=L;;
- *L1) dflt=L1;;
- *) dflt=1;;
- esac
- ;;
- *) dflt="$man1ext";;
- esac
- . ./myread
- man1ext="$ans"
- ;;
-esac
-
-: see if we can have long filenames
-echo " "
-rmlist="$rmlist /tmp/cf$$"
-$test -d /tmp/cf$$ || mkdir /tmp/cf$$
-first=123456789abcdef
-second=/tmp/cf$$/$first
-$rm -f $first $second
-if (echo hi >$first) 2>/dev/null; then
- if $test -f 123456789abcde; then
- echo 'You cannot have filenames longer than 14 characters. Sigh.' >&4
- val="$undef"
- else
- if (echo hi >$second) 2>/dev/null; then
- if $test -f /tmp/cf$$/123456789abcde; then
- $cat <<'EOM'
-That's peculiar... You can have filenames longer than 14 characters, but only
-on some of the filesystems. Maybe you are using NFS. Anyway, to avoid problems
-I shall consider your system cannot support long filenames at all.
-EOM
- val="$undef"
- else
- echo 'You can have filenames longer than 14 characters.' >&4
- val="$define"
- fi
- else
- $cat <<'EOM'
-How confusing! Some of your filesystems are sane enough to allow filenames
-longer than 14 characters but some others like /tmp can't even think about them.
-So, for now on, I shall assume your kernel does not allow them at all.
-EOM
- val="$undef"
- fi
- fi
-else
- $cat <<'EOM'
-You can't have filenames longer than 14 chars. You can't even think about them!
-EOM
- val="$undef"
-fi
-set d_flexfnam
-eval $setvar
-$rm -rf /tmp/cf$$ 123456789abcde*
-
-: determine where library module manual pages go
-set man3dir man3dir none
-eval $prefixit
-$cat <<EOM
-
-$spackage has manual pages for many of the library modules.
-EOM
-
-case "$nroff" in
-nroff)
- $cat <<'EOM'
-However, you don't have nroff, so they're probably useless to you.
-You can use the supplied perldoc script instead.
-EOM
- case "$man3dir" in
- '') man3dir="none";;
- esac;;
-esac
-
-case "$d_flexfnam" in
-undef)
- $cat <<'EOM'
-However, your system can't handle the long file names like File::Basename.3.
-You can use the supplied perldoc script instead.
-EOM
- case "$man3dir" in
- '') man3dir="none";;
- esac;;
-esac
-
-echo "If you don't want the manual sources installed, answer 'none'."
-: We dont use /usr/local/man/man3 because some man programs will
-: only show the /usr/local/man/man3 contents, and not the system ones,
-: thus man less will show the perl module less.pm, but not the system
-: less command. We might also conflict with TCL man pages.
-: However, something like /opt/perl/man/man3 is fine.
-case "$man3dir" in
-'') case "$prefix" in
- *perl*) dflt=`echo $man1dir |
- $sed -e 's/man1/man3/g' -e 's/man\.1/man\.3/g'` ;;
- *) dflt="$privlib/man/man3" ;;
- esac
- ;;
-' ') dflt=none;;
-*) dflt="$man3dir" ;;
-esac
-echo " "
-
-fn=dn+~
-rp="Where do the $spackage library man pages (source) go?"
-. ./getfile
-if test "X$man3direxp" != "X$ansexp"; then
- installman3dir=''
-fi
-
-man3dir="$ans"
-man3direxp="$ansexp"
-case "$man3dir" in
-'') man3dir=' '
- installman3dir='';;
-esac
-if $afs; then
- $cat <<EOM
-
-Since you are running AFS, I need to distinguish the directory in which
-manual pages reside from the directory in which they are installed (and from
-which they are presumably copied to the former directory by occult means).
-
-EOM
- case "$installman3dir" in
- '') dflt=`echo $man3direxp | sed 's#^/afs/#/afs/.#'`;;
- *) dflt="$installman3dir";;
- esac
- fn=de~
- rp='Where will man pages be installed?'
- . ./getfile
- installman3dir="$ans"
-else
- installman3dir="$man3direxp"
-fi
-
-: What suffix to use on installed man pages
-
-case "$man3dir" in
-' ')
- man3ext='0'
- ;;
-*)
- rp="What suffix should be used for the $spackage library man pages?"
- case "$man3ext" in
- '') case "$man3dir" in
- *3) dflt=3 ;;
- *3p) dflt=3p ;;
- *3pm) dflt=3pm ;;
- *l) dflt=l;;
- *n) dflt=n;;
- *o) dflt=o;;
- *p) dflt=p;;
- *C) dflt=C;;
- *L) dflt=L;;
- *L3) dflt=L3;;
- *) dflt=3;;
- esac
- ;;
- *) dflt="$man3ext";;
- esac
- . ./myread
- man3ext="$ans"
- ;;
-esac
-
: see if we have to deal with yellow pages, now NIS.
if $test -d /usr/etc/yp || $test -d /etc/yp; then
if $test -f /usr/etc/nibindd; then
@@ -5101,6 +5320,15 @@ if $test -d /usr/etc/yp || $test -d /etc/yp; then
;;
esac
fi
+case "$hostcat" in
+'') hostcat='cat /etc/hosts';;
+esac
+case "$groupcat" in
+'') groupcat='cat /etc/group';;
+esac
+case "$passcat" in
+'') passcat='cat /etc/passwd';;
+esac
: now get the host name
echo " "
@@ -5196,15 +5424,11 @@ case "$myhostname" in
*) case "$mydomain" in
'')
{
- : If we use NIS, try ypmatch.
- : Is there some reason why this was not done before?
test "X$hostcat" = "Xypcat hosts" &&
ypmatch "$myhostname" hosts 2>/dev/null |\
$sed -e 's/[ ]*#.*//; s/$/ /' > hosts && \
$test -s hosts
} || {
- : Extract only the relevant hosts, reducing file size,
- : remove comments, insert trailing space for later use.
$hostcat | $sed -n -e "s/[ ]*#.*//; s/\$/ /
/[ ]$myhostname[ . ]/p" > hosts
}
@@ -5226,8 +5450,6 @@ case "$myhostname" in
tans=`./loc resolv.conf X /etc /usr/etc`
if $test -f "$tans"; then
echo "(Attempting domain name extraction from $tans)"
- : Why was there an Egrep here, when Sed works?
- : Look for either a search or a domain directive.
dflt=.`$sed -n -e 's/ / /g' \
-e 's/^search *\([^ ]*\).*/\1/p' $tans \
| ./tr '[A-Z]' '[a-z]' 2>/dev/null`
@@ -5416,59 +5638,6 @@ case "$startperl" in
*) echo "I'll use $perlpath in \"eval 'exec'\"" ;;
esac
-: determine where public executable scripts go
-set scriptdir scriptdir
-eval $prefixit
-case "$scriptdir" in
-'')
- dflt="$bin"
- : guess some guesses
- $test -d /usr/share/scripts && dflt=/usr/share/scripts
- $test -d /usr/share/bin && dflt=/usr/share/bin
- $test -d /usr/local/script && dflt=/usr/local/script
- $test -d $prefixexp/script && dflt=$prefixexp/script
- set dflt
- eval $prefixup
- ;;
-*) dflt="$scriptdir"
- ;;
-esac
-$cat <<EOM
-
-Some installations have a separate directory just for executable scripts so
-that they can mount it across multiple architectures but keep the scripts in
-one spot. You might, for example, have a subdirectory of /usr/share for this.
-Or you might just lump your scripts in with all your other executables.
-
-EOM
-fn=d~
-rp='Where do you keep publicly executable scripts?'
-. ./getfile
-if $test "X$ansexp" != "X$scriptdirexp"; then
- installscript=''
-fi
-scriptdir="$ans"
-scriptdirexp="$ansexp"
-if $afs; then
- $cat <<EOM
-
-Since you are running AFS, I need to distinguish the directory in which
-scripts reside from the directory in which they are installed (and from
-which they are presumably copied to the former directory by occult means).
-
-EOM
- case "$installscript" in
- '') dflt=`echo $scriptdirexp | sed 's#^/afs/#/afs/.#'`;;
- *) dflt="$installscript";;
- esac
- fn=de~
- rp='Where will public scripts be installed?'
- . ./getfile
- installscript="$ans"
-else
- installscript="$scriptdirexp"
-fi
-
cat <<EOM
Previous version of $package used the standard IO mechanisms as defined
@@ -5570,9 +5739,9 @@ esac
for xxx_convert in $xxx_list; do
echo "Trying $xxx_convert"
- $rm -f try try.o
- if $cc $ccflags -DTRY_$xxx_convert $ldflags -o try \
- try.c $libs > /dev/null 2>&1 ; then
+ $rm -f try try$_o
+ set try -DTRY_$xxx_convert
+ if eval $compile; then
echo "$xxx_convert" found. >&4
if ./try; then
echo "I'll use $xxx_convert to convert floats into a string." >&4
@@ -5622,15 +5791,15 @@ main() {
EOCP
: check sys/file.h first, no particular reason here
if $test `./findhdr sys/file.h` && \
- $cc $cppflags -DI_SYS_FILE access.c -o access >/dev/null 2>&1 ; then
+ $cc $cppflags -DI_SYS_FILE -o access access.c >/dev/null 2>&1 ; then
h_sysfile=true;
echo "<sys/file.h> defines the *_OK access constants." >&4
elif $test `./findhdr fcntl.h` && \
- $cc $cppflags -DI_FCNTL access.c -o access >/dev/null 2>&1 ; then
+ $cc $cppflags -DI_FCNTL -o access access.c >/dev/null 2>&1 ; then
h_fcntl=true;
echo "<fcntl.h> defines the *_OK access constants." >&4
elif $test `./findhdr unistd.h` && \
- $cc $cppflags -DI_UNISTD access.c -o access >/dev/null 2>&1 ; then
+ $cc $cppflags -DI_UNISTD -o access access.c >/dev/null 2>&1 ; then
echo "<unistd.h> defines the *_OK access constants." >&4
else
echo "I can't find the four *_OK access constants--I'll use mine." >&4
@@ -5682,10 +5851,10 @@ eval $inhdr
set getpgrp d_getpgrp
eval $inlibc
-echo "Checking to see which flavor of getpgrp is in use . . . "
case "$d_getpgrp" in
"$define")
echo " "
+ echo "Checking to see which flavor of getpgrp is in use..."
$cat >set.c <<EOP
#$i_unistd I_UNISTD
#include <sys/types.h>
@@ -5744,10 +5913,10 @@ $rm -f set set.c
set setpgrp d_setpgrp
eval $inlibc
-echo "Checking to see which flavor of setpgrp is in use . . . "
case "$d_setpgrp" in
"$define")
echo " "
+ echo "Checking to see which flavor of setpgrp is in use..."
$cat >set.c <<EOP
#$i_unistd I_UNISTD
#include <sys/types.h>
@@ -5777,7 +5946,7 @@ EOP
echo 'You have to use setpgrp() instead of setpgrp(pid,pgrp).' >&4
val="$undef"
else
- echo "I can't seem to compile and run the test program."
+ echo "(I can't seem to compile and run the test program.)"
if ./usg; then
xxx="a USG one, i.e. you use setpgrp()."
else
@@ -5800,7 +5969,6 @@ EOP
esac
set d_bsdsetpgrp
eval $setvar
-d_bsdpgrp=$d_bsdsetpgrp
$rm -f set set.c
: see if bzero exists
set bzero d_bzero
@@ -5818,28 +5986,22 @@ main()
printf("intsize=%d;\n", sizeof(int));
printf("longsize=%d;\n", sizeof(long));
printf("shortsize=%d;\n", sizeof(short));
- fflush(stdout);
exit(0);
}
EOCP
-# If $libs contains -lsfio, and sfio is mis-configured, then it
-# sometimes (apparently) runs and exits with a 0 status, but with no
-# output!. Thus we check with test -s whether we actually got any
-# output. I think it has to do with sfio's use of _exit vs. exit,
-# but I don't know for sure. --Andy Dougherty 1/27/97.
- if $cc $optimize $ccflags $ldflags -o intsize intsize.c $libs >/dev/null 2>&1 &&
- ./intsize > intsize.out 2>/dev/null && test -s intsize.out ; then
- eval `$cat intsize.out`
+ set intsize
+ if eval $compile && ./intsize > /dev/null; then
+ eval `./intsize`
echo "Your integers are $intsize bytes long."
echo "Your long integers are $longsize bytes long."
echo "Your short integers are $shortsize bytes long."
else
$cat >&4 <<EOM
-
+!
Help! I can't compile and run the intsize test program: please enlighten me!
(This is probably a misconfiguration in your system or libraries, and
you really ought to fix it. Still, I'll try anyway.)
-
+!
EOM
dflt=4
rp="What is the size of an integer (in bytes)?"
@@ -5856,7 +6018,7 @@ EOM
fi
;;
esac
-$rm -f intsize intsize.[co] intsize.out
+$rm -f intsize intsize.*
: see if signal is declared as pointer to function returning int or void
echo " "
@@ -5866,11 +6028,14 @@ if $contains 'int.*\*[ ]*signal' $$.tmp >/dev/null 2>&1 ; then
echo "You have int (*signal())() instead of void." >&4
val="$undef"
elif $contains 'void.*\*[ ]*signal' $$.tmp >/dev/null 2>&1 ; then
- echo "You have void (*signal())() instead of int." >&4
+ echo "You have void (*signal())()." >&4
val="$define"
elif $contains 'extern[ ]*[(\*]*signal' $$.tmp >/dev/null 2>&1 ; then
echo "You have int (*signal())() instead of void." >&4
val="$undef"
+elif $contains 'void.*\*.*sig' $$.tmp >/dev/null 2>&1 ; then
+ echo "You have void (*signal())()." >&4
+ val="$define"
else
case "$d_voidsig" in
'')
@@ -5883,9 +6048,12 @@ else
*) val="$undef";;
esac;;
"$define")
- echo "As you already told me, signal handler returns void." >&4;;
- *)
- echo "As you already told me, signal handler returns int." >&4;;
+ echo "As you already told me, signal handler returns void." >&4
+ val="$define"
+ ;;
+ *) echo "As you already told me, signal handler returns int." >&4
+ val="$undef"
+ ;;
esac
fi
set d_voidsig
@@ -5924,7 +6092,8 @@ main()
exit(result);
}
EOCP
-if $cc -o try $ccflags try.c >/dev/null 2>&1; then
+set try
+if eval $compile; then
./try
yyy=$?
else
@@ -6005,7 +6174,8 @@ main()
}
EOCP
-if $cc -o try $ccflags try.c >/dev/null 2>&1; then
+set try
+if eval $compile; then
./try
castflags=$?
else
@@ -6044,7 +6214,8 @@ va_dcl
exit((unsigned long)vsprintf(buf,"%s",args) > 10L);
}
EOF
- if $cc $ccflags vprintf.c -o vprintf >/dev/null 2>&1 && ./vprintf; then
+ set vprintf
+ if eval $compile && ./vprintf; then
echo "Your vsprintf() returns (int)." >&4
val2="$undef"
else
@@ -6102,19 +6273,19 @@ if set crypt val -f d_crypt; eval $csym; $val; then
val="$define"
cryptlib=''
else
- cryptlib=`./loc Slibcrypt$lib_ext "" $xlibpth`
+ cryptlib=`./loc Slibcrypt$_a "" $xlibpth`
if $test -z "$cryptlib"; then
- cryptlib=`./loc Mlibcrypt$lib_ext "" $xlibpth`
+ cryptlib=`./loc Mlibcrypt$_a "" $xlibpth`
else
cryptlib=-lcrypt
fi
if $test -z "$cryptlib"; then
- cryptlib=`./loc Llibcrypt$lib_ext "" $xlibpth`
+ cryptlib=`./loc Llibcrypt$_a "" $xlibpth`
else
cryptlib=-lcrypt
fi
if $test -z "$cryptlib"; then
- cryptlib=`./loc libcrypt$lib_ext "" $libpth`
+ cryptlib=`./loc libcrypt$_a "" $libpth`
else
cryptlib=-lcrypt
fi
@@ -6130,8 +6301,8 @@ eval $setvar
: get csh whereabouts
case "$csh" in
-'csh') val="$undef" ;;
-*) val="$define" ;;
+'csh') val="$undef" ;;
+*) val="$define" ;;
esac
set d_csh
eval $setvar
@@ -6343,8 +6514,8 @@ main()
EOM
: Call the object file tmp-dyna.o in case dlext=o.
if $cc $ccflags $cccdlflags -c dyna.c > /dev/null 2>&1 &&
- mv dyna${obj_ext} tmp-dyna${obj_ext} > /dev/null 2>&1 &&
- $ld $lddlflags -o dyna.$dlext tmp-dyna${obj_ext} > /dev/null 2>&1 &&
+ mv dyna${_o} tmp-dyna${_o} > /dev/null 2>&1 &&
+ $ld $lddlflags -o dyna.$dlext tmp-dyna${_o} > /dev/null 2>&1 &&
$cc $ccflags $ldflags $cccdlflags $ccdlflags fred.c -o fred $libs > /dev/null 2>&1; then
xxx=`./fred`
case $xxx in
@@ -6392,7 +6563,7 @@ main() {
EOCP
: check sys/file.h first to get FREAD on Sun
if $test `./findhdr sys/file.h` && \
- $cc $ccflags "-DI_SYS_FILE" -o open3 $ldflags open3.c $libs >/dev/null 2>&1 ; then
+ set open3 -DI_SYS_FILE && eval $compile; then
h_sysfile=true;
echo "<sys/file.h> defines the O_* constants..." >&4
if ./open3; then
@@ -6403,7 +6574,7 @@ if $test `./findhdr sys/file.h` && \
val="$undef"
fi
elif $test `./findhdr fcntl.h` && \
- $cc $ccflags "-DI_FCNTL" -o open3 $ldflags open3.c $libs >/dev/null 2>&1 ; then
+ set open3 -DI_FCNTL && eval $compile; then
h_fcntl=true;
echo "<fcntl.h> defines the O_* constants..." >&4
if ./open3; then
@@ -6453,7 +6624,8 @@ main() {
exit(0);
}
EOCP
- if $cc $ccflags $ldflags try.c -o try >/dev/null 2>&1; then
+ set try
+ if eval $compile; then
o_nonblock=`./try`
case "$o_nonblock" in
'') echo "I can't figure it out, assuming O_NONBLOCK will do.";;
@@ -6531,7 +6703,8 @@ main()
exit(0); /* Bye bye, thank you for playing! */
}
EOCP
- if $cc $ccflags $ldflags try.c -o try >/dev/null 2>&1; then
+ set try
+ if eval $compile; then
echo "$startsh" >mtry
echo "./try >try.out 2>try.ret 3>try.err || exit 4" >>mtry
chmod +x mtry
@@ -6630,14 +6803,6 @@ eval $inlibc
set fsetpos d_fsetpos
eval $inlibc
-: see if gethostbyaddr exists
-set gethostbyaddr d_gethbyaddr
-eval $inlibc
-
-: see if gethostbyname exists
-set gethostbyname d_gethbyname
-eval $inlibc
-
: see if gethostent exists
set gethostent d_gethent
eval $inlibc
@@ -6646,14 +6811,6 @@ eval $inlibc
set getlogin d_getlogin
eval $inlibc
-: see if getnetbyaddr exists
-set getnetbyaddr d_getnbyaddr
-eval $inlibc
-
-: see if getnetbyname exists
-set getnetbyname d_getnbyname
-eval $inlibc
-
: see if getpgid exists
set getpgid d_getpgid
eval $inlibc
@@ -6670,22 +6827,6 @@ eval $inlibc
set getpriority d_getprior
eval $inlibc
-: see if getprotobyname exists
-set getprotobyname d_getpbyname
-eval $inlibc
-
-: see if getprotobynumber exists
-set getprotobynumber d_getpbynumber
-eval $inlibc
-
-: see if getservbyname exists
-set getservbyname d_getsbyname
-eval $inlibc
-
-: see if getservbyport exists
-set getservbyport d_getsbyport
-eval $inlibc
-
: see if gettimeofday or ftime exists
set gettimeofday d_gettimeod
eval $inlibc
@@ -6815,7 +6956,8 @@ main() {
exit(1);
}
EOCP
-if $cc $ccflags $ldflags -o isascii isascii.c $libs >/dev/null 2>&1 ; then
+set isascii
+if eval $compile; then
echo "isascii() found." >&4
val="$define"
else
@@ -6941,7 +7083,7 @@ case "$ans" in
y*|true)
usemymalloc='y'
mallocsrc='malloc.c'
- mallocobj='malloc.o'
+ mallocobj="malloc$_o"
d_mymalloc="$define"
case "$libs" in
*-lmalloc*)
@@ -7020,6 +7162,81 @@ eval $inlibc
set poll d_poll
eval $inlibc
+
+: see whether the various POSIXish _yields exist within given cccmd
+$cat >try.c <<EOP
+#include <pthread.h>
+main() {
+ YIELD();
+ exit(0);
+}
+EOP
+: see if pthread_yield exists within given cccmd,
+: if we do not usethreads this may well end up undef.
+set try -DYIELD=pthread_yield
+if eval $compile; then
+ val="$define"
+ echo 'pthread_yield() found.' >&4
+else
+ val="$undef"
+ echo 'pthread_yield() NOT found.' >&4
+fi
+set d_pthread_yield
+eval $setvar
+
+: see if sched_yield exists within given cccmd,
+: if we do not usethreads this may well end up undef.
+set try -DYIELD=sched_yield
+if eval $compile; then
+ val="$define"
+ echo 'sched_yield() found.' >&4
+else
+ val="$undef"
+ echo 'sched_yield() NOT found.' >&4
+fi
+set d_sched_yield
+eval $setvar
+$rm -f try try.*
+
+: test whether pthreads are created in joinable -- aka undetached -- state
+if test "X$usethreads" != X; then
+ echo >&4 "Checking whether pthreads are created joinable."
+ $cat >try.c <<'EOCP'
+#include <pthread.h>
+#include <stdio.h>
+int main() {
+ pthread_attr_t attr;
+ int detachstate;
+ printf("%s\n",
+ pthread_attr_init(&attr) == 0 &&
+ pthread_attr_getdetachstate(&attr, &detachstate) == 0 &&
+ detachstate == PTHREAD_CREATE_DETACHED ?
+ "detached" : "joinable");
+ exit(0);
+}
+EOCP
+ set try
+ if eval $compile; then
+ yyy=`./try`
+ case "$yyy" in
+ detached) echo "Nope, they aren't." ;;
+ *) echo "Yup, they are." ;;
+ esac
+ else
+ echo "(I can't execute the test program--assuming they are.)"
+ yyy=joinable
+ fi
+ $rm -f try try.*
+ case "$yyy" in
+ detached) val="$undef" ;;
+ *) val="$define" ;;
+ esac
+ set d_pthreads_created_joinable
+ eval $setvar
+else
+ d_pthreads_created_joinable="$undef"
+fi
+
: see if this is a pwd.h system
set pwd.h i_pwd
eval $inhdr
@@ -7142,15 +7359,14 @@ case "$d_bcopy" in
"$define")
echo " "
echo "Checking to see if your bcopy() can do overlapping copies..." >&4
- $cat >foo.c <<EOCP
+ $cat >try.c <<EOCP
#$i_memory I_MEMORY
#$i_stdlib I_STDLIB
#$i_string I_STRING
#$i_unistd I_UNISTD
EOCP
- $cat >>foo.c <<'EOCP'
+ $cat >>try.c <<'EOCP'
#include <stdio.h>
-
#ifdef I_MEMORY
# include <memory.h>
#endif
@@ -7173,8 +7389,6 @@ int len;
int off;
int align;
-/* Copy "abcde..." string to char abc[] so that gcc doesn't
- try to store the string in read-only memory. */
bcopy("abcdefghijklmnopqrstuvwxyz0123456789", abc, 36);
for (align = 7; align >= 0; align--) {
@@ -7192,9 +7406,9 @@ for (align = 7; align >= 0; align--) {
exit(0);
}
EOCP
- if $cc $optimize $ccflags $ldflags foo.c \
- -o safebcpy $libs >/dev/null 2>&1; then
- if ./safebcpy 2>/dev/null; then
+ set try
+ if eval $compile; then
+ if ./try 2>/dev/null; then
echo "Yes, it can."
val="$define"
else
@@ -7211,7 +7425,7 @@ EOCP
fi
;;
esac
-$rm -f foo.* safebcpy core
+$rm -f try.* try core
set d_safebcpy
eval $setvar
@@ -7221,15 +7435,14 @@ case "$d_memcpy" in
"$define")
echo " "
echo "Checking to see if your memcpy() can do overlapping copies..." >&4
- $cat >foo.c <<EOCP
+ $cat >try.c <<EOCP
#$i_memory I_MEMORY
#$i_stdlib I_STDLIB
#$i_string I_STRING
#$i_unistd I_UNISTD
EOCP
- $cat >>foo.c <<'EOCP'
+ $cat >>try.c <<'EOCP'
#include <stdio.h>
-
#ifdef I_MEMORY
# include <memory.h>
#endif
@@ -7271,9 +7484,9 @@ for (align = 7; align >= 0; align--) {
exit(0);
}
EOCP
- if $cc $optimize $ccflags $ldflags foo.c \
- -o safemcpy $libs >/dev/null 2>&1; then
- if ./safemcpy 2>/dev/null; then
+ set try
+ if eval $compile; then
+ if ./try 2>/dev/null; then
echo "Yes, it can."
val="$define"
else
@@ -7290,7 +7503,7 @@ EOCP
fi
;;
esac
-$rm -f foo.* safemcpy core
+$rm -f try.* try core
set d_safemcpy
eval $setvar
@@ -7299,16 +7512,15 @@ val="$undef"
case "$d_memcmp" in
"$define")
echo " "
- echo "Checking to see if your memcmp() can compare relative magnitude..." >&4
- $cat >foo.c <<EOCP
+ echo "Checking if your memcmp() can compare relative magnitude..." >&4
+ $cat >try.c <<EOCP
#$i_memory I_MEMORY
#$i_stdlib I_STDLIB
#$i_string I_STRING
#$i_unistd I_UNISTD
EOCP
- $cat >>foo.c <<'EOCP'
+ $cat >>try.c <<'EOCP'
#include <stdio.h>
-
#ifdef I_MEMORY
# include <memory.h>
#endif
@@ -7332,9 +7544,9 @@ if ((a < b) && memcmp(&a, &b, 1) < 0)
exit(0);
}
EOCP
- if $cc $optimize $ccflags $ldflags foo.c \
- -o sanemcmp $libs >/dev/null 2>&1; then
- if ./sanemcmp 2>/dev/null; then
+ set try
+ if eval $compile; then
+ if ./try 2>/dev/null; then
echo "Yes, it can."
val="$define"
else
@@ -7345,7 +7557,7 @@ EOCP
fi
;;
esac
-$rm -f foo.* sanemcmp core
+$rm -f try.* try core
set d_sanemcmp
eval $setvar
@@ -7558,12 +7770,7 @@ else
echo 'sigaction NOT found.' >&4
val="$undef"
fi
-
-$cat > set.c <<'EOP'
-/* Solaris 2.5_x86 with SunWorks Pro C 3.0.1 doesn't have a complete
- sigaction structure if compiled with cc -Xc. This compile test
- will fail then. <doughera@lafcol.lafayette.edu>
-*/
+$cat > try.c <<'EOP'
#include <stdio.h>
#include <sys/types.h>
#include <signal.h>
@@ -7572,21 +7779,21 @@ main()
struct sigaction act, oact;
}
EOP
-
-if $cc $ccflags $ldflags -o set set.c $libs >/dev/null 2>&1; then
+set try
+if eval $compile; then
:
else
echo "But you don't seem to have a useable struct sigaction." >&4
val="$undef"
fi
set d_sigaction; eval $setvar
-$rm -f set set.o set.c
+$rm -f try try$_o try.c
: see if sigsetjmp exists
echo " "
case "$d_sigsetjmp" in
'')
- $cat >set.c <<'EOP'
+ $cat >try.c <<'EOP'
#include <setjmp.h>
sigjmp_buf env;
int set = 1;
@@ -7599,8 +7806,9 @@ main()
exit(1);
}
EOP
- if $cc $ccflags $ldflags -o set set.c $libs > /dev/null 2>&1 ; then
- if ./set >/dev/null 2>&1; then
+ set try
+ if eval $compile; then
+ if ./try >/dev/null 2>&1; then
echo "POSIX sigsetjmp found." >&4
val="$define"
else
@@ -7624,7 +7832,7 @@ EOM
esac
set d_sigsetjmp
eval $setvar
-$rm -f set.c set
+$rm -f try.c try
socketlib=''
sockethdr=''
@@ -7647,10 +7855,10 @@ else
: we will have to assume that it supports the 4.2 BSD interface
d_oldsock="$undef"
else
- echo "You don't have Berkeley networking in libc$lib_ext..." >&4
- if test -f /usr/lib/libnet$lib_ext; then
- ( (nm $nm_opt /usr/lib/libnet$lib_ext | eval $nm_extract) || \
- ar t /usr/lib/libnet$lib_ext) 2>/dev/null >> libc.list
+ echo "You don't have Berkeley networking in libc$_a..." >&4
+ if test -f /usr/lib/libnet$_a; then
+ ( (nm $nm_opt /usr/lib/libnet$_a | eval $nm_extract) || \
+ ar t /usr/lib/libnet$_a) 2>/dev/null >> libc.list
if $contains socket libc.list >/dev/null 2>&1; then
echo "...but the Wollongong group seems to have hacked it in." >&4
socketlib="-lnet"
@@ -7663,7 +7871,7 @@ else
d_oldsock="$define"
fi
else
- echo "or even in libnet$lib_ext, which is peculiar." >&4
+ echo "or even in libnet$_a, which is peculiar." >&4
d_socket="$undef"
d_oldsock="$undef"
fi
@@ -7757,7 +7965,8 @@ main() {
}
EOP
val="$undef"
-if $cc $ccflags $ldflags -o try try.c $libs >/dev/null 2>&1; then
+set try
+if eval $compile; then
if ./try; then
echo "Your stdio acts pretty std."
val="$define"
@@ -7787,7 +7996,6 @@ esac
set d_stdio_cnt_lval
eval $setvar
-
: see if _base is also standard
val="$undef"
case "$d_stdstdio" in
@@ -7807,7 +8015,8 @@ main() {
exit(1);
}
EOP
- if $cc $ccflags $ldflags -o try try.c $libs > /dev/null 2>&1; then
+ set try
+ if eval $compile; then
if ./try; then
echo "And its _base field acts std."
val="$define"
@@ -8111,7 +8320,8 @@ case "$d_closedir" in
#endif
int main() { return closedir(opendir(".")); }
EOM
- if $cc $ccflags $ldflags -o closedir closedir.c $libs > /dev/null 2>&1; then
+ set closedir
+ if eval $compile; then
if ./closedir > /dev/null 2>&1 ; then
echo "Yes, it does."
val="$undef"
@@ -8199,7 +8409,8 @@ main()
printf("%d\n", (char *)&try.bar - (char *)&try.foo);
}
EOCP
- if $cc $ccflags try.c -o try >/dev/null 2>&1; then
+ set try
+ if eval $compile; then
dflt=`./try`
else
dflt='8'
@@ -8247,7 +8458,8 @@ main()
}
EOCP
xxx_prompt=y
- if $cc $ccflags try.c -o try >/dev/null 2>&1 && ./try > /dev/null; then
+ set try
+ if eval $compile && ./try > /dev/null; then
dflt=`./try`
case "$dflt" in
[1-4][1-4][1-4][1-4]|12345678|87654321)
@@ -8288,11 +8500,11 @@ ACAT(Cir,cus)
EOCP
$cppstdin $cppflags $cppminus <cpp_stuff.c >cpp_stuff.out 2>&1
if $contains 'Circus' cpp_stuff.out >/dev/null 2>&1; then
- echo "Oh! Smells like ANSI's been here."
+ echo "Oh! Smells like ANSI's been here." >&4
echo "We can catify or stringify, separately or together!"
cpp_stuff=42
elif $contains 'Reiser' cpp_stuff.out >/dev/null 2>&1; then
- echo "Ah, yes! The good old days!"
+ echo "Ah, yes! The good old days!" >&4
echo "However, in the good old days we don't know how to stringify and"
echo "catify at the same time."
cpp_stuff=1
@@ -8310,6 +8522,51 @@ set db.h i_db
eval $inhdr
case "$i_db" in
+define)
+ : Check the return type needed for hash
+ echo " "
+ echo "Checking return type needed for hash for Berkeley DB ..." >&4
+ $cat >try.c <<EOCP
+#$d_const HASCONST
+#ifndef HASCONST
+#define const
+#endif
+#include <sys/types.h>
+#include <db.h>
+
+#ifndef DB_VERSION_MAJOR
+u_int32_t hash_cb (ptr, size)
+const void *ptr;
+size_t size;
+{
+}
+HASHINFO info;
+main()
+{
+ info.hash = hash_cb;
+}
+#endif
+EOCP
+ if $cc $ccflags -c try.c >try.out 2>&1 ; then
+ if $contains warning try.out >>/dev/null 2>&1 ; then
+ db_hashtype='int'
+ else
+ db_hashtype='u_int32_t'
+ fi
+ else
+ : XXX Maybe we should just give up here.
+ db_hashtype=u_int32_t
+ echo "Help: I can't seem to compile the db test program." >&4
+ echo "Something's wrong, but I'll assume you use $db_hashtype." >&4
+ fi
+ $rm -f try.*
+ echo "Your version of Berkeley DB uses $db_hashtype for hash."
+ ;;
+*) db_hashtype=u_int32_t
+ ;;
+esac
+
+case "$i_db" in
$define)
: Check db version.
echo " "
@@ -8326,6 +8583,7 @@ main()
{
#ifdef DB_VERSION_MAJOR /* DB version >= 2 */
int Major, Minor, Patch ;
+ unsigned long Version ;
(void)db_version(&Major, &Minor, &Patch) ;
printf("You have Berkeley DB Version 2 or greater\n");
@@ -8341,9 +8599,15 @@ main()
}
printf("db.h and libdb are compatible\n") ;
- /* needs to be >= 2.05 */
- if (DB_VERSION_MAJOR == 2 && DB_VERSION_MINOR == 0 && DB_VERSION_PATCH < 5) {
- printf("but Perl needs Berkeley DB 2.0.5 or greater\n") ;
+
+ Version = DB_VERSION_MAJOR * 1000000 + DB_VERSION_MINOR * 1000
+ + DB_VERSION_PATCH ;
+
+ /* needs to be >= 2.3.4 */
+ if (Version < 2003004) {
+ /* if (DB_VERSION_MAJOR == 2 && DB_VERSION_MINOR == 0 && DB_VERSION_PATCH
+< 5) { */
+ printf("but Perl needs Berkeley DB 2.3.4 or greater\n") ;
exit(2);
}
@@ -8358,7 +8622,8 @@ main()
#endif
}
EOCP
- if $cc $optimize $ccflags $ldflags -o try try.c $libs && ./try; then
+ set try
+ if eval $compile && ./try; then
echo 'Looks OK.' >&4
else
echo "I can't use Berkeley DB with your <db.h>. I'll disable Berkeley DB." >&4
@@ -8380,51 +8645,6 @@ esac
case "$i_db" in
define)
- : Check the return type needed for hash
- echo " "
- echo "Checking return type needed for hash for Berkeley DB ..." >&4
- $cat >try.c <<EOCP
-#$d_const HASCONST
-#ifndef HASCONST
-#define const
-#endif
-#include <sys/types.h>
-#include <db.h>
-
-#ifndef DB_VERSION_MAJOR
-u_int32_t hash_cb (ptr, size)
-const void *ptr;
-size_t size;
-{
-}
-HASHINFO info;
-main()
-{
- info.hash = hash_cb;
-}
-#endif
-EOCP
- if $cc $ccflags -c try.c >try.out 2>&1 ; then
- if $contains warning try.out >>/dev/null 2>&1 ; then
- db_hashtype='int'
- else
- db_hashtype='u_int32_t'
- fi
- else
- : XXX Maybe we should just give up here.
- db_hashtype=u_int32_t
- echo "Help: I can't seem to compile the db test program." >&4
- echo "Something's wrong, but I'll assume you use $db_hashtype." >&4
- fi
- $rm -f try.*
- echo "Your version of Berkeley DB uses $db_hashtype for hash."
- ;;
-*) db_hashtype=u_int32_t
- ;;
-esac
-
-case "$i_db" in
-define)
: Check the return type needed for prefix
echo " "
echo "Checking return type needed for prefix for Berkeley DB ..." >&4
@@ -8552,7 +8772,6 @@ echo "Hmm, your compiler has some difficulty with void. Checking further..." >&4
fi
fi
esac
-: Only prompt user if support does not match the level we want
case "$voidflags" in
"$defvoidused") ;;
*)
@@ -8603,6 +8822,7 @@ eval $inlibc
set setgroups d_setgrps
eval $inlibc
+
: Find type of 2nd arg to 'getgroups()' and 'setgroups()'
echo " "
case "$d_getgrps$d_setgrps" in
@@ -8633,39 +8853,23 @@ rp="What type is lseek's offset on this system declared as?"
lseektype="$ans"
echo " "
-case "$make" in
-'')
- make=`./loc make make $pth`
- case "$make" in
- /*) echo make is in $make. ;;
- ?:[\\/]*) echo make is in $make. ;;
- *) echo "I don't know where 'make' is, and my life depends on it." >&4
- echo "Go find a make program or fix your PATH setting!" >&4
- exit 1
- ;;
- esac
- ;;
-*) echo make is in $make. ;;
-esac
-
-$echo $n "Checking if your $make program sets \$(MAKE)... $c" >&4
+echo "Checking if your $make program sets \$(MAKE)..." >&4
case "$make_set_make" in
'')
$sed 's/^X //' > testmake.mak << 'EOF'
Xall:
-X @echo 'ac_maketemp="$(MAKE)"'
+X @echo 'maketemp="$(MAKE)"'
EOF
- : GNU make sometimes prints "make[1]: Entering...", which would confuse us.
case "`$make -f testmake.mak 2>/dev/null`" in
- *ac_maketemp=*) make_set_make='#' ;;
+ *maketemp=*) make_set_make='#' ;;
*) make_set_make="MAKE=$make" ;;
esac
$rm -f testmake.mak
;;
esac
case "$make_set_make" in
-'#') echo "Yup, it does." >&4 ;;
-*) echo "Nope, it doesn't." >&4 ;;
+'#') echo "Yup, it does.";;
+*) echo "Nope, it doesn't.";;
esac
: see what type is used for mode_t
@@ -8677,6 +8881,217 @@ rp="What type is used for file modes?"
. ./myread
modetype="$ans"
+: Cruising for prototypes
+echo " "
+echo "Checking out function prototypes..." >&4
+$cat >prototype.c <<'EOCP'
+main(int argc, char *argv[]) {
+ exit(0);}
+EOCP
+if $cc $ccflags -c prototype.c >prototype.out 2>&1 ; then
+ echo "Your C compiler appears to support function prototypes."
+ val="$define"
+else
+ echo "Your C compiler doesn't seem to understand function prototypes."
+ val="$undef"
+fi
+set prototype
+eval $setvar
+$rm -f prototype*
+
+: define a fucntion to check prototypes
+$cat > protochk <<EOSH
+$startsh
+cc="$cc"
+optimize="$optimize"
+ccflags="$ccflags"
+prototype="$prototype"
+define="$define"
+rm=$rm
+EOSH
+
+$cat >> protochk <<'EOSH'
+
+$rm -f try.c
+foo="$1"
+shift
+while test $# -ge 2; do
+ case "$1" in
+ $define) echo "#include <$2>" >> try.c ;;
+ literal) echo "$2" >> try.c ;;
+ esac
+ shift 2
+done
+test "$prototype" = "$define" && echo '#define CAN_PROTOTYPE' >> try.c
+cat >> try.c <<'EOCP'
+#ifdef CAN_PROTOTYPE
+#define _(args) args
+#else
+#define _(args) ()
+#endif
+EOCP
+echo "$foo" >> try.c
+echo 'int no_real_function_has_this_name _((void)) { return 0; }' >> try.c
+$cc $optimize $ccflags -c try.c > /dev/null 2>&1
+status=$?
+$rm -f try.[co]
+exit $status
+EOSH
+chmod +x protochk
+$eunicefix protochk
+
+: see if gethostbyaddr exists
+set gethostbyaddr d_gethbyaddr
+eval $inlibc
+
+: see if gethostbyname exists
+set gethostbyname d_gethbyname
+eval $inlibc
+
+: see if getnetbyaddr exists
+set getnetbyaddr d_getnbyaddr
+eval $inlibc
+
+: see if this is a netdb.h system
+set netdb.h i_netdb
+eval $inhdr
+
+: see what type is used for size_t
+set size_t sizetype 'unsigned int' stdio.h sys/types.h
+eval $typedef
+dflt="$sizetype"
+echo " "
+rp="What type is used for the length parameter for string functions?"
+. ./myread
+sizetype="$ans"
+
+: check for type of arguments to gethostbyaddr.
+if test "X$netdb_host_type" = X -o "X$netdb_hlen_type" = X; then
+ case "$d_gethbyaddr" in
+ $define)
+ $cat <<EOM
+
+Checking to see what type of arguments are accepted by gethostbyaddr().
+EOM
+ hdrs="$define sys/types.h
+ $d_socket sys/socket.h
+ $i_niin netinet/in.h
+ $i_netdb netdb.h
+ $i_unistd unistd.h"
+ : The first arg can 'char *' or 'void *'
+ : The second arg is some of integral type
+ for xxx in in_addr_t 'const void *' 'const char *' 'void *' 'char *'; do
+ for yyy in size_t long int; do
+ case "$netdb_host_type" in
+ '') try="extern struct hostent *gethostbyaddr($xxx, $yyy, int);"
+ if ./protochk "$try" $hdrs; then
+ echo "Your system accepts $xxx for the first arg."
+ echo "...and $yyy for the second arg."
+ netdb_host_type="$xxx"
+ netdb_hlen_type="$yyy"
+ fi
+ ;;
+ esac
+ done
+ done
+ : In case none of those worked, prompt the user.
+ case "$netdb_host_type" in
+ '') rp='What is the type for the 1st argument to gethostbyaddr?'
+ dflt='char *'
+ . ./myread
+ netdb_host_type=$ans
+ rp='What is the type for the 2nd argument to gethostbyaddr?'
+ dflt="$sizetype"
+ . ./myread
+ netdb_hlen_type=$ans
+ ;;
+ esac
+ ;;
+ *) : no gethostbyaddr, so pick harmless defaults
+ netdb_host_type='char *'
+ netdb_hlen_type="$sizetype"
+ ;;
+ esac
+ # Remove the "const" if needed. -- but then we'll have a
+ # prototype clash!
+ # netdb_host_type=`echo "$netdb_host_type" | sed 's/^const //'`
+fi
+
+: check for type of argument to gethostbyname.
+if test "X$netdb_name_type" = X ; then
+ case "$d_gethbyname" in
+ $define)
+ $cat <<EOM
+
+Checking to see what type of argument is accepted by gethostbyname().
+EOM
+ hdrs="$define sys/types.h
+ $d_socket sys/socket.h
+ $i_niin netinet/in.h
+ $i_netdb netdb.h
+ $i_unistd unistd.h"
+ for xxx in "const char *" "char *"; do
+ case "$netdb_name_type" in
+ '') try="extern struct hostent *gethostbyname($xxx);"
+ if ./protochk "$try" $hdrs; then
+ echo "Your system accepts $xxx."
+ netdb_name_type="$xxx"
+ fi
+ ;;
+ esac
+ done
+ : In case none of those worked, prompt the user.
+ case "$netdb_name_type" in
+ '') rp='What is the type for the 1st argument to gethostbyname?'
+ dflt='char *'
+ . ./myread
+ netdb_name_type=$ans
+ ;;
+ esac
+ ;;
+ *) : no gethostbyname, so pick harmless default
+ netdb_name_type='char *'
+ ;;
+ esac
+fi
+
+: check for type of 1st argument to getnetbyaddr.
+if test "X$netdb_net_type" = X ; then
+ case "$d_getnbyaddr" in
+ $define)
+ $cat <<EOM
+
+Checking to see what type of 1st argument is accepted by getnetbyaddr().
+EOM
+ hdrs="$define sys/types.h
+ $d_socket sys/socket.h
+ $i_niin netinet/in.h
+ $i_netdb netdb.h
+ $i_unistd unistd.h"
+ for xxx in in_addr_t "unsigned long" long "unsigned int" int; do
+ case "$netdb_net_type" in
+ '') try="extern struct netent *getnetbyaddr($xxx, int);"
+ if ./protochk "$try" $hdrs; then
+ echo "Your system accepts $xxx."
+ netdb_net_type="$xxx"
+ fi
+ ;;
+ esac
+ done
+ : In case none of those worked, prompt the user.
+ case "$netdb_net_type" in
+ '') rp='What is the type for the 1st argument to getnetbyaddr?'
+ dflt='long'
+ . ./myread
+ netdb_net_type=$ans
+ ;;
+ esac
+ ;;
+ *) : no getnetbyaddr, so pick harmless default
+ netdb_name_type='long'
+ ;;
+ esac
+fi
: locate the preferred pager for this system
case "$pager" in
'')
@@ -8702,23 +9117,14 @@ rp='What pager is used on your system?'
. ./getfile
pager="$ans"
-: Cruising for prototypes
+: see what type pids are declared as in the kernel
+set pid_t pidtype int stdio.h sys/types.h
+eval $typedef
+dflt="$pidtype"
echo " "
-echo "Checking out function prototypes..." >&4
-$cat >prototype.c <<'EOCP'
-main(int argc, char *argv[]) {
- exit(0);}
-EOCP
-if $cc $ccflags -c prototype.c >prototype.out 2>&1 ; then
- echo "Your C compiler appears to support function prototypes."
- val="$define"
-else
- echo "Your C compiler doesn't seem to understand function prototypes."
- val="$undef"
-fi
-set prototype
-eval $setvar
-$rm -f prototype*
+rp="What type are process ids on this system declared as?"
+. ./myread
+pidtype="$ans"
: check for size of random number generator
echo " "
@@ -8750,11 +9156,11 @@ main()
for (i = 0; max; i++)
max /= 2;
printf("%d\n",i);
- fflush(stdout);
}
EOCP
- if $cc $ccflags $ldflags -o try try.c $libs >/dev/null 2>&1 ; then
- dflt=`try`
+ set try
+ if eval $compile; then
+ dflt=`./try$_exe`
else
dflt='?'
echo "(I can't seem to compile the test program...)"
@@ -8767,7 +9173,7 @@ esac
rp='How many bits does your rand() function produce?'
. ./myread
randbits="$ans"
-$rm -f try.c try.o try
+$rm -f try.* try
: see if ar generates random libraries by itself
echo " "
@@ -8780,18 +9186,18 @@ EOP
$cc $ccflags -c bar1.c >/dev/null 2>&1
$cc $ccflags -c bar2.c >/dev/null 2>&1
$cc $ccflags -c foo.c >/dev/null 2>&1
-ar rc bar$lib_ext bar2.o bar1.o >/dev/null 2>&1
-if $cc $ccflags $ldflags -o foobar foo.o bar$lib_ext $libs > /dev/null 2>&1 &&
+$ar rc bar$_a bar2$_o bar1$_o >/dev/null 2>&1
+if $cc $ccflags $ldflags -o foobar foo$_o bar$_a $libs > /dev/null 2>&1 &&
./foobar >/dev/null 2>&1; then
- echo "ar appears to generate random libraries itself."
+ echo "$ar appears to generate random libraries itself."
orderlib=false
ranlib=":"
-elif ar ts bar$lib_ext >/dev/null 2>&1 &&
- $cc $ccflags $ldflags -o foobar foo.o bar$lib_ext $libs > /dev/null 2>&1 &&
+elif $ar ts bar$_a >/dev/null 2>&1 &&
+ $cc $ccflags $ldflags -o foobar foo$_o bar$_a $libs > /dev/null 2>&1 &&
./foobar >/dev/null 2>&1; then
- echo "a table of contents needs to be added with 'ar ts'."
+ echo "a table of contents needs to be added with '$ar ts'."
orderlib=false
- ranlib="ar ts"
+ ranlib="$ar ts"
else
case "$ranlib" in
:) ranlib='';;
@@ -8861,10 +9267,9 @@ for i_time in '' '-DI_TIME'; do
for i_systime in '-DI_SYSTIME' ''; do
case "$flags" in
'') $echo $n ".$c"
- if $cc $ccflags \
- $i_time $i_systime $i_systimek $sysselect $s_timeval $s_timezone \
- try.c -o try >/dev/null 2>&1 ; then
- set X $i_time $i_systime $i_systimek $sysselect $s_timeval
+ set try $i_time $i_systime $i_systimek $sysselect $s_timeval $s_timezone
+ if eval $compile; then
+ set X $i_time $i_systime $i_systimek $sysselect $s_timeval
shift
flags="$*"
echo " "
@@ -8932,7 +9337,8 @@ main() {
#endif
}
EOCP
-if $cc $ccflags -DTRYBITS fd_set.c -o fd_set >fd_set.out 2>&1 ; then
+set fd_set -DTRYBITS
+if eval $compile; then
d_fds_bits="$define"
d_fd_set="$define"
echo "Well, your system knows about the normal fd_set typedef..." >&4
@@ -8949,7 +9355,8 @@ else
$cat <<'EOM'
Hmm, your compiler has some difficulty with fd_set. Checking further...
EOM
- if $cc $ccflags fd_set.c -o fd_set >fd_set.out 2>&1 ; then
+ set fd_set
+ if eval $compile; then
d_fds_bits="$undef"
d_fd_set="$define"
echo "Well, your system has some sort of fd_set available..." >&4
@@ -8971,73 +9378,50 @@ EOM
fi
$rm -f fd_set*
-
-: check for type of arguments to select. This will only really
-: work if the system supports prototypes and provides one for
-: select.
-case "$d_select" in
-$define)
- : Make initial guess
- case "$selecttype" in
- ''|' ')
- case "$d_fd_set" in
- $define) xxx='fd_set *' ;;
- *) xxx='int *' ;;
+: check for type of arguments to select.
+case "$selecttype" in
+'') case "$d_select" in
+ $define)
+ $cat <<EOM
+Checking to see what type of arguments are accepted by select().
+EOM
+ hdrs="$define sys/types.h
+ $i_systime sys/time.h
+ $i_sysselct sys/select.h
+ $d_socket sys/socket.h"
+ : The first arg can be int, unsigned, or size_t
+ : The last arg may or may not be 'const'
+ val=''
+ for xxx in 'fd_set *' 'int *'; do
+ for nfd in 'int' 'size_t' 'unsigned' ; do
+ for tmo in 'struct timeval *' 'const struct timeval *'; do
+ case "$val" in
+ '') try="extern select _(($nfd, $xxx, $xxx, $xxx, $tmo));"
+ if ./protochk "$try" $hdrs; then
+ echo "Your system accepts $xxx."
+ val="$xxx"
+ fi
+ ;;
+ esac
+ done
+ done
+ done
+ case "$val" in
+ '') rp='What is the type for the 2nd, 3rd, and 4th arguments to select?'
+ case "$d_fd_set" in
+ $define) dflt="fd_set *" ;;
+ *) dflt="int *" ;;
+ esac
+ . ./myread
+ val=$ans
+ ;;
esac
+ selecttype="$val"
;;
- *) xxx="$selecttype"
+ *) : no select, so pick a harmless default
+ selecttype='int *'
;;
esac
- : backup guess
- case "$xxx" in
- 'fd_set *') yyy='int *' ;;
- 'int *') yyy='fd_set *' ;;
- esac
-
- $cat <<EOM
-
-Checking to see what type of arguments are expected by select().
-EOM
- $cat >try.c <<EOCP
-#$i_systime I_SYS_TIME
-#$i_sysselct I_SYS_SELECT
-#$d_socket HAS_SOCKET
-#include <sys/types.h>
-#ifdef HAS_SOCKET
-#include <sys/socket.h> /* Might include <sys/bsdtypes.h> */
-#endif
-#ifdef I_SYS_TIME
-#include <sys/time.h>
-#endif
-#ifdef I_SYS_SELECT
-#include <sys/select.h>
-#endif
-main()
-{
- int width;
- Select_fd_set_t readfds;
- Select_fd_set_t writefds;
- Select_fd_set_t exceptfds;
- struct timeval timeout;
- select(width, readfds, writefds, exceptfds, &timeout);
- exit(0);
-}
-EOCP
- if $cc $ccflags -c -DSelect_fd_set_t="$xxx" try.c >/dev/null 2>&1 ; then
- selecttype="$xxx"
- echo "Your system uses $xxx for the arguments to select." >&4
- elif $cc $ccflags -c -DSelect_fd_set_t="$yyy" try.c >/dev/null 2>&1 ; then
- selecttype="$yyy"
- echo "Your system uses $yyy for the arguments to select." >&4
- else
- rp='What is the type for the 2nd, 3rd, and 4th arguments to select?'
- dflt="$xxx"
- . ./myread
- selecttype="$ans"
- fi
- $rm -f try.[co]
- ;;
-*) selecttype='int *'
;;
esac
@@ -9175,8 +9559,8 @@ EOP
$cat >signal_cmd <<EOS
$startsh
$test -s signal.lst && exit 0
-if $cc $ccflags $ldflags signal.c -o signal >/dev/null 2>&1; then
- ./signal | $sort -n +1 | $uniq | $awk -f signal.awk >signal.lst
+if $cc $optimize $ccflags $ldflags -o signal signal.c $libs >/dev/null 2>&1; then
+ ./signal$_exe | $sort -n +1 | $uniq | $awk -f signal.awk >signal.lst
else
echo "(I can't seem be able to compile the test program -- Guessing)"
echo 'kill -l' >signal
@@ -9189,27 +9573,25 @@ else
echo \$@ | $tr ' ' '\012' | \
$awk '{ printf \$1; printf " %d\n", ++s; }' >signal.lst
fi
-$rm -f signal.c signal signal.o
+$rm -f signal.c signal signal$_o
EOS
chmod a+x signal_cmd
$eunicefix signal_cmd
: generate list of signal names
echo " "
-case "$sig_name" in
-'') sig_num='' ;;
-esac
-case "$sig_num" in
-'') sig_name='' ;;
-esac
-case "$sig_name" in
+case "$sig_name_init" in
'')
echo "Generating a list of signal names and numbers..." >&4
./signal_cmd
sig_name=`$awk '{printf "%s ", $1}' signal.lst`
sig_name="ZERO $sig_name"
- sig_num=`$awk '{printf "%d ", $2}' signal.lst`
- sig_num="0 $sig_num"
+ sig_name_init=`$awk 'BEGIN { printf "\"ZERO\", " }
+ { printf "\"%s\", ", $1 }
+ END { printf "0\n" }' signal.lst`
+ sig_num=`$awk 'BEGIN { printf "0, " }
+ { printf "%d, ", $2}
+ END { printf "0\n"}' signal.lst`
;;
esac
echo "The following signals are available:"
@@ -9230,15 +9612,6 @@ echo $sig_name | $awk \
}'
$rm -f signal signal.c signal.awk signal.lst signal_cmd
-: see what type is used for size_t
-set size_t sizetype 'unsigned int' stdio.h sys/types.h
-eval $typedef
-dflt="$sizetype"
-echo " "
-rp="What type is used for the length parameter for string functions?"
-. ./myread
-sizetype="$ans"
-
: see what type is used for signed size_t
set ssize_t ssizetype int stdio.h sys/types.h
eval $typedef
@@ -9256,23 +9629,16 @@ main()
printf("int\n");
else
printf("long\n");
- fflush(stdout);
exit(0);
}
EOM
echo " "
-# If $libs contains -lsfio, and sfio is mis-configured, then it
-# sometimes (apparently) runs and exits with a 0 status, but with no
-# output!. Thus we check with test -s whether we actually got any
-# output. I think it has to do with sfio's use of _exit vs. exit,
-# but I don't know for sure. --Andy Dougherty 1/27/97.
-if $cc $optimize $ccflags $ldflags -o ssize ssize.c $libs > /dev/null 2>&1 &&
- ./ssize > ssize.out 2>/dev/null && test -s ssize.out ; then
- ssizetype=`$cat ssize.out`
+set ssize
+if eval $compile && ./ssize > /dev/null; then
+ ssizetype=`./ssize`
echo "I'll be using $ssizetype for functions returning a byte count." >&4
else
$cat >&4 <<EOM
-
Help! I can't compile and run the ssize_t test program: please enlighten me!
(This is probably a misconfiguration in your system or libraries, and
you really ought to fix it. Still, I'll try anyway.)
@@ -9285,216 +9651,7 @@ EOM
. ./myread
ssizetype="$ans"
fi
-$rm -f ssize ssize.[co] ssize.out
-
-: see if this is a netdb.h system
-set netdb.h i_netdb
-eval $inhdr
-
-: check for type of arguments to gethostbyaddr. This will only really
-: work if the system supports prototypes and provides one for
-: gethostbyaddr. The netdb_host_type and netdb_hlen_type get defined.
-case "$d_gethbyaddr" in
-$define)
- if test "X$netdb_host_type" = X -o "X$netdb_hlen_type" = X; then
- $cat <<EOM
-
-Checking to see what type of arguments are expected by gethostbyaddr().
-EOM
- $cat >try.c <<EOCP
-#include <sys/types.h>
-#$i_niin I_NIIN
-#$i_netdb I_NETDB
-#$i_unistd I_UNISTD
-#$d_socket HAS_SOCKET
-#$d_socket HAS_SOCKET
-#ifdef HAS_SOCKET
-#include <sys/socket.h> /* Might include <sys/bsdtypes.h> */
-#endif
-#ifdef I_NIIN
-#include <netinet/in.h>
-#endif
-#ifdef I_NETDB
-#include <netdb.h>
-#endif
-#ifdef I_UNISTD
-#include <unistd.h>
-#endif
-#define Size_t $sizetype
-main()
-{
- Netdb_alen_t alen = sizeof(struct in_addr);
- Netdb_addr_t addr = (Netdb_addr_t)malloc(alen);
- struct hostent* hent;
-
- extern struct hostent *gethostbyaddr(Netdb_addr_t, Netdb_alen_t, int);
-
- /* We do not execute this so the arguments matter not. */
- hent = gethostbyaddr(addr, alen, AF_INET);
-
- exit(0);
-}
-EOCP
- for xxx in in_addr_t "const void *" "const char *" "void *" "char *"; do
- for yyy in Size_t long int; do
- if $cc $ccflags -c -DNetdb_addr_t="$xxx" -DNetdb_alen_t="$yyy" try.c >/dev/null 2>&1 ; then
- netdb_host_type="$xxx"
- netdb_hlen_type="$yyy"
- $cat >&4 <<EOM
-Your system accepts $xxx for the 1st argument to gethostbyaddr.
-and the 2nd argument to gethostbyaddr can be $yyy.
-EOM
- break
- fi
- done
- test "X$netdb_host_type" != X && break
- done
- if test "X$netdb_host_type" = X; then
- rp='What is the type for the 1st argument to gethostbyaddr?'
- dflt="void *"
- . ./myread
- netdb_host_type="$ans"
-
- # Remove the "const" if needed.
- netdb_host_type=`echo "$netdb_host_type" | sed 's/^const //'`
-
- rp='What is the type for the 2nd argument to gethostbyaddr ?'
- dflt="Size_t"
- . ./myread
- netdb_hlen_type="$ans"
- fi
- $rm -f try.[co]
- else
- $cat >&4 <<EOM
-Your system accepts $netdb_host_type for the 1st argument to gethostbyaddr.
-and the 2nd argument to gethostbyaddr can be $netdb_hlen_type.
-EOM
- fi
- ;;
-*) netdb_host_type='void *'
- netdb_hlen_type='Size_t'
- ;;
-esac
-
-: check for type of arguments to gethostbyname. This will only really
-: work if the system supports prototypes and provides one for
-: gethostbyname. The netdb_name_type gets defined.
-case "$d_gethbyname" in
-$define)
- if test "X$netdb_name_type" = X; then
- $cat <<EOM
-
-Checking to see what type of arguments are expected by gethostbyname().
-EOM
- $cat >try.c <<EOCP
-#$i_niin I_NIIN
-#$i_netdb I_NETDB
-#$d_socket HAS_SOCKET
-#$d_socket HAS_SOCKET
-#include <sys/types.h>
-#ifdef HAS_SOCKET
-#include <sys/socket.h> /* Might include <sys/bsdtypes.h> */
-#endif
-#ifdef I_NIIN
-#include <netinet/in.h>
-#endif
-#ifdef I_NETDB
-#include <netdb.h>
-#endif
-main()
-{
- char* host = "localhost";
- struct hostent* hent;
-
- extern struct hostent *gethostbyname(Netdb_name_t);
-
- /* We do not execute this so the arguments matter not. */
- hent = gethostbyname(host);
-
- exit(0);
-}
-EOCP
- for xxx in "const char *" "char *"; do
- if $cc $ccflags -c -DNetdb_name_t="$xxx" try.c >/dev/null 2>&1 ; then
- netdb_name_type="$xxx"
- echo "Your system accepts $xxx for the 1st argument to gethostbyname." >&4
- break
- fi
- done
- if test "X$netdb_name_type" = X; then
- rp='What is the type for the 1st argument to gethostbyname?'
- dflt="char *"
- . ./myread
- netdb_name_type="$ans"
- fi
- $rm -f try.[co]
- else
- echo "Your system accepts $netdb_name_type for the 1st argument to gethostbyname." >&4
- fi
- ;;
-*) netdb_name_type='char *'
- ;;
-esac
-
-: check for type of arguments to getnetbyaddr. This will only really
-: work if the system supports prototypes and provides one for
-: getnetbyaddr. The netdb_net_type gets defined.
-case "$d_getnbyaddr" in
-$define)
- if test "X$netdb_net_type" = X; then
- $cat <<EOM
-
-Checking to see what type of arguments are expected by getnetbyaddr().
-EOM
- $cat >try.c <<EOCP
-#$i_niin I_NIIN
-#$i_netdb I_NETDB
-#$d_socket HAS_SOCKET
-#$d_socket HAS_SOCKET
-#include <sys/types.h>
-#ifdef HAS_SOCKET
-#include <sys/socket.h> /* Might include <sys/bsdtypes.h> */
-#endif
-#ifdef I_NIIN
-#include <netinet/in.h>
-#endif
-#ifdef I_NETDB
-#include <netdb.h>
-#endif
-main()
-{
- Netdb_net_t net;
- struct netent* nent;
-
- extern struct netent *getnetbyaddr(Netdb_net_t, int);
-
- /* We do not execute this so the arguments matter not. */
- nent = getnetbyaddr(net, 2);
-
- exit(0);
-}
-EOCP
- for xxx in in_addr_t "unsigned long" long "unsigned int" int; do
- if $cc $ccflags -c -DNetdb_net_t="$xxx" try.c >/dev/null 2>&1 ; then
- netdb_net_type="$xxx"
- echo "Your system accepts $xxx for the 1st argument to getnetbyaddr." >&4
- break
- fi
- done
- if test "X$netdb_net_type" = X; then
- rp='What is the type for the 1st argument to getnetbyaddr?'
- dflt="long"
- . ./myread
- netdb_net_type="$ans"
- fi
- $rm -f try.[co]
- else
- echo "Your system accepts $netdb_net_type for the 1st argument to getnetbyaddr." >&4
- fi
- ;;
-*) netdb_net_type='long'
- ;;
-esac
+$rm -f ssize ssize.*
: see what type of char stdio uses.
echo " "
@@ -9905,7 +10062,7 @@ if $cc -c $ccflags -D\$1 varargs.c >/dev/null 2>&1; then
else
echo "false"
fi
-$rm -f varargs.o
+$rm -f varargs$_o
EOP
chmod +x varargs
@@ -10037,89 +10194,6 @@ val="$t_gdbm"
set i_gdbm
eval $setvar
-: test whether pthreads are created in joinable -- aka undetached -- state
-if test "X$usethreads" != X; then
- if test "X$d_pthreads_created_joinable" = X; then
- echo >&4 "Checking whether pthreads are created joinable."
- $cat >try.c <<EOCP
-#include <pthread.h>
-#include <stdio.h>
-int main() {
- pthread_attr_t attr;
- int detachstate;
- printf("%s\n",
- pthread_attr_init(&attr) == 0 &&
- pthread_attr_getdetachstate(&attr, &detachstate) == 0 &&
- detachstate == PTHREAD_CREATE_DETACHED ?
- "detached" : "joinable");
- exit(0);
-}
-EOCP
- if $cc $ccflags $ldflags -o try try.c $libs >/dev/null 2>&1; then
- yyy=`./try`
- case "$yyy" in
- detached)
- echo "Nope, they aren't."
- ;;
- *)
- echo "Yup, they are."
- ;;
- esac
- else
- echo "(I can't execute the test program--assuming they are.)"
- yyy=joinable
- fi
- case "$yyy" in
- detached)
- val="$undef"
- ;;
- *)
- val="$define"
- ;;
- esac
- set d_pthreads_created_joinable
- eval $setvar
- $rm -f try try.*
- fi
-else
- d_pthreads_created_joinable="$undef"
-fi
-
-: see whether the various POSIXish _yields exist within given cccmd
-$cat >try.c <<EOP
-#include <pthread.h>
-main() {
- YIELD();
- exit(0);
-}
-EOP
-: see if pthread_yield exists within given cccmd,
-: if we do not usethreads this may well end up undef.
-if $cc $ccflags -DYIELD=pthread_yield $ldflags -o try try.c $libs > /dev/null 2>&1; then
- val="$define"
- echo 'pthread_yield() found.' >&4
-else
- val="$undef"
- echo 'pthread_yield() NOT found.' >&4
-fi
-set d_pthread_yield
-eval $setvar
-
-: see if sched_yield exists within given cccmd,
-: if we do not usethreads this may well end up undef.
-if $cc $ccflags -DYIELD=sched_yield $ldflags -o try try.c $libs > /dev/null 2>&1; then
- val="$define"
- echo 'sched_yield() found.' >&4
-else
- val="$undef"
- echo 'sched_yield() NOT found.' >&4
-fi
-set d_sched_yield
-eval $setvar
-
-: common to both the pthread_yield and sched_yield tests
-rm -f try try.*
-
echo " "
echo "Looking for extensions..." >&4
cd ../ext
@@ -10182,11 +10256,11 @@ for xxx in $known_extensions ; do
esac
;;
Socket|socket) case "$d_socket" in
- $define) avail_ext="$avail_ext $xxx" ;;
+ true|$define|y) avail_ext="$avail_ext $xxx" ;;
esac
;;
Thread|thread) case "$usethreads" in
- $define) avail_ext="$avail_ext $xxx" ;;
+ true|$define|y) avail_ext="$avail_ext $xxx" ;;
esac
;;
*) avail_ext="$avail_ext $xxx"
@@ -10330,15 +10404,17 @@ echo "Creating config.sh..." >&4
$spitshell <<EOT >config.sh
$startsh
#
-# This file was produced by running the Configure script. It holds all
-# the definitions figured out by Configure. Should you modify any of
-# these values, do not forget to propagate your changes by running
-# "Configure -S"; or, equivalently, you may run each .SH file yourself.
+# This file was produced by running the Configure script. It holds all the
+# definitions figured out by Configure. Should you modify one of these values,
+# do not forget to propagate your changes by running "Configure -der". You may
+# instead choose to run each of the .SH files by yourself, or "Configure -S".
#
+# Package name : $package
+# Source directory : $src
# Configuration time: $cf_time
-# Configured by: $cf_by
-# Target system: $myuname
+# Configured by : $cf_by
+# Target system : $myuname
Author='$Author'
Date='$Date'
@@ -10351,6 +10427,9 @@ RCSfile='$RCSfile'
Revision='$Revision'
Source='$Source'
State='$State'
+_a='$_a'
+_exe='$_exe'
+_o='$_o'
afs='$afs'
alignbytes='$alignbytes'
aphostname='$aphostname'
@@ -10406,7 +10485,6 @@ d_bcopy='$d_bcopy'
d_bincompat3='$d_bincompat3'
d_bsd='$d_bsd'
d_bsdgetpgrp='$d_bsdgetpgrp'
-d_bsdpgrp='$d_bsdpgrp'
d_bsdsetpgrp='$d_bsdsetpgrp'
d_bzero='$d_bzero'
d_casti32='$d_casti32'
@@ -10444,27 +10522,17 @@ d_fpathconf='$d_fpathconf'
d_fsetpos='$d_fsetpos'
d_ftime='$d_ftime'
d_getgrps='$d_getgrps'
-d_setgrps='$d_setgrps'
d_gethbyaddr='$d_gethbyaddr'
-netdb_host_type='$netdb_host_type'
-netdb_hlen_type='$netdb_hlen_type'
d_gethbyname='$d_gethbyname'
-netdb_name_type='$netdb_name_type'
d_gethent='$d_gethent'
d_gethname='$d_gethname'
d_getlogin='$d_getlogin'
d_getnbyaddr='$d_getnbyaddr'
-d_getnbyname='$d_getnbyname'
-netdb_net_type='$netdb_net_type'
d_getpgid='$d_getpgid'
d_getpgrp2='$d_getpgrp2'
d_getpgrp='$d_getpgrp'
d_getppid='$d_getppid'
d_getprior='$d_getprior'
-d_getpbyname='$d_getpbyname'
-d_getpbynumber='$d_getpbynumber'
-d_getsbyname='$d_getsbyname'
-d_getsbyport='$d_getsbyport'
d_gettimeod='$d_gettimeod'
d_gnulibc='$d_gnulibc'
d_htonl='$d_htonl'
@@ -10493,7 +10561,6 @@ d_msgrcv='$d_msgrcv'
d_msgsnd='$d_msgsnd'
d_mymalloc='$d_mymalloc'
d_nice='$d_nice'
-d_oldarchlib='$d_oldarchlib'
d_oldsock='$d_oldsock'
d_open3='$d_open3'
d_pathconf='$d_pathconf'
@@ -10527,6 +10594,7 @@ d_semget='$d_semget'
d_semop='$d_semop'
d_setegid='$d_setegid'
d_seteuid='$d_seteuid'
+d_setgrps='$d_setgrps'
d_setlinebuf='$d_setlinebuf'
d_setlocale='$d_setlocale'
d_setpgid='$d_setpgid'
@@ -10743,13 +10811,15 @@ mydomain='$mydomain'
myhostname='$myhostname'
myuname='$myuname'
n='$n'
+netdb_hlen_type='$netdb_hlen_type'
+netdb_host_type='$netdb_host_type'
+netdb_name_type='$netdb_name_type'
+netdb_net_type='$netdb_net_type'
nm_opt='$nm_opt'
nm_so_opt='$nm_so_opt'
nroff='$nroff'
o_nonblock='$o_nonblock'
obj_ext='$obj_ext'
-oldarchlib='$oldarchlib'
-oldarchlibexp='$oldarchlibexp'
optimize='$optimize'
orderlib='$orderlib'
osname='$osname'
@@ -10764,6 +10834,7 @@ perladmin='$perladmin'
perlpath='$perlpath'
pg='$pg'
phostname='$phostname'
+pidtype='$pidtype'
plibpth='$plibpth'
pmake='$pmake'
pr='$pr'
@@ -10791,6 +10862,7 @@ shortsize='$shortsize'
shrpenv='$shrpenv'
shsharp='$shsharp'
sig_name='$sig_name'
+sig_name_init='$sig_name_init'
sig_num='$sig_num'
signal_t='$signal_t'
sitearch='$sitearch'
@@ -10808,6 +10880,7 @@ sort='$sort'
spackage='$spackage'
spitshell='$spitshell'
split='$split'
+src='$src'
ssizetype='$ssizetype'
startperl='$startperl'
startsh='$startsh'
@@ -10816,6 +10889,7 @@ stdchar='$stdchar'
stdio_base='$stdio_base'
stdio_bufsiz='$stdio_bufsiz'
stdio_cnt='$stdio_cnt'
+stdio_filbuf='$stdio_filbuf'
stdio_ptr='$stdio_ptr'
strings='$strings'
submit='$submit'
@@ -10841,6 +10915,7 @@ useperlio='$useperlio'
useposix='$useposix'
usesfio='$usesfio'
useshrplib='$useshrplib'
+usethreads='$usethreads'
usevfork='$usevfork'
usrinc='$usrinc'
uuname='$uuname'
@@ -10852,8 +10927,8 @@ zip='$zip'
EOT
: add special variables
-$test -f patchlevel.h && \
-awk '/^#define/ {printf "%s=%s\n",$2,$3}' patchlevel.h >>config.sh
+$test -f $src/patchlevel.h && \
+awk '/^#define/ {printf "%s=%s\n",$2,$3}' $src/patchlevel.h >>config.sh
echo "CONFIG=true" >>config.sh
: propagate old symbols
@@ -10947,6 +11022,17 @@ else
echo "Done."
fi
+if $test -f Policy.sh; then
+ $cat <<EOM
+
+If you compile $package on a different machine or from a different object
+directory, copy the Policy.sh file from this object directory to the
+new one before you run Configure -- this will help you with most of
+the policy defaults.
+
+EOM
+fi
+
$rm -f kit*isdone ark*isdone
$rm -rf UU
diff --git a/INSTALL b/INSTALL
index 4814d84bf9..782cd9483d 100644
--- a/INSTALL
+++ b/INSTALL
@@ -363,17 +363,12 @@ above.
The directories site_perl and site_perl/archname are empty, but are
intended to be used for installing local or site-wide extensions. Perl
-will automatically look in these directories. Previously, most sites
-just put their local extensions in with the standard distribution.
+will automatically look in these directories.
In order to support using things like #!/usr/local/bin/perl5.004 after
a later version is released, architecture-dependent libraries are
stored in a version-specific directory, such as
-/usr/local/lib/perl5/archname/5.004/. In Perl 5.000 and 5.001, these
-files were just stored in /usr/local/lib/perl5/archname/. If you will
-not be using 5.001 binaries, you can delete the standard extensions from
-the /usr/local/lib/perl5/archname/ directory. Locally-added extensions
-can be moved to the site_perl and site_perl/archname directories.
+/usr/local/lib/perl5/archname/5.004/.
Again, these are just the defaults, and can be changed as you run
Configure.
@@ -866,8 +861,8 @@ and then re-run
=item No sh
-If you don't have sh, you'll have to copy the sample file config_H to
-config.h and edit the config.h to reflect your system's peculiarities.
+If you don't have sh, you'll have to copy the sample file Porting/config_H
+to config.h and edit the config.h to reflect your system's peculiarities.
You'll probably also have to extensively modify the extension building
mechanism.
diff --git a/MANIFEST b/MANIFEST
index 1acac3c4de..973e98fed3 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -4,7 +4,6 @@ Changes5.000 Differences between 4.x and 5.000
Changes5.001 Differences between 5.000 and 5.001
Changes5.002 Differences between 5.001 and 5.002
Changes5.003 Differences between 5.002 and 5.003
-configure.gnu Crude emulation of GNU configure
Configure Portability tool
Copying The GNU General Public License
EXTERN.h Included before foreign .h files
@@ -12,7 +11,10 @@ INSTALL Detailed installation instructions
INTERN.h Included before domestic .h files
MANIFEST This list of files
Makefile.SH A script that generates Makefile
+Policy_sh.SH Hold site-wide preferences between Configure runs.
Porting/Glossary Glossary of config.sh variables
+Porting/config.sh Sample config.sh
+Porting/config_H Sample config.h
Porting/makerel Release making utility
Porting/patchls Flexible patch file listing utility
Porting/pumpkin.pod Guidelines and hints for Perl maintainers
@@ -30,6 +32,7 @@ Todo The Wishlist
Todo.5.005 What needs doing before 5.005 release
XSLock.h Include file for extensions built with PERL_OBJECT defined
XSUB.h Include file for extension subroutines
+atomic.h Atomic refcount handling for multi-threading
av.c Array value code
av.h Array value header
bytecode.h Bytecode header for compiler
@@ -39,9 +42,9 @@ byterun.h Header for byterun.c
cc_runtime.h Macros need by runtime of compiler-generated code
cflags.SH A script that emits C compilation flags per file
compat3.sym List of symbols for binary-compatibility with 5.003
-config_H Sample config.h
config_h.SH Produces config.h
configpm Produces lib/Config.pm
+configure.gnu Crude emulation of GNU configure
cop.h Control operator header
cv.h Code value header
cygwin32/cw32imp.h Cygwin32 port
@@ -261,11 +264,11 @@ ext/Socket/Socket.xs Socket extension external subroutines
ext/Thread/Makefile.PL Thread extension makefile writer
ext/Thread/Notes Thread notes
ext/Thread/README Thread README
+ext/Thread/Thread.pm Thread extension Perl module
+ext/Thread/Thread.xs Thread extension external subroutines
ext/Thread/Thread/Queue.pm Thread synchronised queue objects
ext/Thread/Thread/Semaphore.pm Thread semaphore objects
ext/Thread/Thread/Specific.pm Thread specific data access
-ext/Thread/Thread.pm Thread extension Perl module
-ext/Thread/Thread.xs Thread extension external subroutines
ext/Thread/create.t Test thread creation
ext/Thread/die.t Test thread die()
ext/Thread/die2.t Test thread die() differently
@@ -479,6 +482,7 @@ lib/Text/Soundex.pm Perl module to implement Soundex
lib/Text/Tabs.pm Do expand and unexpand
lib/Text/Wrap.pm Paragraph formatter
lib/Tie/Array.pm Base class for tied arrays
+lib/Tie/Handle.pm Base class for tied handles
lib/Tie/Hash.pm Base class for tied hashes
lib/Tie/RefHash.pm Base class for tied hashes with references as keys
lib/Tie/Scalar.pm Base class for tied scalars
@@ -597,10 +601,10 @@ os2/diff.configure Patches to Configure
os2/dl_os2.c Addon for dl_open
os2/dlfcn.h Addon for dl_open
os2/os2.c Additional code for OS/2
+os2/os2.sym Additional symbols to export
os2/os2ish.h Header for OS/2
-os2/perl2cmd.pl Corrects installed binaries under OS/2
os2/os2thread.h pthread-like typedefs
-os2/os2.sym Additional symbols to export
+os2/perl2cmd.pl Corrects installed binaries under OS/2
patchlevel.h The current patch level of perl
perl.c main()
perl.h Global declarations
@@ -868,6 +872,7 @@ t/op/sysio.t See if sysread and syswrite work
t/op/taint.t See if tainting works
t/op/tie.t See if tie/untie functions work
t/op/tiearray.t See if tie for arrays works
+t/op/tiehandle.t See if tie for handles works
t/op/time.t See if time functions work
t/op/undef.t See if undef works
t/op/universal.t See if UNIVERSAL class works
@@ -973,8 +978,8 @@ win32/win32.c Win32 port
win32/win32.h Win32 port
win32/win32iop.h Win32 port
win32/win32sck.c Win32 port
-win32/win32thread.h Win32 port mapping to threads
win32/win32thread.c Win32 functions for threads
+win32/win32thread.h Win32 port mapping to threads
writemain.SH Generate perlmain.c from miniperlmain.c+extensions
x2p/EXTERN.h Same as above
x2p/INTERN.h Same as above
diff --git a/Makefile.SH b/Makefile.SH
index 4280570916..ebbdbe97cc 100644
--- a/Makefile.SH
+++ b/Makefile.SH
@@ -139,13 +139,12 @@ shellflags = $shellflags
# do it for you.
$make_set_make
-# These variables will be used in a future version to make
-# the make file more portable to non-unix systems.
+# These variables may need to be manually set for non-Unix systems.
AR = $ar
-EXE_EXT = $exe_ext
-LIB_EXT = $lib_ext
-OBJ_EXT = $obj_ext
-PATH_SEP = $path_sep
+EXE_EXT = $_exe
+LIB_EXT = $_a
+OBJ_EXT = $_o
+PATH_SEP = $p_
FIRSTMAKEFILE = $firstmakefile
@@ -187,15 +186,16 @@ h1 = EXTERN.h INTERN.h XSUB.h av.h config.h cop.h cv.h dosish.h
h2 = embed.h form.h gv.h handy.h hv.h keywords.h mg.h op.h
h3 = opcode.h patchlevel.h perl.h perly.h pp.h proto.h regcomp.h
h4 = regexp.h scope.h sv.h unixish.h util.h perlio.h thread.h
-h = $(h1) $(h2) $(h3) $(h4)
+h5 = bytecode.h byterun.h
+h = $(h1) $(h2) $(h3) $(h4) $(h5)
-c1 = $(mallocsrc) av.c scope.c op.c doop.c doio.c dump.c hv.c mg.c
+c1 = $(mallocsrc) av.c scope.c op.c doop.c doio.c dump.c hv.c mg.c byterun.c
c2 = perl.c perly.c pp.c pp_hot.c pp_ctl.c pp_sys.c regcomp.c regexec.c
c3 = gv.c sv.c taint.c toke.c util.c deb.c run.c universal.c globals.c perlio.c
c = $(c1) $(c2) $(c3) miniperlmain.c perlmain.c
-obj1 = $(mallocobj) gv$(OBJ_EXT) toke$(OBJ_EXT) perly$(OBJ_EXT) op$(OBJ_EXT) regcomp$(OBJ_EXT) dump$(OBJ_EXT) util$(OBJ_EXT) mg$(OBJ_EXT)
+obj1 = $(mallocobj) gv$(OBJ_EXT) toke$(OBJ_EXT) perly$(OBJ_EXT) op$(OBJ_EXT) regcomp$(OBJ_EXT) dump$(OBJ_EXT) util$(OBJ_EXT) mg$(OBJ_EXT) byterun$(OBJ_EXT)
obj2 = hv$(OBJ_EXT) av$(OBJ_EXT) run$(OBJ_EXT) pp_hot$(OBJ_EXT) sv$(OBJ_EXT) pp$(OBJ_EXT) scope$(OBJ_EXT) pp_ctl$(OBJ_EXT) pp_sys$(OBJ_EXT)
obj3 = doop$(OBJ_EXT) doio$(OBJ_EXT) regexec$(OBJ_EXT) taint$(OBJ_EXT) deb$(OBJ_EXT) universal$(OBJ_EXT) globals$(OBJ_EXT) perlio$(OBJ_EXT)
@@ -405,6 +405,10 @@ perly.c: perly.y
perly.h: perly.y
-@sh -c true
+SYM = global.sym interp.sym compat3.sym
+
+SYMH = perlvars.h thrdvar.h
+
# The following files are generated automatically
# keywords.h: keywords.pl
# opcode.h: opcode.pl
@@ -444,10 +448,10 @@ s_dummy $(static_ext): miniperl preplibrary $(DYNALOADER) FORCE
clean: _tidy _mopup
realclean: _cleaner _mopup
- @echo "Note that make realclean does not delete config.sh"
+ @echo "Note that make realclean does not delete config.sh or Policy.sh"
clobber: _cleaner _mopup
- rm -f config.sh cppstdin
+ rm -f config.sh cppstdin Policy.sh
distclean: clobber
@@ -505,7 +509,8 @@ $(FIRSTMAKEFILE): README $(MAKEDEPEND)
config.h: config_h.SH config.sh
$(SHELL) config_h.SH
-perl.exp: perl_exp.SH config.sh
+# This is an AIXism.
+perl.exp: perl_exp.SH config.sh $(SYM) $(SYMH)
$(SHELL) perl_exp.SH
# When done, touch perlmain.c so that it doesn't get remade each time.
diff --git a/Policy_sh.SH b/Policy_sh.SH
new file mode 100644
index 0000000000..831585422a
--- /dev/null
+++ b/Policy_sh.SH
@@ -0,0 +1,77 @@
+case $CONFIG in
+'') . ./config.sh ;;
+esac
+echo "Extracting Policy.sh (with variable substitutions)"
+$spitshell <<!GROK!THIS! >Policy.sh
+$startsh
+#
+# This file was produced by running the Policy_sh.SH script, which
+# gets its values from config.sh, which is generally produced by
+# running Configure.
+#
+# The idea here is to distill in one place the common site-wide
+# "policy" answers (such as installation directories) that are
+# to be "sticky". That is, if you keep the file Policy.sh around in
+# the same directory as you are building Perl, then Configure will
+# (by default) load up the Policy.sh file just before the
+# platform-specific hints file.
+#
+
+#Credits:
+# The original design for this Policy.sh file came from Wayne Davison,
+# maintainer of trn.
+# This version for Perl5.004_61 originally written by
+# Andy Dougherty <doughera@lafcol.lafayette.edu>.
+# This file may be distributed under the same terms as Perl itself.
+
+
+# Site-specific values
+
+perladmin='$perladmin'
+
+# Installation directives. Note that each one comes in three flavors.
+# For example, we have privlib, privlibexp, and installprivlib.
+# privlib is for private (to perl) library files.
+# privlibexp is the same, expcept any '~' the user gave to Configure
+# is expanded to the user's home directory. This is figured
+# out automatically by Configure, so you don't have to include it here.
+# installprivlib is for systems (such as those running AFS) that
+# need to distinguish between the place where things
+# get installed and where they finally will reside.
+# A full Glossary of all these config.sh variables is in the
+# Porting/Glossary file.
+
+# Installation Prefix.
+prefix='$prefix'
+
+bin='$bin'
+installbin='$installbin'
+
+scriptdir='$scriptdir'
+installscript='$installscript'
+
+privlib='$privlib'
+installprivlib='$installprivlib'
+
+archlib='$archlib'
+installarchlib='$installarchlib'
+
+sitearch='$sitearch'
+installsitearch='$installsitearch'
+
+sitelib='$sitelib'
+installsitelib='$installsitelib'
+
+# man1 and man3 manpage directories and extensions.
+man1dir='$man1dir'
+man1ext='$man1ext'
+installman1dir='$installman1dir'
+man3dir='$man3dir'
+man3ext='$man3ext'
+installman3dir='$installman3dir'
+
+# You may add additional items here, for example, to set the pager
+# to your local favorite value, uncomment
+# #pager='$pager'
+
+!GROK!THIS!
diff --git a/Porting/Glossary b/Porting/Glossary
index c71c199ec4..88c12cd48a 100644
--- a/Porting/Glossary
+++ b/Porting/Glossary
@@ -2,13 +2,34 @@ 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.
+_a (Unix.U):
+ This variable defines the extension used for ordinary libraries.
+ For unix, it is '.a'. The '.' is included. Other possible
+ values include '.lib'.
+
+_exe (Unix.U):
+ This variable defines the extension used for executable files.
+ For unix it is empty. Other possible values include '.exe'.
+
+_o (Unix.U):
+ This variable defines the extension used for object files.
+ For unix, it is '.o'. The '.' is included. Other possible
+ values include '.obj'.
+
+afs (afs.U):
+ This variable is set to 'true' if AFS (Andrew File System) is used
+ on the system, 'false' otherwise. It is possible to override this
+ with a hint value or command line option, but you'd better know
+ what you are doing.
+
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'.
+aphostname (d_gethname.U):
+ Thie variable contains the command which can be used to compute the
+ host name. The command is fully qualified by its absolute path, to make
+ it safe when used by a process with super-user privileges.
archlib (archlib.U):
This variable holds the name of the directory in which the user wants
@@ -21,6 +42,10 @@ archlibexp (archlib.U):
This variable is the same as the archlib variable, but is
filename expanded at configuration time, for convenient use.
+archname (archname.U):
+ This variable is a short name to characterize the current
+ architecture. It is used mainly to construct the default archlib.
+
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
@@ -28,6 +53,9 @@ archobjs (Unix.U):
or other facilities. For perl on OS/2, for example, this would
include os2/os2.obj.
+baserev (baserev.U):
+ The base revision level of this package, from the .package file.
+
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
@@ -38,6 +66,10 @@ bincompat3 (bincompat3.U):
This variable contains y if Perl 5.004 should be binary-compatible
with Perl 5.003.
+binexp (bin.U):
+ This is the same as the bin variable, but is filename expanded at
+ configuration time, for use in your makefiles.
+
byteorder (byteorder.U):
This variable holds the byte order. In the following, larger digits
indicate more significance. The variable byteorder is either 4321
@@ -82,10 +114,25 @@ 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_email (cf_email.U):
+ Electronic mail address of the person who ran Configure. This can be
+ used by units that require the user's e-mail, like MailList.U.
+
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.
+clocktype (d_times.U):
+ This variable holds the type returned by times(). It can be long,
+ or clock_t on BSD sites (in which case <sys/types.h> should be
+ included).
+
+contains (contains.U):
+ This variable holds the command to do a grep with a proper return
+ status. On most sane systems it is simply "grep". On insane systems
+ it is a grep followed by a cat followed by a test. This variable
+ is primarily for the use of other Configure units.
+
cpp_stuff (cpp_stuff.U):
This variable contains an identification of the catenation mechanism
used by the C preprocessor.
@@ -94,12 +141,24 @@ 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.
+cpplast (cppstdin.U):
+ This variable has the same functionality as cppminus, only it applies to
+ cpprun and not cppstdin.
+
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 "".
+cpprun (cppstdin.U):
+ This variable contains the command which will invoke a C preprocessor
+ on standard input and put the output to stdout. It is guaranteed not
+ to be a wrapper and may be a null string if no preprocessor can be
+ made directly available. This preprocessor might be different from the
+ one used by the C compiler. Don't forget to append cpplast after the
+ preprocessor options.
+
cppstdin (cppstdin.U):
This variable contains the command which will invoke the C
preprocessor on standard input and put the output to stdout.
@@ -140,22 +199,17 @@ d_bcopy (d_bcopy.U):
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.
+ with Perl 5.003. This is impossible for 5.004_50 and later, so
+ it is always $undef for those versions.
+
+d_bsd (Guess.U):
+ This symbol conditionally defines the symbol BSD when running on a
+ BSD system.
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.
@@ -186,6 +240,10 @@ d_chsize (d_chsize.U):
indicates to the C program that the chsize() routine is available
to truncate files. You might need a -lx to get this routine.
+d_closedir (d_closedir.U):
+ This variable conditionally defines HAS_CLOSEDIR if closedir() is
+ available.
+
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
@@ -223,6 +281,10 @@ 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_dlopen (d_dlopen.U):
+ This variable conditionally defines the HAS_DLOPEN symbol, which
+ indicates to the C program that the dlopen() 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
@@ -241,6 +303,10 @@ 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_eunice (Guess.U):
+ This variable conditionally defines the symbols EUNICE and VAX, which
+ alerts the C program that it must deal with ideosyncracies of VMS.
+
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
@@ -255,6 +321,22 @@ d_fcntl (d_fcntl.U):
This variable conditionally defines the HAS_FCNTL symbol, and indicates
whether the fcntl() function exists
+d_fd_macros (d_fd_set.U):
+ This variable contains the eventual value of the HAS_FD_MACROS symbol,
+ which indicates if your C compiler knows about the macros which
+ manipulate an fd_set.
+
+d_fd_set (d_fd_set.U):
+ This variable contains the eventual value of the HAS_FD_SET symbol,
+ which indicates if your C compiler knows about the fd_set typedef.
+
+d_fds_bits (d_fd_set.U):
+ This variable contains the eventual value of the HAS_FDS_BITS symbol,
+ which indicates if your fd_set typedef contains the fds_bits member.
+ If you have an fd_set typedef, but the dweebs who installed it did
+ a half-fast job and neglected to provide the macros to manipulate
+ an fd_set, HAS_FDS_BITS will let us know how to fix the gaffe.
+
d_fgetpos (d_fgetpos.U):
This variable conditionally defines HAS_FGETPOS if fgetpos() is
available to get the file position indicator.
@@ -282,38 +364,53 @@ d_fsetpos (d_fsetpos.U):
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.
+ 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_getgrps (d_getgrps.U):
+ This variable conditionally defines the HAS_GETGROUPS symbol, which
+ indicates to the C program that the getgroups() routine is available
+ to get the list of process groups.
+
+d_gethbyaddr (d_gethbyad.U):
+ This variable conditionally defines the HAS_GETHOSTBYADDR symbol, which
+ indicates to the C program that the gethostbyaddr() routine is available
+ to look up hosts by their IP addresses.
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_gethname (d_gethname.U):
+ This variable conditionally defines the HAS_GETHOSTNAME symbol, which
+ indicates to the C program that the gethostname() routine may be
+ used to derive the host name.
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_getnbyaddr (d_getnbyad.U):
+ This variable conditionally defines the HAS_GETNETBYADDR symbol, which
+ indicates to the C program that the getnetbyaddr() routine is available
+ to look up networks by their IP addresses.
+
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_getpgrp (d_getpgrp.U):
+ This variable conditionally defines HAS_GETPGRP if getpgrp() 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
@@ -323,6 +420,14 @@ d_getprior (d_getprior.U):
This variable conditionally defines HAS_GETPRIORITY if getpriority()
is available to get a process's priority.
+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). You should probably include <sys/resource.h>.
+
+d_gnulibc (d_gnulibc.U):
+ Defined if we're dealing with the GNU C Library.
+
d_htonl (d_htonl.U):
This variable conditionally defines HAS_HTONL if htonl() and its
friends are available to do network order byte swapping.
@@ -413,6 +518,22 @@ d_msg (d_msg.U):
This variable conditionally defines the HAS_MSG symbol, which
indicates that the entire msg*(2) library is present.
+d_msgctl (d_msgctl.U):
+ This variable conditionally defines the HAS_MSGCTL symbol, which
+ indicates to the C program that the msgctl() routine is available.
+
+d_msgget (d_msgget.U):
+ This variable conditionally defines the HAS_MSGGET symbol, which
+ indicates to the C program that the msgget() routine is available.
+
+d_msgrcv (d_msgrcv.U):
+ This variable conditionally defines the HAS_MSGRCV symbol, which
+ indicates to the C program that the msgrcv() routine is available.
+
+d_msgsnd (d_msgsnd.U):
+ This variable conditionally defines the HAS_MSGSND symbol, which
+ indicates to the C program that the msgsnd() routine is available.
+
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.
@@ -422,10 +543,9 @@ 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_oldsock (d_socket.U):
+ This variable conditionally defines the OLDSOCKET symbol, which
+ indicates that the BSD socket interface is based on 4.1c and not 4.2.
d_open3 (d_open3.U):
This variable conditionally defines the HAS_OPEN3 manifest constant,
@@ -443,6 +563,11 @@ d_pause (d_pause.U):
indicates to the C program that the pause() routine is available
to suspend a process until a signal is received.
+d_phostname (d_gethname.U):
+ This variable conditionally defines the PHOSTNAME symbol, which
+ contains the shell command which, when fed to popen(), may be
+ used to derive the host name.
+
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
@@ -453,6 +578,21 @@ d_poll (d_poll.U):
indicates to the C program that the poll() routine is available
to poll active file descriptors.
+d_portable (d_portable.U):
+ This variable conditionally defines the PORTABLE symbol, which
+ indicates to the C program that it should not assume that it is
+ running on the machine it was compiled on.
+
+d_pthread_yield (d_pthread_y.U):
+ This variable conditionally defines the HAS_PTHREAD_YIELD
+ symbol if the pthread_yield routine is available to yield
+ the execution of the current thread.
+
+d_pthreads_created_joinable (d_pthreadj.U):
+ This variable conditionally defines the PTHREADS_CREATED_JOINABLE
+ symbol if pthreads are created in the joinable (aka undetached)
+ state.
+
d_pwage (i_pwd.U):
This varaible conditionally defines PWAGE, which indicates
that struct passwd contains pw_age.
@@ -512,6 +652,11 @@ d_sanemcmp (d_sanemcmp.U):
the memcpy() routine is available and can be used to compare relative
magnitudes of chars with their high bits set.
+d_sched_yield (d_pthread_y.U):
+ This variable conditionally defines the HAS_SCHED_YIELD
+ symbol if the sched_yield routine is available to yield
+ the execution of the current thread.
+
d_seekdir (d_readdir.U):
This variable conditionally defines HAS_SEEKDIR if seekdir() is
available.
@@ -525,6 +670,18 @@ d_sem (d_sem.U):
This variable conditionally defines the HAS_SEM symbol, which
indicates that the entire sem*(2) library is present.
+d_semctl (d_semctl.U):
+ This variable conditionally defines the HAS_SEMCTL symbol, which
+ indicates to the C program that the semctl() routine is available.
+
+d_semget (d_semget.U):
+ This variable conditionally defines the HAS_SEMGET symbol, which
+ indicates to the C program that the semget() routine is available.
+
+d_semop (d_semop.U):
+ This variable conditionally defines the HAS_SEMOP symbol, which
+ indicates to the C program that the semop() routine is available.
+
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
@@ -535,6 +692,11 @@ d_seteuid (d_seteuid.U):
indicates to the C program that the seteuid() routine is available
to change the effective uid of the current program.
+d_setgrps (d_setgrps.U):
+ This variable conditionally defines the HAS_SETGROUPS symbol, which
+ indicates to the C program that the setgroups() routine is available
+ to set the list of process groups.
+
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
@@ -546,19 +708,18 @@ d_setlocale (d_setlocale.U):
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.
+ This variable conditionally defines the HAS_SETPGID symbol if the
+ setpgid(pid, gpid) function is available to set process group ID.
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_setpgrp (d_setpgrp.U):
+ This variable conditionally defines HAS_SETPGRP if setpgrp() 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.
@@ -605,11 +766,27 @@ d_shm (d_shm.U):
This variable conditionally defines the HAS_SHM symbol, which
indicates that the entire shm*(2) library is present.
+d_shmat (d_shmat.U):
+ This variable conditionally defines the HAS_SHMAT symbol, which
+ indicates to the C program that the shmat() routine is available.
+
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_shmctl (d_shmctl.U):
+ This variable conditionally defines the HAS_SHMCTL symbol, which
+ indicates to the C program that the shmctl() routine is available.
+
+d_shmdt (d_shmdt.U):
+ This variable conditionally defines the HAS_SHMDT symbol, which
+ indicates to the C program that the shmdt() routine is available.
+
+d_shmget (d_shmget.U):
+ This variable conditionally defines the HAS_SHMGET symbol, which
+ indicates to the C program that the shmget() routine is available.
+
d_sigaction (d_sigaction.U):
This variable conditionally defines the HAS_SIGACTION symbol, which
indicates that the Vr4 sigaction() routine is available.
@@ -709,6 +886,10 @@ d_sysconf (d_sysconf.U):
indicates to the C program that the sysconf() routine is available
to determine system related limits and options.
+d_sysernlst (d_strerror.U):
+ This variable conditionally defines HAS_SYS_ERRNOLIST if sys_errnolist[]
+ is available to translate error numbers to the symbolic name.
+
d_syserrlst (d_strerror.U):
This variable conditionally defines HAS_SYS_ERRLIST if sys_errlist[] is
available to translate error numbers to strings.
@@ -731,6 +912,11 @@ d_telldir (d_readdir.U):
This variable conditionally defines HAS_TELLDIR if telldir() is
available.
+d_time (d_time.U):
+ This variable conditionally defines the HAS_TIME symbol, which indicates
+ that the time() routine exists. The time() routine is normaly
+ provided on UNIX systems.
+
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
@@ -762,6 +948,17 @@ d_void_closedir (d_closedir.U):
This variable conditionally defines VOID_CLOSEDIR if closedir()
does not return a value.
+d_voidsig (d_voidsig.U):
+ This variable conditionally defines VOIDSIG if this system
+ declares "void (*signal(...))()" in signal.h. The old way was to
+ declare it as "int (*signal(...))()".
+
+d_voidtty (i_sysioctl.U):
+ This variable conditionally defines USE_IOCNOTTY to indicate that the
+ ioctl() call with TIOCNOTTY should be used to void tty association.
+ Otherwise (on USG probably), it is enough to close the standard file
+ decriptors and do a setpgrp().
+
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
@@ -790,6 +987,10 @@ d_wctomb (d_wctomb.U):
indicates to the C program that the wctomb() routine is available
to convert a wide character to a multibyte.
+d_xenix (Guess.U):
+ This variable conditionally defines the symbol XENIX, which alerts
+ the C program that it runs under Xenix.
+
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
@@ -828,8 +1029,13 @@ eunicefix (Init.U):
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'.
+ This is an old synonym for _exe.
+
+extensions (Extensions.U):
+ This variable holds a list of all extension files
+ linked into the package. It is propagated to Config.pm
+ and is typically used to test whether a particular extesion
+ is available.
firstmakefile (Unix.U):
This variable defines the first file searched by make. On unix,
@@ -859,21 +1065,68 @@ full_sed (Loc_sed.U):
can share this executable will have the same full pathname to
'sed.'
+gccversion (cc.U):
+ If GNU cc (gcc) is used, this variable holds '1' or '2' to
+ indicate whether the compiler is version 1 or 2. This is used in
+ setting some of the default cflags. It is set to '' if not gcc.
+
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.
+groupcat (nis.U):
+ This variable contains a command that produces the text of the
+ /etc/group file. This is normally "cat /etc/group", but can be
+ "ypcat group" when NIS is used.
+
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.
+ getgroups() and setgroups(). Usually, this is the same as
+ gidtype (gid_t), but sometimes it isn't.
+
+h_fcntl (h_fcntl.U):
+ This is variable gets set in various places to tell i_fcntl that
+ <fcntl.h> should be included.
+
+h_sysfile (h_sysfile.U):
+ This is variable gets set in various places to tell i_sys_file that
+ <sys/file.h> should be included.
+
+hint (Oldconfig.U):
+ Gives the type of hints used for previous answers. May be one of
+ "default", "recommended" or "previous".
+
+hostcat (nis.U):
+ This variable contains a command that produces the text of the
+ /etc/hosts file. This is normally "cat /etc/hosts", but can be
+ "ypcat hosts" when NIS is used.
+
+huge (models.U):
+ This variable contains a flag which will tell the C compiler and loader
+ to produce a program running with a huge memory model. If the
+ huge model is not supported, contains the flag to produce large
+ model programs. It is up to the Makefile to use this.
+
+i_bsdioctl (i_sysioctl.U):
+ This variable conditionally defines the I_SYS_BSDIOCTL symbol, which
+ indicates to the C program that <sys/bsdioctl.h> exists and should
+ be included.
+
+i_db (i_db.U):
+ This variable conditionally defines the I_DB symbol, and indicates
+ whether a C program may include Berkeley's DB include file <db.h>.
i_dirent (i_dirent.U):
This variable conditionally defines I_DIRENT, which indicates
to the C program that it should include <dirent.h>.
+i_dld (i_dld.U):
+ This variable conditionally defines the I_DLD symbol, which
+ indicates to the C program that <dld.h> (GNU dynamic loading)
+ exists and should be included.
+
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
@@ -901,6 +1154,10 @@ i_locale (i_locale.U):
This variable conditionally defines the I_LOCALE symbol,
and indicates whether a C program should include <locale.h>.
+i_malloc (i_malloc.U):
+ This variable conditionally defines the I_MALLOC symbol, and indicates
+ whether a C program should include <malloc.h>.
+
i_math (i_math.U):
This variable conditionally defines the I_MATH symbol, and indicates
whether a C program may include <math.h>.
@@ -909,6 +1166,10 @@ i_memory (i_memory.U):
This variable conditionally defines the I_MEMORY symbol, and indicates
whether a C program should include <memory.h>.
+i_netdb (i_netdb.U):
+ This variable conditionally defines the I_NETDB symbol, and indicates
+ whether a C program should include <netdb.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
@@ -964,6 +1225,16 @@ 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_sysfilio (i_sysioctl.U):
+ This variable conditionally defines the I_SYS_FILIO symbol, which
+ indicates to the C program that <sys/filio.h> exists and should
+ be included in preference to <sys/ioctl.h>.
+
+i_sysin (i_niin.U):
+ This variable conditionally defines I_SYS_IN, which indicates
+ to the C program that it should include <sys/in.h> instead of
+ <netinet/in.h>.
+
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
@@ -986,6 +1257,11 @@ i_sysselct (i_sysselct.U):
to the C program that it should include <sys/select.h> in order to
get the definition of struct timeval.
+i_syssockio (i_sysioctl.U):
+ This variable conditionally defines I_SYS_SOCKIO to indicate to the
+ C program that socket ioctl codes may be found in <sys/sockio.h>
+ instead of <sys/ioctl.h>.
+
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>.
@@ -1055,20 +1331,60 @@ i_vfork (i_vfork.U):
This variable conditionally defines the I_VFORK symbol, and indicates
whether a C program should include vfork.h.
+incpath (usrinc.U):
+ This variable must preceed the normal include path to get hte
+ right one, as in "$incpath/usr/include" or "$incpath/usr/lib".
+ Value can be "" or "/bsd43" on mips.
+
+installarchlib (archlib.U):
+ This variable is really the same as archlibexp but may differ on
+ those systems using AFS. For extra portability, only this variable
+ should be used in makefiles.
+
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.
+installman1dir (man1dir.U):
+ This variable is really the same as man1direxp, unless you are using
+ AFS in which case it points to the read/write location whereas
+ man1direxp only points to the read-only access location. For extra
+ portability, you should only use this variable within your makefiles.
+
+installman3dir (man3dir.U):
+ This variable is really the same as man3direxp, unless you are using
+ AFS in which case it points to the read/write location whereas
+ man3direxp only points to the read-only access location. For extra
+ portability, you should only use this variable within your makefiles.
+
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.
+installscript (scriptdir.U):
+ This variable is usually the same as scriptdirexp, unless you are on
+ a system running AFS, in which case they may differ slightly. You
+ should always use this variable within your makefiles for portability.
+
+installsitearch (sitearch.U):
+ This variable is really the same as sitearchexp but may differ on
+ those systems using AFS. For extra portability, only this variable
+ should be used in makefiles.
+
+installsitelib (sitelib.U):
+ This variable is really the same as sitelibexp 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.
+ This variable contains the value of the INTSIZE symbol, which
+ indicates to the C program how many bytes there are in an int.
+
+known_extensions (Extensions.U):
+ This variable holds a list of all extensions included in
+ the package.
large (models.U):
This variable contains a flag which will tell the C compiler and loader
@@ -1092,9 +1408,10 @@ ldflags (ccflags.U):
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'.
+ This is an old synonym for _a.
+
+libc (libc.U):
+ This variable contains the location of the C library.
libperl (libperl.U):
The perl executable is obtained by linking perlmain.c with
@@ -1104,37 +1421,56 @@ libperl (libperl.U):
the user wishes to build a perl executable with a shared
library.
+libpth (libpth.U):
+ This variable holds the general path used to find libraries. It is
+ intended to be used by other units.
+
libs (libs.U):
This variable holds the additional libraries we want to use.
It is up to the Makefile to deal with it.
+libswanted (Myinit.U):
+ This variable holds a list of all the libraries we want to
+ search. The order is chosen to pick up the c library
+ ahead of ucb or bsd libraries for SVR4.
+
+lkflags (ccflags.U):
+ This variable contains any additional C partial linker flags desired by
+ the user. It is up to the Makefile to use this.
+
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'
+locincpth (ccflags.U):
+ This variable contains a list of additional directories to be
+ searched by the compiler. The appropriate -I directives will
+ be added to ccflags. This is intended to simplify setting
+ local directories from the Configure command line.
+ It's not much, but it parallels the loclibpth stuff in libpth.U.
+
+loclibpth (libpth.U):
+ This variable holds the paths used to find local libraries. It is
+ prepended to libpth, and is intended to be easily set from the
+ command line.
+
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.
+ This variable contains the value of the LONGSIZE symbol, which
+ indicates to the C program how many bytes there are in a long.
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.
+ make_set_make='#' # If your make program handles this for you,
+ make_set_make="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.
@@ -1160,6 +1496,10 @@ man1dir (man1dir.U):
Makefile.SH to get the value of this into the proper command.
You must be prepared to do the ~name expansion yourself.
+man1direxp (man1dir.U):
+ This variable is the same as the man1dir variable, but is filename
+ expanded at configuration time, for convenient use in makefiles.
+
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 '.'.
@@ -1171,55 +1511,142 @@ man3dir (man3dir.U):
Makefile.SH to get the value of this into the proper command.
You must be prepared to do the ~name expansion yourself.
+man3direxp (man3dir.U):
+ This variable is the same as the man3dir variable, but is filename
+ expanded at configuration time, for convenient use in makefiles.
+
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.
+medium (models.U):
+ This variable contains a flag which will tell the C compiler and loader
+ to produce a program running with a medium memory model. If the
+ medium model is not supported, contains the flag to produce large
+ model programs. It is up to the Makefile to use this.
+
+mips_type (usrinc.U):
+ This variable holds the environment type for the mips system.
+ Possible values are "BSD 4.3" and "System V".
+
+models (models.U):
+ This variable contains the list of memory models supported by this
+ system. Possible component values are none, split, unsplit, small,
+ medium, large, and huge. The component values are space separated.
+
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.
+myarchname (archname.U):
+ This variable holds the architecture name computed by Configure in
+ a previous run. It is not intended to be perused by any user and
+ should never be set in a hint file.
+
+mydomain (myhostname.U):
+ This variable contains the eventual value of the MYDOMAIN symbol,
+ which is the domain of the host the program is going to run on.
+ The domain must be appended to myhostname to form a complete host name.
+ The dot comes with mydomain, and need not be supplied by the program.
+
+myuname (Oldconfig.U):
+ The output of 'uname -a' if available, otherwise the hostname. On Xenix,
+ pseudo variables assignments in the output are stripped, thank you. The
+ whole thing is then lower-cased.
+
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".
+netdb_hlen_type (netdbtype.U):
+ This variable holds the type used for the 2nd argument to
+ gethostbyaddr(). Usually, this is int or size_t or unsigned.
+ This is only useful if you have gethostbyaddr(), naturally.
+
+netdb_host_type (netdbtype.U):
+ This variable holds the type used for the 1st argument to
+ gethostbyaddr(). Usually, this is char * or void *, possibly
+ with or without a const prefix.
+ This is only useful if you have gethostbyaddr(), naturally.
+
+netdb_name_type (netdbtype.U):
+ This variable holds the type used for the argument to
+ gethostbyname(). Usually, this is char * or const char *.
+ This is only useful if you have gethostbyname(), naturally.
+
+netdb_net_type (netdbtype.U):
+ This variable holds the type used for the 1st argument to
+ getnetbyaddr(). Usually, this is int or long.
+ This is only useful if you have getnetbyaddr(), naturally.
+
+nm_opt (usenm.U):
+ This variable holds the options that may be necessary for nm.
+
+nm_so_opt (usenm.U):
+ This variable holds the options that may be necessary for nm
+ to work on a shared library but that can not be used on an
+ archive library. Currently, this is only used by Linux, where
+ nm --dynamic is *required* to get symbols from an ELF library which
+ has been stripped, but nm --dynamic is *fatal* on an archive library.
+ Maybe Linux should just always set usenm=false.
+
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.
+obj_ext (Unix.U):
+ This is an old synonym for _o.
optimize (ccflags.U):
This variable contains any optimizer/debugger flag that should be used.
It is up to the Makefile to use it.
+orderlib (orderlib.U):
+ This variable is "true" if the components of libraries must be ordered
+ (with `lorder $* | tsort`) before placing them in an archive. Set to
+ "false" if ranlib or ar can generate random libraries.
+
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.
+osvers (Oldconfig.U):
+ This variable contains the operating system version (e.g.
+ 4.1.3, 5.2, etc.). It is primarily used for helping select
+ an appropriate hints file, but might be useful elsewhere for
+ setting defaults. It is set to '' if we can't figure it out.
+ We try to be flexible about how much of the version number
+ to keep, e.g. if 4.1.1, 4.1.2, and 4.1.3 are essentially the
+ same for this package, hints files might just be os_4.0 or
+ os_4.1, etc., not keeping separate files for each little release.
+
+package (package.U):
+ This variable contains the name of the package being constructed.
+ It is primarily intended for the use of later Configure units.
+
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.
+passcat (nis.U):
+ This variable contains a command that produces the text of the
+ /etc/passwd file. This is normally "cat /etc/passwd", but can be
+ "ypcat passwd" when NIS is used.
+
+patchlevel (patchlevel.U):
+ The patchlevel level of this package.
+ The value of patchlevel comes from the patchlevel.h file.
+
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.
+ This is an old synonym for p_ in Head.U, the character
+ used to separate elements in the command shell search PATH.
perladmin (perladmin.U):
Electronic mail address of the perl5 administrator.
@@ -1229,6 +1656,21 @@ perlpath (perlpath.U):
which contains the name of the perl interpreter to be used in
shell scripts and in the "eval 'exec'" idiom.
+phostname (myhostname.U):
+ This variable contains the eventual value of the PHOSTNAME symbol,
+ which is a command that can be fed to popen() to get the host name.
+ The program should probably not presume that the domain is or isn't
+ there already.
+
+pidtype (pidtype.U):
+ This variable defines PIDTYPE to be something like pid_t, int,
+ ushort, or whatever type is used to declare process ids in the kernel.
+
+plibpth (libpth.U):
+ Holds the private path used by Configure to find out the libraries.
+ Its value is prepend to libpth. This variable takes care of special
+ machines, like the mips. Usually, it should be empty.
+
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
@@ -1236,6 +1678,10 @@ prefix (prefix.U):
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.
+prefixexp (prefix.U):
+ This variable holds the full absolute path of the directory below
+ which the user will install the package. Derived from prefix.
+
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
@@ -1266,6 +1712,11 @@ rd_nodata (nblock_io.U):
used, which is a shame because you cannot make the difference between
no data and an EOF.. Sigh!
+runnm (usenm.U):
+ This variable contains 'true' or 'false' depending whether the
+ nm extraction should be performed or not, according to the value
+ of usenm and the flags on the Configure command line.
+
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
@@ -1273,6 +1724,10 @@ scriptdir (scriptdir.U):
mounted across different architectures, like /usr/share. Programs
must be prepared to deal with ~name expansion.
+scriptdirexp (scriptdir.U):
+ This variable is the same as scriptdir, but is filename expanded
+ at configuration time, for programs not wanting to bother with it.
+
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
@@ -1289,14 +1744,17 @@ sh (sh.U):
option, though you can override this (and startsh)
with -O -Dsh=/bin/whatever -Dstartsh=whatever
+sharpbang (spitshell.U):
+ This variable contains the string #! if this system supports that
+ construct.
+
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.
+ This variable contains the value of the SHORTSIZE symbol which
+ indicates to the C program how many bytes there are in a short.
shrpenv (libperl.U):
If the user builds a shared libperl.so, then we need to tell the
@@ -1314,14 +1772,28 @@ shrpenv (libperl.U):
as -R $archlibexp/CORE (Solaris, NetBSD) or -Wl,-rpath
$archlibexp/CORE (Linux).
+shsharp (spitshell.U):
+ This variable tells further Configure units whether your sh can
+ handle # comments.
+
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 in signal name is removed. A ZERO is prepended to the
+ list. This is currently not used.
+
+sig_name_init (sig_name.U):
+ This variable holds the signal names, enclosed in double quotes and
+ separated by commas, suitable for use in the SIG_NAME definition
+ below. A "ZERO" is prepended to the list, and the list is
+ terminated with a plain 0. The leading SIG in signal names
+ 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.
+ This variable holds the signal numbers, comma separated. A 0 is
+ prepended to the list (corresponding to the fake SIGZERO), and
+ the list is terminated with a 0. 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).
@@ -1356,6 +1828,21 @@ small (models.U):
to produce a program running with a small memory model. It is up to
the Makefile to use this.
+so (so.U):
+ This variable holds the extension used to identify shared libraries
+ (also known as shared objects) on the system. Usually set to 'so'.
+
+sockethdr (d_socket.U):
+ This variable has any cpp -I flags needed for socket support.
+
+socketlib (d_socket.U):
+ This variable has the names of any libraries needed for socket support.
+
+spackage (package.U):
+ This variable contains the name of the package being constructed,
+ with the first letter uppercased, i.e. suitable for starting
+ sentences.
+
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.
@@ -1377,7 +1864,7 @@ startperl (startperl.U):
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+"$@"}'
+ eval 'exec 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.
@@ -1395,6 +1882,50 @@ 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".
+stdio_base (d_stdstdio.U):
+ This variable defines how, given a FILE pointer, fp, to access the
+ _base field (or equivalent) of stdio.h's FILE structure. This will
+ be used to define the macro FILE_base(fp).
+
+stdio_bufsiz (d_stdstdio.U):
+ This variable defines how, given a FILE pointer, fp, to determine
+ the number of bytes store in the I/O buffer pointer to by the
+ _base field (or equivalent) of stdio.h's FILE structure. This will
+ be used to define the macro FILE_bufsiz(fp).
+
+stdio_cnt (d_stdstdio.U):
+ This variable defines how, given a FILE pointer, fp, to access the
+ _cnt field (or equivalent) of stdio.h's FILE structure. This will
+ be used to define the macro FILE_cnt(fp).
+
+stdio_filbuf (d_stdstdio.U):
+ This variable defines how, given a FILE pointer, fp, to tell
+ stdio to refill it's internal buffers (?). This will
+ be used to define the macro FILE_filbuf(fp).
+
+stdio_ptr (d_stdstdio.U):
+ This variable defines how, given a FILE pointer, fp, to access the
+ _ptr field (or equivalent) of stdio.h's FILE structure. This will
+ be used to define the macro FILE_ptr(fp).
+
+strings (i_string.U):
+ This variable holds the full path of the string header that will be
+ used. Typically /usr/include/string.h or /usr/include/strings.h.
+
+subversion (patchlevel.U):
+ The subversion level of this package.
+ The value of subversion comes from the patchlevel.h file.
+ This is unique to perl.
+
+sysman (sysman.U):
+ This variable holds the place where the manual is located on this
+ system. It is not the place where the user wants to put his manual
+ pages. Rather it is the place where Configure may look to find manual
+ for unix commands (section 1 of the manual usually). See mansrc.
+
+timeincl (i_time.U):
+ This variable holds the full path of the included time header(s).
+
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
@@ -1404,15 +1935,64 @@ 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.
+usedl (dlsrc.U):
+ This variable indicates if the the system supports dynamic
+ loading of some sort. See also dlsrc and dlobj.
+
+usemymalloc (mallocsrc.U):
+ This variable contains y if the malloc that comes with this package
+ is desired over the system's version of malloc. People often include
+ special versions of malloc for effiency, but such versions are often
+ less portable. See also mallocsrc and mallocobj.
+ If this is 'y', then -lmalloc is removed from $libs.
+
+usenm (usenm.U):
+ This variable contains 'true' or 'false' depending whether the
+ nm extraction is wanted or not.
+
+useopcode (Extensions.U):
+ This variable holds either 'true' or 'false' to indicate
+ whether the Opcode extension should be used. The sole
+ use for this currently is to allow an easy mechanism
+ for users to skip the Opcode extension from the Configure
+ command line.
+
useperlio (useperlio.U):
This variable conditionally defines the USE_PERLIO symbol,
and indicates that the PerlIO abstraction should be
used throughout.
+useposix (Extensions.U):
+ This variable holds either 'true' or 'false' to indicate
+ whether the POSIX extension should be used. The sole
+ use for this currently is to allow an easy mechanism
+ for hints files to indicate that POSIX will not compile
+ on a particular system.
+
+usesfio (d_sfio.U):
+ This variable is set to true when the user agrees to use sfio.
+ It is set to false when sfio is not available or when the user
+ explicitely requests not to use sfio. It is here primarily so
+ that command-line settings can override the auto-detection of
+ d_sfio without running into a "WHOA THERE".
+
useshrplib (libperl.U):
This variable is set to 'yes' if the user wishes
to build a shared libperl, and 'no' otherwise.
+usethreads (usethreads.U):
+ This variable conditionally defines the USE_THREADS symbol,
+ and indicates that Perl should be built to use threads.
+
+usevfork (d_vfork.U):
+ This variable is set to true when the user accepts to use vfork.
+ It is set to false when no vfork is available or when the user
+ explicitely requests not to use vfork.
+
+usrinc (usrinc.U):
+ This variable holds the path of the include files, which is
+ usually /usr/include. It is mainly used by other Configure units.
+
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
diff --git a/Porting/config.sh b/Porting/config.sh
new file mode 100644
index 0000000000..59663d958f
--- /dev/null
+++ b/Porting/config.sh
@@ -0,0 +1,525 @@
+#!/bin/sh
+#
+# This file was produced by running the Configure script. It holds all the
+# definitions figured out by Configure. Should you modify one of these values,
+# do not forget to propagate your changes by running "Configure -der". You may
+# instead choose to run each of the .SH files by yourself, or "Configure -S".
+#
+
+# Package name : perl5
+# Source directory : .
+# Configuration time: Tue Feb 24 12:39:16 EST 1998
+# Configured by : doughera
+# Target system : linux fractal 2.0.33 #1 tue feb 3 10:11:46 est 1998 i686 unknown
+
+Author=''
+Date='$Date'
+Header=''
+Id='$Id'
+Locker=''
+Log='$Log'
+Mcc='Mcc'
+RCSfile='$RCSfile'
+Revision='$Revision'
+Source=''
+State=''
+_a='.a'
+_exe=''
+_o='.o'
+afs='false'
+alignbytes='4'
+aphostname=''
+ar='ar'
+archlib='/opt/perl/lib/i686-linux-thread/5.00460'
+archlibexp='/opt/perl/lib/i686-linux-thread/5.00460'
+archname='i686-linux-thread'
+archobjs=''
+awk='awk'
+baserev='5.0'
+bash=''
+bin='/opt/perl/bin'
+bincompat3='n'
+binexp='/opt/perl/bin'
+bison=''
+byacc='byacc'
+byteorder='1234'
+c=''
+castflags='1'
+cat='cat'
+cc='cc'
+cccdlflags='-fpic'
+ccdlflags='-rdynamic'
+ccflags='-D_REENTRANT -Dbool=char -DHAS_BOOL -I/usr/local/include'
+cf_by='doughera'
+cf_email='yourname@yourhost.yourplace.com'
+cf_time='Tue Feb 24 12:39:16 EST 1998'
+chgrp=''
+chmod=''
+chown=''
+clocktype='clock_t'
+comm='comm'
+compress=''
+contains='grep'
+cp='cp'
+cpio=''
+cpp='cpp'
+cpp_stuff='42'
+cppflags='-D_REENTRANT -Dbool=char -DHAS_BOOL -I/usr/local/include'
+cpplast='-'
+cppminus='-'
+cpprun='cc -E'
+cppstdin='cc -E'
+cryptlib=''
+csh='csh'
+d_Gconvert='gcvt((x),(n),(b))'
+d_access='define'
+d_alarm='define'
+d_archlib='define'
+d_attribut='define'
+d_bcmp='define'
+d_bcopy='define'
+d_bincompat3='undef'
+d_bsd='undef'
+d_bsdgetpgrp='undef'
+d_bsdsetpgrp='undef'
+d_bzero='define'
+d_casti32='define'
+d_castneg='undef'
+d_charvspr='undef'
+d_chown='define'
+d_chroot='define'
+d_chsize='undef'
+d_closedir='define'
+d_const='define'
+d_crypt='define'
+d_csh='define'
+d_cuserid='define'
+d_dbl_dig='define'
+d_difftime='define'
+d_dirnamlen='undef'
+d_dlerror='define'
+d_dlopen='define'
+d_dlsymun='undef'
+d_dosuid='undef'
+d_dup2='define'
+d_eofnblk='define'
+d_eunice='undef'
+d_fchmod='define'
+d_fchown='define'
+d_fcntl='define'
+d_fd_macros='define'
+d_fd_set='define'
+d_fds_bits='define'
+d_fgetpos='define'
+d_flexfnam='define'
+d_flock='define'
+d_fork='define'
+d_fpathconf='define'
+d_fsetpos='define'
+d_ftime='undef'
+d_getgrps='define'
+d_gethbyaddr='define'
+d_gethbyname='define'
+d_gethent='define'
+d_gethname='undef'
+d_getlogin='define'
+d_getnbyaddr='define'
+d_getpgid='define'
+d_getpgrp2='undef'
+d_getpgrp='define'
+d_getppid='define'
+d_getprior='define'
+d_gettimeod='define'
+d_gnulibc='define'
+d_htonl='define'
+d_index='undef'
+d_inetaton='define'
+d_isascii='define'
+d_killpg='define'
+d_link='define'
+d_locconv='define'
+d_lockf='define'
+d_lstat='define'
+d_mblen='define'
+d_mbstowcs='define'
+d_mbtowc='define'
+d_memcmp='define'
+d_memcpy='define'
+d_memmove='define'
+d_memset='define'
+d_mkdir='define'
+d_mkfifo='define'
+d_mktime='define'
+d_msg='define'
+d_msgctl='define'
+d_msgget='define'
+d_msgrcv='define'
+d_msgsnd='define'
+d_mymalloc='undef'
+d_nice='define'
+d_oldsock='undef'
+d_open3='define'
+d_pathconf='define'
+d_pause='define'
+d_phostname='undef'
+d_pipe='define'
+d_poll='define'
+d_portable='define'
+d_pthread_yield='undef'
+d_pthreads_created_joinable='define'
+d_pwage='undef'
+d_pwchange='undef'
+d_pwclass='undef'
+d_pwcomment='undef'
+d_pwexpire='undef'
+d_pwquota='undef'
+d_readdir='define'
+d_readlink='define'
+d_rename='define'
+d_rewinddir='define'
+d_rmdir='define'
+d_safebcpy='define'
+d_safemcpy='undef'
+d_sanemcmp='define'
+d_sched_yield='define'
+d_seekdir='define'
+d_select='define'
+d_sem='define'
+d_semctl='define'
+d_semget='define'
+d_semop='define'
+d_setegid='define'
+d_seteuid='define'
+d_setgrps='define'
+d_setlinebuf='define'
+d_setlocale='define'
+d_setpgid='define'
+d_setpgrp2='undef'
+d_setpgrp='define'
+d_setprior='define'
+d_setregid='define'
+d_setresgid='undef'
+d_setresuid='undef'
+d_setreuid='define'
+d_setrgid='undef'
+d_setruid='undef'
+d_setsid='define'
+d_sfio='undef'
+d_shm='define'
+d_shmat='define'
+d_shmatprototype='define'
+d_shmctl='define'
+d_shmdt='define'
+d_shmget='define'
+d_sigaction='define'
+d_sigsetjmp='define'
+d_socket='define'
+d_sockpair='define'
+d_statblks='undef'
+d_stdio_cnt_lval='undef'
+d_stdio_ptr_lval='define'
+d_stdiobase='define'
+d_stdstdio='define'
+d_strchr='define'
+d_strcoll='define'
+d_strctcpy='define'
+d_strerrm='strerror(e)'
+d_strerror='define'
+d_strtod='define'
+d_strtol='define'
+d_strtoul='define'
+d_strxfrm='define'
+d_suidsafe='undef'
+d_symlink='define'
+d_syscall='define'
+d_sysconf='define'
+d_sysernlst=''
+d_syserrlst='define'
+d_system='define'
+d_tcgetpgrp='define'
+d_tcsetpgrp='define'
+d_telldir='define'
+d_time='define'
+d_times='define'
+d_truncate='define'
+d_tzname='define'
+d_umask='define'
+d_uname='define'
+d_vfork='undef'
+d_void_closedir='undef'
+d_voidsig='define'
+d_voidtty=''
+d_volatile='define'
+d_vprintf='define'
+d_wait4='define'
+d_waitpid='define'
+d_wcstombs='define'
+d_wctomb='define'
+d_xenix='undef'
+date='date'
+db_hashtype='u_int32_t'
+db_prefixtype='size_t'
+defvoidused='15'
+direntrytype='struct dirent'
+dlext='so'
+dlsrc='dl_dlopen.xs'
+dynamic_ext='B DB_File Fcntl GDBM_File IO NDBM_File ODBM_File Opcode POSIX SDBM_File Socket Thread attrs'
+eagain='EAGAIN'
+echo='echo'
+egrep='egrep'
+emacs=''
+eunicefix=':'
+exe_ext=''
+expr='expr'
+extensions='B DB_File Fcntl GDBM_File IO NDBM_File ODBM_File Opcode POSIX SDBM_File Socket Thread attrs'
+find='find'
+firstmakefile='makefile'
+flex=''
+fpostype='fpos_t'
+freetype='void'
+full_csh='/bin/csh'
+full_sed='/bin/sed'
+gcc=''
+gccversion='2.7.2.3'
+gidtype='gid_t'
+glibpth='/usr/shlib /shlib /lib/pa1.1 /usr/lib/large /lib /usr/lib /usr/lib/386 /lib/386 /lib/large /usr/lib/small /lib/small /usr/ccs/lib /usr/ucblib /usr/local/lib '
+grep='grep'
+groupcat='cat /etc/group'
+groupstype='gid_t'
+gzip='gzip'
+h_fcntl='false'
+h_sysfile='true'
+hint='recommended'
+hostcat='cat /etc/hosts'
+huge=''
+i_bsdioctl=''
+i_db='define'
+i_dbm='define'
+i_dirent='define'
+i_dld='undef'
+i_dlfcn='define'
+i_fcntl='undef'
+i_float='define'
+i_gdbm='define'
+i_grp='define'
+i_limits='define'
+i_locale='define'
+i_malloc='define'
+i_math='define'
+i_memory='undef'
+i_ndbm='define'
+i_netdb='define'
+i_neterrno='undef'
+i_niin='define'
+i_pwd='define'
+i_rpcsvcdbm='undef'
+i_sfio='undef'
+i_sgtty='undef'
+i_stdarg='define'
+i_stddef='define'
+i_stdlib='define'
+i_string='define'
+i_sysdir='define'
+i_sysfile='define'
+i_sysfilio='undef'
+i_sysin='undef'
+i_sysioctl='define'
+i_sysndir='undef'
+i_sysparam='define'
+i_sysresrc='define'
+i_sysselct='define'
+i_syssockio=''
+i_sysstat='define'
+i_systime='define'
+i_systimek='undef'
+i_systimes='define'
+i_systypes='define'
+i_sysun='define'
+i_syswait='define'
+i_termio='undef'
+i_termios='define'
+i_time='undef'
+i_unistd='define'
+i_utime='define'
+i_values='define'
+i_varargs='undef'
+i_varhdr='stdarg.h'
+i_vfork='undef'
+incpath=''
+inews=''
+installarchlib='/opt/perl/lib/i686-linux-thread/5.00460'
+installbin='/opt/perl/bin'
+installman1dir='/opt/perl/man/man1'
+installman3dir='/opt/perl/man/man3'
+installprivlib='/opt/perl/lib'
+installscript='/opt/perl/script'
+installsitearch='/opt/perl/lib/site_perl/i686-linux-thread'
+installsitelib='/opt/perl/lib/site_perl'
+intsize='4'
+known_extensions='B DB_File Fcntl GDBM_File IO NDBM_File ODBM_File Opcode POSIX SDBM_File Socket Thread attrs'
+ksh=''
+large=''
+ld='cc'
+lddlflags='-shared -L/usr/local/lib'
+ldflags=' -L/usr/local/lib'
+less='less'
+lib_ext='.a'
+libc=''
+libperl='libperl.a'
+libpth='/usr/local/lib /lib /usr/lib'
+libs='-lnsl -lndbm -lgdbm -ldbm -ldb -ldl -lm -lpthread -lc -lposix -lcrypt'
+libswanted='sfio net socket inet nsl nm ndbm gdbm dbm db malloc dl dld ld sun m pthread c cposix posix ndir dir crypt ucb BSD PW x'
+line='line'
+lint=''
+lkflags=''
+ln='ln'
+lns='/bin/ln -s'
+locincpth='/usr/local/include /opt/local/include /usr/gnu/include /opt/gnu/include /usr/GNU/include /opt/GNU/include'
+loclibpth='/usr/local/lib /opt/local/lib /usr/gnu/lib /opt/gnu/lib /usr/GNU/lib /opt/GNU/lib'
+longsize='4'
+lp=''
+lpr=''
+ls='ls'
+lseektype='off_t'
+mail=''
+mailx=''
+make='make'
+make_set_make='#'
+mallocobj=''
+mallocsrc=''
+malloctype='void *'
+man1dir='/opt/perl/man/man1'
+man1direxp='/opt/perl/man/man1'
+man1ext='1'
+man3dir='/opt/perl/man/man3'
+man3direxp='/opt/perl/man/man3'
+man3ext='3'
+medium=''
+mips=''
+mips_type=''
+mkdir='mkdir'
+models='none'
+modetype='mode_t'
+more='more'
+mv=''
+myarchname='i686-linux'
+mydomain='.yourplace.com'
+myhostname='yourhost'
+myuname='linux fractal 2.0.33 #1 tue feb 3 10:11:46 est 1998 i686 unknown '
+n='-n'
+netdb_hlen_type='int'
+netdb_host_type='const char *'
+netdb_name_type='const char *'
+netdb_net_type='unsigned long'
+nm_opt=''
+nm_so_opt='--dynamic'
+nroff='nroff'
+o_nonblock='O_NONBLOCK'
+obj_ext='.o'
+optimize='-O'
+orderlib='false'
+osname='linux'
+osvers='2.0.33'
+package='perl5'
+pager='/usr/bin/less'
+passcat='cat /etc/passwd'
+patchlevel='4'
+path_sep=':'
+perl='perl'
+perladmin='yourname@yourhost.yourplace.com'
+perlpath='/opt/perl/bin/perl'
+pg='pg'
+phostname=''
+pidtype='pid_t'
+plibpth=''
+pmake=''
+pr=''
+prefix='/opt/perl'
+prefixexp='/opt/perl'
+privlib='/opt/perl/lib'
+privlibexp='/opt/perl/lib'
+prototype='define'
+randbits='31'
+ranlib=':'
+rd_nodata='-1'
+rm='rm'
+rmail=''
+runnm='false'
+scriptdir='/opt/perl/script'
+scriptdirexp='/opt/perl/script'
+sed='sed'
+selecttype='fd_set *'
+sendmail='sendmail'
+sh='/bin/sh'
+shar=''
+sharpbang='#!'
+shmattype='void *'
+shortsize='2'
+shrpenv=''
+shsharp='true'
+sig_name='ZERO HUP INT QUIT ILL TRAP ABRT BUS FPE KILL USR1 SEGV USR2 PIPE ALRM TERM STKFLT CHLD CONT STOP TSTP TTIN TTOU URG XCPU XFSZ VTALRM PROF WINCH IO PWR UNUSED IOT CLD POLL '
+sig_name_init='"ZERO", "HUP", "INT", "QUIT", "ILL", "TRAP", "ABRT", "BUS", "FPE", "KILL", "USR1", "SEGV", "USR2", "PIPE", "ALRM", "TERM", "STKFLT", "CHLD", "CONT", "STOP", "TSTP", "TTIN", "TTOU", "URG", "XCPU", "XFSZ", "VTALRM", "PROF", "WINCH", "IO", "PWR", "UNUSED", "IOT", "CLD", "POLL", 0'
+sig_num='0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 6, 17, 29, 0'
+signal_t='void'
+sitearch='/opt/perl/lib/site_perl/i686-linux-thread'
+sitearchexp='/opt/perl/lib/site_perl/i686-linux-thread'
+sitelib='/opt/perl/lib/site_perl'
+sitelibexp='/opt/perl/lib/site_perl'
+sizetype='size_t'
+sleep=''
+smail=''
+small=''
+so='so'
+sockethdr=''
+socketlib=''
+sort='sort'
+spackage='Perl5'
+spitshell='cat'
+split=''
+src='.'
+ssizetype='ssize_t'
+startperl='#!/opt/perl/bin/perl'
+startsh='#!/bin/sh'
+static_ext=' '
+stdchar='char'
+stdio_base='((fp)->_IO_read_base)'
+stdio_bufsiz='((fp)->_IO_read_end - (fp)->_IO_read_base)'
+stdio_cnt='((fp)->_IO_read_end - (fp)->_IO_read_ptr)'
+stdio_filbuf=''
+stdio_ptr='((fp)->_IO_read_ptr)'
+strings='/usr/include/string.h'
+submit=''
+subversion='60'
+sysman='/usr/man/man1'
+tail=''
+tar=''
+tbl=''
+test='test'
+timeincl='/usr/include/sys/time.h '
+timetype='time_t'
+touch='touch'
+tr='tr'
+troff=''
+uidtype='uid_t'
+uname='uname'
+uniq='uniq'
+usedl='define'
+usemymalloc='n'
+usenm='false'
+useopcode='true'
+useperlio='undef'
+useposix='true'
+usesfio='false'
+useshrplib='false'
+usethreads='define'
+usevfork='false'
+usrinc='/usr/include'
+uuname=''
+vi=''
+voidflags='15'
+xlibpth='/usr/lib/386 /lib/386'
+zcat=''
+zip='zip'
+PATCHLEVEL=4
+SUBVERSION=60
+CONFIG=true
diff --git a/config_H b/Porting/config_H
index 87fc608c65..ec3fbdba18 100644
--- a/config_H
+++ b/Porting/config_H
@@ -11,30 +11,24 @@
* that running config_h.SH again will wipe out any changes you've made.
* For a more permanent change edit config.sh and rerun config_h.SH.
*
- * $Id: Config_h.U,v 3.0.1.4 1995/09/25 09:10:49 ram Exp $
+ * $Id: Config_h.U,v 3.0.1.5 1997/02/28 14:57:43 ram Exp $
*/
-/* Configuration time: Wed Sep 11 15:24:25 EDT 1996
- * Configured by: doughera
- * Target system: sunos fractal 5.5 generic i86pc i386 i86pc
+/*
+ * Package name : perl5
+ * Source directory : .
+ * Configuration time: Tue Feb 24 12:39:16 EST 1998
+ * Configured by : doughera
+ * Target system : linux fractal 2.0.33 #1 tue feb 3 10:11:46 est 1998 i686 unknown
*/
#ifndef _config_h_
#define _config_h_
-/* MEM_ALIGNBYTES:
- * This symbol contains the number of bytes required to align a
- * double. Usual values are 2, 4 and 8.
- */
-#define MEM_ALIGNBYTES 4 /**/
-
-/* ARCHNAME:
- * This symbol holds a string representing the architecture name.
- * It may be used to construct an architecture-dependant pathname
- * where library files may be held under a private library, for
- * instance.
+/* LOC_SED:
+ * This symbol holds the complete pathname to the sed program.
*/
-#define ARCHNAME "unknown" /**/
+#define LOC_SED "/bin/sed" /**/
/* BIN:
* This symbol holds the path of the bin directory where the package will
@@ -47,36 +41,6 @@
#define BIN "/opt/perl/bin" /**/
#define BIN_EXP "/opt/perl/bin" /**/
-/* CAT2:
- * This macro catenates 2 tokens together.
- */
-/* STRINGIFY:
- * This macro surrounds its token with double quotes.
- */
-#if 42 == 1
-#define CAT2(a,b)a/**/b
-#define CAT3(a,b,c)a/**/b/**/c
-#define CAT4(a,b,c,d)a/**/b/**/c/**/d
-#define CAT5(a,b,c,d,e)a/**/b/**/c/**/d/**/e
-#define STRINGIFY(a)"a"
- /* If you can get stringification with catify, tell me how! */
-#endif
-#if 42 == 42
-#define CAT2(a,b)a ## b
-#define CAT3(a,b,c)a ## b ## c
-#define CAT4(a,b,c,d)a ## b ## c ## d
-#define CAT5(a,b,c,d,e)a ## b ## c ## d ## e
-#define StGiFy(a)# a
-#define STRINGIFY(a)StGiFy(a)
-#define SCAT2(a,b)StGiFy(a) StGiFy(b)
-#define SCAT3(a,b,c)StGiFy(a) StGiFy(b) StGiFy(c)
-#define SCAT4(a,b,c,d)StGiFy(a) StGiFy(b) StGiFy(c) StGiFy(d)
-#define SCAT5(a,b,c,d,e)StGiFy(a) StGiFy(b) StGiFy(c) StGiFy(d) StGiFy(e)
-#endif
-#ifndef CAT2
-#include "Bletch: How does this C preprocessor catenate tokens?"
-#endif
-
/* CPPSTDIN:
* This symbol contains the first part of the string which will invoke
* the C preprocessor on the standard input and produce to standard
@@ -102,7 +66,7 @@
* This symbol indicates the C compiler can check for function attributes,
* such as printf formats. This is normally only supported by GNU cc.
*/
-/*#define HASATTRIBUTE / **/
+#define HASATTRIBUTE /**/
#ifndef HASATTRIBUTE
#define __attribute__(_arg_)
#endif
@@ -125,27 +89,6 @@
*/
#define HAS_BZERO /**/
-/* CASTI32:
- * This symbol is defined if the C compiler can cast negative
- * or large floating point numbers to 32-bit ints.
- */
-#define CASTI32 /**/
-
-/* CASTNEGFLOAT:
- * This symbol is defined if the C compiler can cast negative
- * numbers to unsigned longs, ints and shorts.
- */
-/* CASTFLAGS:
- * This symbol contains flags that say what 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
- */
-#define CASTNEGFLOAT /**/
-#define CASTFLAGS 0 /**/
-
/* HAS_CHOWN:
* This symbol, if defined, indicates that the chown routine is
* available.
@@ -164,12 +107,6 @@
*/
/*#define HAS_CHSIZE / **/
-/* VOID_CLOSEDIR:
- * This symbol, if defined, indicates that the closedir() routine
- * does not return a value.
- */
-/*#define VOID_CLOSEDIR / **/
-
/* HASCONST:
* This symbol, if defined, indicates that this C compiler knows about
* the const type. There is no need to actually test for that symbol
@@ -214,6 +151,26 @@
*/
#define HAS_DLERROR /**/
+/* SETUID_SCRIPTS_ARE_SECURE_NOW:
+ * This symbol, if defined, indicates that the bug that prevents
+ * setuid scripts from being secure is not present in this kernel.
+ */
+/* DOSUID:
+ * This symbol, if defined, indicates that the C program should
+ * check the script that it is executing for setuid/setgid bits, and
+ * attempt to emulate setuid/setgid on systems that have disabled
+ * setuid #! scripts because the kernel can't do it securely.
+ * It is up to the package designer to make sure that this emulation
+ * is done securely. Among other things, it should do an fstat on
+ * the script it just opened to make sure it really is a setuid/setgid
+ * script, it should make sure the arguments passed correspond exactly
+ * to the argument on the #! line, and it should not trust any
+ * subprocesses to which it must pass the filename rather than the
+ * file descriptor of the script to be executed.
+ */
+/*#define SETUID_SCRIPTS_ARE_SECURE_NOW / **/
+/*#define DOSUID / **/
+
/* HAS_DUP2:
* This symbol, if defined, indicates that the dup2 routine is
* available to duplicate file descriptors.
@@ -254,7 +211,7 @@
* This symbol, if defined, indicates that the flock routine is
* available to do file locking.
*/
-/*#define HAS_FLOCK / **/
+#define HAS_FLOCK /**/
/* HAS_FORK:
* This symbol, if defined, indicates that the fork routine is
@@ -274,7 +231,7 @@
* <sys/resource.h> needs to be included (see I_SYS_RESOURCE).
* The type "Timeval" should be used to refer to "struct timeval".
*/
-/*#define HAS_GETTIMEOFDAY / **/
+#define HAS_GETTIMEOFDAY /**/
#ifdef HAS_GETTIMEOFDAY
#define Timeval struct timeval /* Structure used by gettimeofday() */
#endif
@@ -284,13 +241,7 @@
* available to get the list of process groups. If unavailable, multiple
* groups are probably not supported.
*/
-/* HAS_SETGROUPS:
- * This symbol, if defined, indicates that the setgroups() routine is
- * available to set the list of process groups. If unavailable, multiple
- * groups are probably not supported.
- */
#define HAS_GETGROUPS /**/
-#define HAS_SETGROUPS /**/
/* HAS_GETHOSTENT:
* This symbol, if defined, indicates that the gethostent routine is
@@ -311,6 +262,24 @@
*/
#define HAS_GETLOGIN /**/
+/* HAS_GETPGID:
+ * This symbol, if defined, indicates to the C program that
+ * the getpgid(pid) function is available to get the
+ * process group id.
+ */
+#define HAS_GETPGID /**/
+
+/* HAS_GETPGRP:
+ * This symbol, if defined, indicates that the getpgrp routine is
+ * available to get the current process group.
+ */
+/* USE_BSD_GETPGRP:
+ * This symbol, if defined, indicates that getpgrp needs one
+ * arguments whereas USG one needs none.
+ */
+#define HAS_GETPGRP /**/
+/*#define USE_BSD_GETPGRP / **/
+
/* HAS_GETPGRP2:
* This symbol, if defined, indicates that the getpgrp2() (as in DG/UX)
* routine is available to get the current process group.
@@ -354,11 +323,12 @@
#define HAS_NTOHL /**/
#define HAS_NTOHS /**/
-/* HAS_ISASCII:
- * This manifest constant lets the C program know that isascii
- * is available.
+/* HAS_INET_ATON:
+ * This symbol, if defined, indicates to the C program that the
+ * inet_aton() function is available to parse IP address "dotted-quad"
+ * strings.
*/
-#define HAS_ISASCII /**/
+#define HAS_INET_ATON /**/
/* HAS_KILLPG:
* This symbol, if defined, indicates that the killpg routine is available
@@ -468,12 +438,6 @@
*/
#define HAS_NICE /**/
-/* HAS_OPEN3:
- * This manifest constant lets the C program know that the three
- * argument form of open(2) is available.
- */
-#define HAS_OPEN3 /**/
-
/* HAS_PATHCONF:
* This symbol, if defined, indicates that pathconf() is available
* to determine file-system related limits and options associated
@@ -501,7 +465,8 @@
/* HAS_POLL:
* This symbol, if defined, indicates that the poll routine is
- * available to poll active file descriptors.
+ * available to poll active file descriptors. You may safely
+ * include <poll.h> when this symbol is defined.
*/
#define HAS_POLL /**/
@@ -550,29 +515,6 @@
*/
#define HAS_RMDIR /**/
-/* HAS_SAFE_BCOPY:
- * This symbol, if defined, indicates that the bcopy routine is available
- * to copy potentially overlapping memory blocks. Otherwise you should
- * probably use memmove() or memcpy(). If neither is defined, roll your
- * own version.
- */
-#define HAS_SAFE_BCOPY /**/
-
-/* HAS_SAFE_MEMCPY:
- * This symbol, if defined, indicates that the memcpy routine is available
- * to copy potentially overlapping memory blocks. Otherwise you should
- * probably use memmove() or memcpy(). If neither is defined, roll your
- * own version.
- */
-/*#define HAS_SAFE_MEMCPY / **/
-
-/* HAS_SANE_MEMCMP:
- * This symbol, if defined, indicates that the memcmp routine is available
- * and can be used to compare relative magnitudes of chars with their high
- * bits set. If it is not defined, roll your own version.
- */
-/*#define HAS_SANE_MEMCMP / **/
-
/* HAS_SELECT:
* This symbol, if defined, indicates that the select routine is
* available to select active file descriptors. If the timeout field
@@ -611,6 +553,24 @@
*/
#define HAS_SETLOCALE /**/
+/* HAS_SETPGID:
+ * This symbol, if defined, indicates that the setpgid(pid, gpid)
+ * routine is available to set process group ID.
+ */
+#define HAS_SETPGID /**/
+
+/* HAS_SETPGRP:
+ * This symbol, if defined, indicates that the setpgrp routine is
+ * available to set the current process group.
+ */
+/* USE_BSD_SETPGRP:
+ * This symbol, if defined, indicates that setpgrp needs two
+ * arguments whereas USG one needs none. See also HAS_SETPGID
+ * for a POSIX interface.
+ */
+#define HAS_SETPGRP /**/
+/*#define USE_BSD_SETPGRP / **/
+
/* HAS_SETPGRP2:
* This symbol, if defined, indicates that the setpgrp2() (as in DG/UX)
* routine is available to set the current process group.
@@ -687,12 +647,6 @@
#define Shmat_t void * /**/
#define HAS_SHMAT_PROTOTYPE /**/
-/* HAS_SIGACTION:
- * This symbol, if defined, indicates that Vr4's sigaction() routine
- * is available.
- */
-#define HAS_SIGACTION /**/
-
/* HAS_SOCKET:
* This symbol, if defined, indicates that the BSD socket interface is
* supported.
@@ -708,66 +662,7 @@
* This symbol is defined if this system has a stat structure declaring
* st_blksize and st_blocks.
*/
-#define USE_STAT_BLOCKS /**/
-
-/* USE_STDIO_PTR:
- * This symbol is defined if the _ptr and _cnt fields (or similar)
- * of the stdio FILE structure can be used to access the stdio buffer
- * for a file handle. If this is defined, then the FILE_ptr(fp)
- * and FILE_cnt(fp) macros will also be defined and should be used
- * to access these fields.
- */
-/* FILE_ptr:
- * This macro is used to access the _ptr field (or equivalent) of the
- * FILE structure pointed to by its argument. This macro will always be
- * defined if USE_STDIO_PTR is defined.
- */
-/* STDIO_PTR_LVALUE:
- * This symbol is defined if the FILE_ptr macro can be used as an
- * lvalue.
- */
-/* FILE_cnt:
- * This macro is used to access the _cnt field (or equivalent) of the
- * FILE structure pointed to by its argument. This macro will always be
- * defined if USE_STDIO_PTR is defined.
- */
-/* STDIO_CNT_LVALUE:
- * This symbol is defined if the FILE_cnt macro can be used as an
- * lvalue.
- */
-#define USE_STDIO_PTR /**/
-#ifdef USE_STDIO_PTR
-#define FILE_ptr(fp) ((fp)->_ptr)
-#define STDIO_PTR_LVALUE /**/
-#define FILE_cnt(fp) ((fp)->_cnt)
-#define STDIO_CNT_LVALUE /**/
-#endif
-
-/* USE_STDIO_BASE:
- * This symbol is defined if the _base field (or similar) of the
- * stdio FILE structure can be used to access the stdio buffer for
- * a file handle. If this is defined, then the FILE_base(fp) macro
- * will also be defined and should be used to access this field.
- * Also, the FILE_bufsiz(fp) macro will be defined and should be used
- * to determine the number of bytes in the buffer. USE_STDIO_BASE
- * will never be defined unless USE_STDIO_PTR is.
- */
-/* FILE_base:
- * This macro is used to access the _base field (or equivalent) of the
- * FILE structure pointed to by its argument. This macro will always be
- * defined if USE_STDIO_BASE is defined.
- */
-/* FILE_bufsiz:
- * This macro is used to determine the number of bytes in the I/O
- * buffer pointed to by _base field (or equivalent) of the FILE
- * structure pointed to its argument. This macro will always be defined
- * if USE_STDIO_BASE is defined.
- */
-#define USE_STDIO_BASE /**/
-#ifdef USE_STDIO_BASE
-#define FILE_base(fp) ((fp)->_base)
-#define FILE_bufsiz(fp) ((fp)->_cnt + (fp)->_ptr - (fp)->_base)
-#endif
+/*#define USE_STAT_BLOCKS / **/
/* HAS_STRCHR:
* This symbol is defined to indicate that the strchr()/strrchr()
@@ -910,14 +805,6 @@
*/
/*#define HAS_VFORK / **/
-/* Signal_t:
- * This symbol's value is either "void" or "int", corresponding to the
- * appropriate return type of a signal handler. Thus, you can declare
- * a signal handler using "Signal_t (*handler)()", and define the
- * handler using "Signal_t handler(sig)".
- */
-#define Signal_t void /* Signal handler's return type */
-
/* HASVOLATILE:
* This symbol, if defined, indicates that this C compiler knows about
* the volatile declaration.
@@ -927,20 +814,6 @@
#define volatile
#endif
-/* HAS_VPRINTF:
- * This symbol, if defined, indicates that the vprintf routine is available
- * to printf with a pointer to an argument list. If unavailable, you
- * may need to write your own, probably in terms of _doprnt().
- */
-/* USE_CHAR_VSPRINTF:
- * This symbol is defined if this system has vsprintf() returning type
- * (char*). The trend seems to be to declare it as "int vsprintf()". It
- * is up to the package author to declare vsprintf correctly based on the
- * symbol.
- */
-#define HAS_VPRINTF /**/
-/*#define USE_CHAR_VSPRINTF / **/
-
/* HAS_WAIT4:
* This symbol, if defined, indicates that wait4() exists.
*/
@@ -980,30 +853,16 @@
*/
#define Gid_t gid_t /* Type for getgid(), etc... */
-/* Groups_t:
- * This symbol holds the type used for the second argument to
- * [gs]etgroups(). Usually, this is the same of gidtype, but
- * sometimes it isn't. It can be int, ushort, uid_t, etc...
- * It may be necessary to include <sys/types.h> to get any
- * typedef'ed information. This is only required if you have
- * getgroups() or setgroups().
- */
-#if defined(HAS_GETGROUPS) || defined(HAS_SETGROUPS)
-#define Groups_t gid_t /* Type for 2nd arg to [gs]etgroups() */
-#endif
-
-/* DB_Prefix_t:
- * This symbol 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 u_int32_t.
+/* I_DBM:
+ * This symbol, if defined, indicates that <dbm.h> exists and should
+ * be included.
*/
-/* DB_Hash_t:
- * This symbol 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.
+/* I_RPCSVC_DBM:
+ * This symbol, if defined, indicates that <rpcsvc/dbm.h> exists and
+ * should be included.
*/
-#define DB_Hash_t int /**/
-#define DB_Prefix_t int /**/
+#define I_DBM /**/
+/*#define I_RPCSVC_DBM / **/
/* I_DIRENT:
* This symbol, if defined, indicates to the C program that it should
@@ -1034,7 +893,7 @@
/* I_FCNTL:
* This manifest constant tells the C program to include <fcntl.h>.
*/
-#define I_FCNTL /**/
+/*#define I_FCNTL / **/
/* I_FLOAT:
* This symbol, if defined, indicates to the C program that it should
@@ -1056,6 +915,12 @@
*/
#define I_LIMITS /**/
+/* I_LOCALE:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <locale.h>.
+ */
+#define I_LOCALE /**/
+
/* I_MATH:
* This symbol, if defined, indicates to the C program that it should
* include <math.h>.
@@ -1116,11 +981,17 @@
*/
#define I_PWD /**/
/*#define PWQUOTA / **/
-#define PWAGE /**/
+/*#define PWAGE / **/
/*#define PWCHANGE / **/
/*#define PWCLASS / **/
/*#define PWEXPIRE / **/
-#define PWCOMMENT /**/
+/*#define PWCOMMENT / **/
+
+/* I_SFIO:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <sfio.h>.
+ */
+/*#define I_SFIO / **/
/* I_STDDEF:
* This symbol, if defined, indicates that <stddef.h> exists and should
@@ -1144,13 +1015,13 @@
* This symbol, if defined, indicates to the C program that it should
* include <sys/dir.h>.
*/
-/*#define I_SYS_DIR / **/
+#define I_SYS_DIR /**/
/* I_SYS_FILE:
* This symbol, if defined, indicates to the C program that it should
* include <sys/file.h> to get definition of R_OK and friends.
*/
-/*#define I_SYS_FILE / **/
+#define I_SYS_FILE /**/
/* I_SYS_IOCTL:
* This symbol, if defined, indicates that <sys/ioctl.h> exists and should
@@ -1182,6 +1053,12 @@
*/
#define I_SYS_SELECT /**/
+/* I_SYS_STAT:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <sys/stat.h>.
+ */
+#define I_SYS_STAT /**/
+
/* I_SYS_TIMES:
* This symbol, if defined, indicates to the C program that it should
* include <sys/times.h>.
@@ -1226,22 +1103,6 @@
#define I_TERMIOS /**/
/*#define I_SGTTY / **/
-/* I_TIME:
- * This symbol, if defined, indicates to the C program that it should
- * include <time.h>.
- */
-/* I_SYS_TIME:
- * This symbol, if defined, indicates to the C program that it should
- * include <sys/time.h>.
- */
-/* I_SYS_TIME_KERNEL:
- * This symbol, if defined, indicates to the C program that it should
- * include <sys/time.h> with KERNEL defined.
- */
-/*#define I_TIME / **/
-#define I_SYS_TIME /**/
-/*#define I_SYS_TIME_KERNEL / **/
-
/* I_UNISTD:
* This symbol, if defined, indicates to the C program that it should
* include <unistd.h>.
@@ -1254,6 +1115,14 @@
*/
#define I_UTIME /**/
+/* I_VALUES:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <values.h> to get definition of symbols like MINFLOAT or
+ * MAXLONG, i.e. machine dependant limitations. Probably, you
+ * should use <limits.h> instead, if it is available.
+ */
+#define I_VALUES /**/
+
/* I_STDARG:
* This symbol, if defined, indicates that <stdarg.h> exists and should
* be included.
@@ -1271,22 +1140,6 @@
*/
/*#define I_VFORK / **/
-/* INTSIZE:
- * This symbol contains the value of sizeof(int) so that the C
- * preprocessor can make decisions based on it.
- */
-/* LONGSIZE:
- * This symbol contains the value of sizeof(long) so that the C
- * preprocessor can make decisions based on it.
- */
-/* SHORTSIZE:
- * This symbol contains the value of sizeof(short) so that the C
- * preprocessor can make decisions based on it.
- */
-#define INTSIZE 4 /**/
-#define LONGSIZE 4 /**/
-#define SHORTSIZE 2 /**/
-
/* Off_t:
* This symbol holds the type used to declare offsets in the kernel.
* It can be int, long, off_t, etc... It may be necessary to include
@@ -1294,6 +1147,21 @@
*/
#define Off_t off_t /* <offset> type */
+/* Free_t:
+ * This variable contains the return type of free(). It is usually
+ * void, but occasionally int.
+ */
+/* Malloc_t:
+ * This symbol is the type of pointer returned by malloc and realloc.
+ */
+#define Malloc_t void * /**/
+#define Free_t void /**/
+
+/* MYMALLOC:
+ * This symbol, if defined, indicates that we're using our own malloc.
+ */
+/*#define MYMALLOC / **/
+
/* Mode_t:
* This symbol holds the type used to declare file modes
* for systems calls. It is usually mode_t, but may be
@@ -1302,32 +1170,12 @@
*/
#define Mode_t mode_t /* file mode parameter for system calls */
-/* VAL_O_NONBLOCK:
- * This symbol is to be used during open() or fcntl(F_SETFL) to turn on
- * non-blocking I/O for the file descriptor. Note that there is no way
- * back, i.e. you cannot turn it blocking again this way. If you wish to
- * alternatively switch between blocking and non-blocking, use the
- * ioctl(FIOSNBIO) call instead, but that is not supported by all devices.
- */
-/* VAL_EAGAIN:
- * This symbol holds the errno error code set by read() when no data was
- * present on the non-blocking file descriptor.
- */
-/* RD_NODATA:
- * This symbol holds the return code from read() when no data is present
- * on the non-blocking file descriptor. Be careful! If EOF_NONBLOCK is
- * not defined, then you can't distinguish between no data and EOF by
- * issuing a read(). You'll have to find another way to tell for sure!
- */
-/* EOF_NONBLOCK:
- * This symbol, if defined, indicates to the C program that a read() on
- * a non-blocking file descriptor will return 0 on EOF, and not the value
- * held in RD_NODATA (-1 usually, in that case!).
+/* Pid_t:
+ * This symbol holds the type used to declare process ids in the kernel.
+ * It can be int, uint, pid_t, etc... It may be necessary to include
+ * <sys/types.h> to get any typedef'ed information.
*/
-#define VAL_O_NONBLOCK O_NONBLOCK
-#define VAL_EAGAIN EAGAIN
-#define RD_NODATA -1
-#define EOF_NONBLOCK
+#define Pid_t pid_t /* PID type */
/* CAN_PROTOTYPE:
* If defined, this macro indicates that the C compiler can handle
@@ -1347,19 +1195,14 @@
#define _(args) ()
#endif
-/* RANDBITS:
- * This symbol contains the number of bits of random number the rand()
- * function produces. Usual values are 15, 16, and 31.
- */
-#define RANDBITS 15 /**/
-
-/* Select_fd_set_t:
- * This symbol 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(), of course.
+/* SH_PATH:
+ * This symbol contains the full pathname to the shell used on this
+ * 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.
*/
-#define Select_fd_set_t fd_set * /**/
+#define SH_PATH "/bin/sh" /**/
/* Size_t:
* This symbol holds the type used to declare length parameters
@@ -1369,21 +1212,11 @@
*/
#define Size_t size_t /* length paramater for string functions */
-/* SSize_t:
- * This symbol holds the type used by functions that return
- * a count of bytes or an error condition. It must be a signed type.
- * It is usually ssize_t, but may be long or int, etc.
- * It may be necessary to include <sys/types.h> or <unistd.h>
- * to get any typedef'ed information.
- * We will pick a type such that sizeof(SSize_t) == sizeof(Size_t).
- */
-#define SSize_t ssize_t /* signed count of bytes */
-
/* STDCHAR:
* This symbol is defined to be the type of char used in stdio.h.
* It has the values "unsigned char" or "char".
*/
-#define STDCHAR unsigned char /**/
+#define STDCHAR char /**/
/* Uid_t:
* This symbol holds the type used to declare user ids in the kernel.
@@ -1392,44 +1225,46 @@
*/
#define Uid_t uid_t /* UID type */
-/* LOC_SED:
- * This symbol holds the complete pathname to the sed program.
- */
-#define LOC_SED "/bin/sed" /**/
-
-/* OSNAME:
- * This symbol contains the name of the operating system, as determined
- * by Configure. You shouldn't rely on it too much; the specific
- * feature tests from Configure are generally more reliable.
- */
-#define OSNAME "solaris" /**/
-
-/* ARCHLIB:
- * This variable, if defined, holds the name of the directory in
- * which the user wants to put architecture-dependent public
- * library files for perl5. It is most often a local directory
- * such as /usr/local/lib. Programs using this variable must be
- * prepared to deal with filename expansion. If ARCHLIB is the
- * same as PRIVLIB, it is not defined, since presumably the
- * program already searches PRIVLIB.
- */
-/* ARCHLIB_EXP:
- * This symbol contains the ~name expanded version of ARCHLIB, to be used
- * in programs that are not prepared to deal with ~ expansion at run-time.
+/* VOIDFLAGS:
+ * This symbol indicates how much support of the void type is given by this
+ * compiler. What various bits mean:
+ *
+ * 1 = supports declaration of void
+ * 2 = supports arrays of pointers to functions returning void
+ * 4 = supports comparisons between pointers to void functions and
+ * addresses of void functions
+ * 8 = suports declaration of generic void pointers
+ *
+ * The package designer should define VOIDUSED to indicate the requirements
+ * of the package. This can be done either by #defining VOIDUSED before
+ * including config.h, or by defining defvoidused in Myinit.U. If the
+ * latter approach is taken, only those flags will be tested. If the
+ * level of void support necessary is not present, defines void to int.
*/
-#define ARCHLIB "/opt/perl/lib/i86pc-solaris/5.00305" /**/
-#define ARCHLIB_EXP "/opt/perl/lib/i86pc-solaris/5.00305" /**/
+#ifndef VOIDUSED
+#define VOIDUSED 15
+#endif
+#define VOIDFLAGS 15
+#if (VOIDFLAGS & VOIDUSED) != VOIDUSED
+#define void int /* is void to be avoided? */
+#define M_VOID /* Xenix strikes again */
+#endif
-/* BINCOMPAT3:
- * This symbol, if defined, indicates that Perl 5.004 should be
- * binary-compatible with Perl 5.003.
+/* MEM_ALIGNBYTES:
+ * This symbol contains the number of bytes required to align a
+ * double. Usual values are 2, 4 and 8.
+ * On NeXT starting with 3.2, you can build "Fat" Multiple Architecture
+ * Binaries (MAB) for targets with varying alignment. This only matters
+ * for perl, where the config.h can be generated and installed on one
+ * system, and used by a different architecture to build an extension.
+ * The default is eight, for safety.
*/
-#define BINCOMPAT3 /**/
+#define MEM_ALIGNBYTES 4 /**/
/* BYTEORDER:
* This symbol holds the hexadecimal constant defined in byteorder,
* i.e. 0x1234 or 0x4321, etc...
- * On NeXT 4 (and greater), you can build "Fat" Multiple Architecture
+ * On NeXT 3.2 (and greater), you can build "Fat" Multiple Architecture
* Binaries (MAB) on either big endian or little endian machines.
* The endian-ness is available at compile-time. This only matters
* for perl, where the config.h can be generated and installed on
@@ -1449,39 +1284,32 @@
#endif /* ENDIAN CHECK */
#endif /* NeXT */
-/* CSH:
- * This symbol, if defined, indicates that the C-shell exists.
- * If defined, contains the full pathname of csh.
+/* CASTI32:
+ * This symbol is defined if the C compiler can cast negative
+ * or large floating point numbers to 32-bit ints.
*/
-#define CSH "/bin/csh" /**/
+#define CASTI32 /**/
-/* DLSYM_NEEDS_UNDERSCORE:
- * This symbol, if defined, indicates that we need to prepend an
- * underscore to the symbol name before calling dlsym(). This only
- * makes sense if you *have* dlsym, which we will presume is the
- * case if you're using dl_dlopen.xs.
+/* CASTNEGFLOAT:
+ * This symbol is defined if the C compiler can cast negative
+ * numbers to unsigned longs, ints and shorts.
*/
-/*#define DLSYM_NEEDS_UNDERSCORE / **/
-
-/* SETUID_SCRIPTS_ARE_SECURE_NOW:
- * This symbol, if defined, indicates that the bug that prevents
- * setuid scripts from being secure is not present in this kernel.
+/* CASTFLAGS:
+ * This symbol contains flags that say what 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
*/
-/* DOSUID:
- * This symbol, if defined, indicates that the C program should
- * check the script that it is executing for setuid/setgid bits, and
- * attempt to emulate setuid/setgid on systems that have disabled
- * setuid #! scripts because the kernel can't do it securely.
- * It is up to the package designer to make sure that this emulation
- * is done securely. Among other things, it should do an fstat on
- * the script it just opened to make sure it really is a setuid/setgid
- * script, it should make sure the arguments passed correspond exactly
- * to the argument on the #! line, and it should not trust any
- * subprocesses to which it must pass the filename rather than the
- * file descriptor of the script to be executed.
+/*#define CASTNEGFLOAT / **/
+#define CASTFLAGS 1 /**/
+
+/* VOID_CLOSEDIR:
+ * This symbol, if defined, indicates that the closedir() routine
+ * does not return a value.
*/
-#define SETUID_SCRIPTS_ARE_SECURE_NOW /**/
-/*#define DOSUID / **/
+/*#define VOID_CLOSEDIR / **/
/* Gconvert:
* This preprocessor macro is defined to convert a floating point
@@ -1498,64 +1326,53 @@
* d_Gconvert='sprintf((b),"%.*g",(n),(x))'
* The last two assume trailing zeros should not be kept.
*/
-#define Gconvert(x,n,t,b) gconvert((x),(n),(t),(b))
+#define Gconvert(x,n,t,b) gcvt((x),(n),(b))
-/* HAS_GETPGID:
+/* HAS_GNULIBC:
* This symbol, if defined, indicates to the C program that
- * the getpgid(pid) function is available to get the
- * process group id.
+ * the GNU C library is being used.
*/
-#define HAS_GETPGID /**/
-
-/* HAS_GETPGRP:
- * This symbol, if defined, indicates that the getpgrp routine is
- * available to get the current process group.
- */
-/* USE_BSD_GETPGRP:
- * This symbol, if defined, indicates that getpgrp needs one
- * arguments whereas USG one needs none.
+#define HAS_GNULIBC /**/
+/* HAS_ISASCII:
+ * This manifest constant lets the C program know that isascii
+ * is available.
*/
-#define HAS_GETPGRP /**/
-/*#define USE_BSD_GETPGRP / **/
+#define HAS_ISASCII /**/
-/* HAS_INET_ATON:
- * This symbol, if defined, indicates to the C program that the
- * inet_aton() function is available to parse IP address "dotted-quad"
- * strings.
+/* HAS_OPEN3:
+ * This manifest constant lets the C program know that the three
+ * argument form of open(2) is available.
*/
-#define HAS_INET_ATON /**/
+#define HAS_OPEN3 /**/
-/* HAS_SETPGID:
- * This symbol, if defined, indicates to the C program that
- * the setpgid(pid, gpid) function is available to set the
- * process group id.
+/* HAS_SAFE_BCOPY:
+ * This symbol, if defined, indicates that the bcopy routine is available
+ * to copy potentially overlapping memory blocks. Otherwise you should
+ * probably use memmove() or memcpy(). If neither is defined, roll your
+ * own version.
*/
-#define HAS_SETPGID /**/
+#define HAS_SAFE_BCOPY /**/
-/* HAS_SETPGRP:
- * This symbol, if defined, indicates that the setpgrp routine is
- * available to set the current process group.
- */
-/* USE_BSD_SETPGRP:
- * This symbol, if defined, indicates that setpgrp needs two
- * arguments whereas USG one needs none. See also HAS_SETPGID
- * for a POSIX interface.
+/* HAS_SAFE_MEMCPY:
+ * This symbol, if defined, indicates that the memcpy routine is available
+ * to copy potentially overlapping memory blocks. Otherwise you should
+ * probably use memmove() or memcpy(). If neither is defined, roll your
+ * own version.
*/
-/* USE_BSDPGRP:
- * This symbol, if defined, indicates that the BSD notion of process
- * group is to be used. For instance, you have to say setpgrp(pid, pgrp)
- * instead of the USG setpgrp(). This should be obsolete since
- * there are systems which have BSD-ish setpgrp but USG-ish getpgrp.
+/*#define HAS_SAFE_MEMCPY / **/
+
+/* HAS_SANE_MEMCMP:
+ * This symbol, if defined, indicates that the memcmp routine is available
+ * and can be used to compare relative magnitudes of chars with their high
+ * bits set. If it is not defined, roll your own version.
*/
-#define HAS_SETPGRP /**/
-/*#define USE_BSD_SETPGRP / **/
-/*#define USE_BSDPGRP / **/
+#define HAS_SANE_MEMCMP /**/
-/* USE_SFIO:
- * This symbol, if defined, indicates that sfio should
- * be used.
+/* HAS_SIGACTION:
+ * This symbol, if defined, indicates that Vr4's sigaction() routine
+ * is available.
*/
-/*#define USE_SFIO / **/
+#define HAS_SIGACTION /**/
/* Sigjmp_buf:
* This is the buffer type to be used with Sigsetjmp and Siglongjmp.
@@ -1581,78 +1398,236 @@
#define Siglongjmp(buf,retval) longjmp((buf),(retval))
#endif
-/* USE_DYNAMIC_LOADING:
- * This symbol, if defined, indicates that dynamic loading of
- * some sort is available.
+/* USE_STDIO_PTR:
+ * This symbol is defined if the _ptr and _cnt fields (or similar)
+ * of the stdio FILE structure can be used to access the stdio buffer
+ * for a file handle. If this is defined, then the FILE_ptr(fp)
+ * and FILE_cnt(fp) macros will also be defined and should be used
+ * to access these fields.
*/
-#define USE_DYNAMIC_LOADING /**/
+/* FILE_ptr:
+ * This macro is used to access the _ptr field (or equivalent) of the
+ * FILE structure pointed to by its argument. This macro will always be
+ * defined if USE_STDIO_PTR is defined.
+ */
+/* STDIO_PTR_LVALUE:
+ * This symbol is defined if the FILE_ptr macro can be used as an
+ * lvalue.
+ */
+/* FILE_cnt:
+ * This macro is used to access the _cnt field (or equivalent) of the
+ * FILE structure pointed to by its argument. This macro will always be
+ * defined if USE_STDIO_PTR is defined.
+ */
+/* STDIO_CNT_LVALUE:
+ * This symbol is defined if the FILE_cnt macro can be used as an
+ * lvalue.
+ */
+#define USE_STDIO_PTR /**/
+#ifdef USE_STDIO_PTR
+#define FILE_ptr(fp) ((fp)->_IO_read_ptr)
+#define STDIO_PTR_LVALUE /**/
+#define FILE_cnt(fp) ((fp)->_IO_read_end - (fp)->_IO_read_ptr)
+/*#define STDIO_CNT_LVALUE / **/
+#endif
-/* I_DBM:
- * This symbol, if defined, indicates that <dbm.h> exists and should
- * be included.
+/* USE_STDIO_BASE:
+ * This symbol is defined if the _base field (or similar) of the
+ * stdio FILE structure can be used to access the stdio buffer for
+ * a file handle. If this is defined, then the FILE_base(fp) macro
+ * will also be defined and should be used to access this field.
+ * Also, the FILE_bufsiz(fp) macro will be defined and should be used
+ * to determine the number of bytes in the buffer. USE_STDIO_BASE
+ * will never be defined unless USE_STDIO_PTR is.
*/
-/* I_RPCSVC_DBM:
- * This symbol, if defined, indicates that <rpcsvc/dbm.h> exists and
- * should be included.
+/* FILE_base:
+ * This macro is used to access the _base field (or equivalent) of the
+ * FILE structure pointed to by its argument. This macro will always be
+ * defined if USE_STDIO_BASE is defined.
+ */
+/* FILE_bufsiz:
+ * This macro is used to determine the number of bytes in the I/O
+ * buffer pointed to by _base field (or equivalent) of the FILE
+ * structure pointed to its argument. This macro will always be defined
+ * if USE_STDIO_BASE is defined.
*/
-/*#define I_DBM / **/
-#define I_RPCSVC_DBM /**/
+#define USE_STDIO_BASE /**/
+#ifdef USE_STDIO_BASE
+#define FILE_base(fp) ((fp)->_IO_read_base)
+#define FILE_bufsiz(fp) ((fp)->_IO_read_end - (fp)->_IO_read_base)
+#endif
-/* I_LOCALE:
- * This symbol, if defined, indicates to the C program that it should
- * include <locale.h>.
+/* HAS_VPRINTF:
+ * This symbol, if defined, indicates that the vprintf routine is available
+ * to printf with a pointer to an argument list. If unavailable, you
+ * may need to write your own, probably in terms of _doprnt().
*/
-#define I_LOCALE /**/
+/* USE_CHAR_VSPRINTF:
+ * This symbol is defined if this system has vsprintf() returning type
+ * (char*). The trend seems to be to declare it as "int vsprintf()". It
+ * is up to the package author to declare vsprintf correctly based on the
+ * symbol.
+ */
+#define HAS_VPRINTF /**/
+/*#define USE_CHAR_VSPRINTF / **/
-/* I_SFIO:
+/* I_TIME:
* This symbol, if defined, indicates to the C program that it should
- * include <sfio.h>.
+ * include <time.h>.
*/
-/*#define I_SFIO / **/
-
-/* I_SYS_STAT:
+/* I_SYS_TIME:
* This symbol, if defined, indicates to the C program that it should
- * include <sys/stat.h>.
+ * include <sys/time.h>.
*/
-#define I_SYS_STAT /**/
-
-/* I_VALUES:
+/* I_SYS_TIME_KERNEL:
* This symbol, if defined, indicates to the C program that it should
- * include <values.h> to get definition of symbols like MINFLOAT or
- * MAXLONG, i.e. machine dependant limitations. Probably, you
- * should use <limits.h> instead, if it is available.
+ * include <sys/time.h> with KERNEL defined.
*/
-#define I_VALUES /**/
+/*#define I_TIME / **/
+#define I_SYS_TIME /**/
+/*#define I_SYS_TIME_KERNEL / **/
-/* Free_t:
- * This variable contains the return type of free(). It is usually
- * void, but occasionally int.
+/* INTSIZE:
+ * This symbol contains the value of sizeof(int) so that the C
+ * preprocessor can make decisions based on it.
*/
-/* Malloc_t:
- * This symbol is the type of pointer returned by malloc and realloc.
+/* LONGSIZE:
+ * This symbol contains the value of sizeof(long) so that the C
+ * preprocessor can make decisions based on it.
*/
-#define Malloc_t void * /**/
-#define Free_t void /**/
+/* SHORTSIZE:
+ * This symbol contains the value of sizeof(short) so that the C
+ * preprocessor can make decisions based on it.
+ */
+#define INTSIZE 4 /**/
+#define LONGSIZE 4 /**/
+#define SHORTSIZE 2 /**/
-/* MYMALLOC:
- * This symbol, if defined, indicates that we're using our own malloc.
+/* VAL_O_NONBLOCK:
+ * This symbol is to be used during open() or fcntl(F_SETFL) to turn on
+ * non-blocking I/O for the file descriptor. Note that there is no way
+ * back, i.e. you cannot turn it blocking again this way. If you wish to
+ * alternatively switch between blocking and non-blocking, use the
+ * ioctl(FIOSNBIO) call instead, but that is not supported by all devices.
+ */
+/* VAL_EAGAIN:
+ * This symbol holds the errno error code set by read() when no data was
+ * present on the non-blocking file descriptor.
+ */
+/* RD_NODATA:
+ * This symbol holds the return code from read() when no data is present
+ * on the non-blocking file descriptor. Be careful! If EOF_NONBLOCK is
+ * not defined, then you can't distinguish between no data and EOF by
+ * issuing a read(). You'll have to find another way to tell for sure!
*/
-#define MYMALLOC /**/
+/* EOF_NONBLOCK:
+ * This symbol, if defined, indicates to the C program that a read() on
+ * a non-blocking file descriptor will return 0 on EOF, and not the value
+ * held in RD_NODATA (-1 usually, in that case!).
+ */
+#define VAL_O_NONBLOCK O_NONBLOCK
+#define VAL_EAGAIN EAGAIN
+#define RD_NODATA -1
+#define EOF_NONBLOCK
-/* OLDARCHLIB:
+/* RANDBITS:
+ * This symbol contains the number of bits of random number the rand()
+ * function produces. Usual values are 15, 16, and 31.
+ */
+#define RANDBITS 31 /**/
+
+/* SSize_t:
+ * This symbol holds the type used by functions that return
+ * a count of bytes or an error condition. It must be a signed type.
+ * It is usually ssize_t, but may be long or int, etc.
+ * It may be necessary to include <sys/types.h> or <unistd.h>
+ * to get any typedef'ed information.
+ * We will pick a type such that sizeof(SSize_t) == sizeof(Size_t).
+ */
+#define SSize_t ssize_t /* signed count of bytes */
+
+/* OSNAME:
+ * This symbol contains the name of the operating system, as determined
+ * by Configure. You shouldn't rely on it too much; the specific
+ * feature tests from Configure are generally more reliable.
+ */
+#define OSNAME "linux" /**/
+
+/* ARCHLIB:
* This variable, if defined, holds the name of the directory in
- * which the user has perl5.000 or perl5.001 architecture-dependent
- * public library files for perl5. For the most part, these
- * files will work with 5.002 (and later), but that is not
- * guaranteed.
+ * which the user wants to put architecture-dependent public
+ * library files for perl5. It is most often a local directory
+ * such as /usr/local/lib. Programs using this variable must be
+ * prepared to deal with filename expansion. If ARCHLIB is the
+ * same as PRIVLIB, it is not defined, since presumably the
+ * program already searches PRIVLIB.
*/
-/* OLDARCHLIB_EXP:
- * This symbol contains the ~name expanded version of OLDARCHLIB, to be
- * used in programs that are not prepared to deal with ~ expansion at
- * run-time.
+/* ARCHLIB_EXP:
+ * This symbol contains the ~name expanded version of ARCHLIB, to be used
+ * in programs that are not prepared to deal with ~ expansion at run-time.
*/
-/*#define OLDARCHLIB "" / **/
-/*#define OLDARCHLIB_EXP "" / **/
+#define ARCHLIB "/opt/perl/lib/i686-linux-thread/5.00460" /**/
+#define ARCHLIB_EXP "/opt/perl/lib/i686-linux-thread/5.00460" /**/
+
+/* CAT2:
+ * This macro catenates 2 tokens together.
+ */
+/* STRINGIFY:
+ * This macro surrounds its token with double quotes.
+ */
+#if 42 == 1
+#define CAT2(a,b)a/**/b
+#define STRINGIFY(a)"a"
+ /* If you can get stringification with catify, tell me how! */
+#endif
+#if 42 == 42
+#define CAT2(a,b)a ## b
+#define StGiFy(a)# a
+#define STRINGIFY(a)StGiFy(a)
+#endif
+#if 42 != 1 && 42 != 42
+#include "Bletch: How does this C preprocessor catenate tokens?"
+#endif
+
+/* CSH:
+ * This symbol, if defined, indicates that the C-shell exists.
+ * If defined, contains the full pathname of csh.
+ */
+#define CSH "/bin/csh" /**/
+
+/* HAS_SETGROUPS:
+ * This symbol, if defined, indicates that the setgroups() routine is
+ * available to set the list of process groups. If unavailable, multiple
+ * groups are probably not supported.
+ */
+#define HAS_SETGROUPS /**/
+
+/* Signal_t:
+ * This symbol's value is either "void" or "int", corresponding to the
+ * appropriate return type of a signal handler. Thus, you can declare
+ * a signal handler using "Signal_t (*handler)()", and define the
+ * handler using "Signal_t handler(sig)".
+ */
+#define Signal_t void /* Signal handler's return type */
+
+/* Groups_t:
+ * This symbol holds the type used for the second argument to
+ * getgroups() and setgropus(). Usually, this is the same as
+ * gidtype (gid_t) , but sometimes it isn't.
+ * It can be int, ushort, uid_t, etc...
+ * It may be necessary to include <sys/types.h> to get any
+ * typedef'ed information. This is only required if you have
+ * getgroups() or setgropus()..
+ */
+#if defined(HAS_GETGROUPS) || defined(HAS_SETGROUPS)
+#define Groups_t gid_t /* Type for 2nd arg to [sg]etgroups() */
+#endif
+
+/* I_NETDB:
+ * This symbol, if defined, indicates that <netdb.h> exists and
+ * should be included.
+ */
+#define I_NETDB /**/
/* PRIVLIB:
* This symbol contains the name of the private library for this package.
@@ -1667,15 +1642,6 @@
#define PRIVLIB "/opt/perl/lib" /**/
#define PRIVLIB_EXP "/opt/perl/lib" /**/
-/* SH_PATH:
- * This symbol contains the full pathname to the shell used on this
- * 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.
- */
-#define SH_PATH "/bin/sh" /**/
-
/* SIG_NAME:
* This symbol contains a list of signal names in order of
* signal number. This is intended
@@ -1704,8 +1670,8 @@
* The last element is 0, corresponding to the 0 at the end of
* the sig_name list.
*/
-#define SIG_NAME "ZERO","HUP","INT","QUIT","ILL","TRAP","ABRT","EMT","FPE","KILL","BUS","SEGV","SYS","PIPE","ALRM","TERM","USR1","USR2","CHLD","PWR","WINCH","URG","IO","STOP","TSTP","CONT","TTIN","TTOU","VTALRM","PROF","XCPU","XFSZ","WAITING","LWP","FREEZE","THAW","CANCEL","RTMIN","NUM38","NUM39","NUM40","NUM41","NUM42","NUM43","RTMAX","IOT","CLD","POLL",0 /**/
-#define SIG_NUM 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,6,18,22,0 /**/
+#define SIG_NAME "ZERO", "HUP", "INT", "QUIT", "ILL", "TRAP", "ABRT", "BUS", "FPE", "KILL", "USR1", "SEGV", "USR2", "PIPE", "ALRM", "TERM", "STKFLT", "CHLD", "CONT", "STOP", "TSTP", "TTIN", "TTOU", "URG", "XCPU", "XFSZ", "VTALRM", "PROF", "WINCH", "IO", "PWR", "UNUSED", "IOT", "CLD", "POLL", 0 /**/
+#define SIG_NUM 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 6, 17, 29, 0 /**/
/* SITEARCH:
* This symbol contains the name of the private library for this package.
@@ -1720,8 +1686,8 @@
* This symbol contains the ~name expanded version of SITEARCH, to be used
* in programs that are not prepared to deal with ~ expansion at run-time.
*/
-#define SITEARCH "/opt/perl/lib/site_perl/i86pc-solaris" /**/
-#define SITEARCH_EXP "/opt/perl/lib/site_perl/i86pc-solaris" /**/
+#define SITEARCH "/opt/perl/lib/site_perl/i686-linux-thread" /**/
+#define SITEARCH_EXP "/opt/perl/lib/site_perl/i686-linux-thread" /**/
/* SITELIB:
* This symbol contains the name of the private library for this package.
@@ -1739,6 +1705,39 @@
#define SITELIB "/opt/perl/lib/site_perl" /**/
#define SITELIB_EXP "/opt/perl/lib/site_perl" /**/
+/* DLSYM_NEEDS_UNDERSCORE:
+ * This symbol, if defined, indicates that we need to prepend an
+ * underscore to the symbol name before calling dlsym(). This only
+ * makes sense if you *have* dlsym, which we will presume is the
+ * case if you're using dl_dlopen.xs.
+ */
+/*#define DLSYM_NEEDS_UNDERSCORE / **/
+
+/* USE_SFIO:
+ * This symbol, if defined, indicates that sfio should
+ * be used.
+ */
+/*#define USE_SFIO / **/
+
+/* USE_DYNAMIC_LOADING:
+ * This symbol, if defined, indicates that dynamic loading of
+ * some sort is available.
+ */
+#define USE_DYNAMIC_LOADING /**/
+
+/* DB_Prefix_t:
+ * This symbol 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 u_int32_t.
+ */
+/* DB_Hash_t:
+ * This symbol 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.
+ */
+#define DB_Hash_t u_int32_t /**/
+#define DB_Prefix_t size_t /**/
+
/* STARTPERL:
* This variable contains the string to put in front of a perl
* script to make sure (one hopes) that it runs with perl and not
@@ -1753,29 +1752,60 @@
*/
/*#define USE_PERLIO / **/
-/* VOIDFLAGS:
- * This symbol indicates how much support of the void type is given by this
- * compiler. What various bits mean:
- *
- * 1 = supports declaration of void
- * 2 = supports arrays of pointers to functions returning void
- * 4 = supports comparisons between pointers to void functions and
- * addresses of void functions
- * 8 = suports declaration of generic void pointers
- *
- * The package designer should define VOIDUSED to indicate the requirements
- * of the package. This can be done either by #defining VOIDUSED before
- * including config.h, or by defining defvoidused in Myinit.U. If the
- * latter approach is taken, only those flags will be tested. If the
- * level of void support necessary is not present, defines void to int.
+/* Netdb_host_t:
+ * This symbol holds the type used for the 1st argument
+ * to gethostbyaddr().
*/
-#ifndef VOIDUSED
-#define VOIDUSED 15
-#endif
-#define VOIDFLAGS 15
-#if (VOIDFLAGS & VOIDUSED) != VOIDUSED
-#define void int /* is void to be avoided? */
-#define M_VOID /* Xenix strikes again */
-#endif
+/* Netdb_hlen_t:
+ * This symbol holds the type used for the 2nd argument
+ * to gethostbyaddr().
+ */
+/* Netdb_name_t:
+ * This symbol holds the type used for the argument to
+ * gethostbyname().
+ */
+/* Netdb_net_t:
+ * This symbol holds the type used for the 1st argument to
+ * getnetbyaddr().
+ */
+#define Netdb_host_t const char * /**/
+#define Netdb_hlen_t int /**/
+#define Netdb_name_t const char * /**/
+#define Netdb_net_t unsigned long /**/
+
+/* Select_fd_set_t:
+ * This symbol 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(), of course.
+ */
+#define Select_fd_set_t fd_set * /**/
+
+/* ARCHNAME:
+ * This symbol holds a string representing the architecture name.
+ * It may be used to construct an architecture-dependant pathname
+ * where library files may be held under a private library, for
+ * instance.
+ */
+#define ARCHNAME "i686-linux-thread" /**/
+
+/* HAS_PTHREAD_YIELD:
+ * This symbol, if defined, indicates that the pthread_yield
+ * routine is available to yield the execution of the current
+ * thread.
+ */
+/*#define HAS_PTHREAD_YIELD / **/
+
+/* PTHREADS_CREATED_JOINABLE:
+ * This symbol, if defined, indicates that pthreads are created
+ * in the joinable (aka undetached) state.
+ */
+#define PTHREADS_CREATED_JOINABLE /**/
+
+/* USE_THREADS:
+ * This symbol, if defined, indicates that Perl should
+ * be built to use threads.
+ */
+#define USE_THREADS /**/
#endif
diff --git a/Porting/pumpkin.pod b/Porting/pumpkin.pod
index 6706c6c3c4..885c813dfa 100644
--- a/Porting/pumpkin.pod
+++ b/Porting/pumpkin.pod
@@ -217,9 +217,11 @@ 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
+instead of patching these files directly. However, very minor changes to
F<Configure> may be made in between major sync-ups with the metaconfig
-units, which tends to be complicated operations.
+units, which tends to be complicated operations. But be careful, this
+can quickly spiral out of control. Running metaconfig is not really
+hard.
=head1 How to Make a Distribution
@@ -357,14 +359,19 @@ permissions for system files; something like that might be appropriate.
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
+=head2 Update Porting/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.
+[This section needs revision. We're currently working on easing
+the task of keeping the vms, win32, and plan9 config.sh info
+up-to-date.]
+
+The Porting/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
diff --git a/atomic.h b/atomic.h
new file mode 100644
index 0000000000..714bf23a6a
--- /dev/null
+++ b/atomic.h
@@ -0,0 +1,85 @@
+#ifdef __GNUC__
+
+/*
+ * These atomic operations copied from the linux kernel and altered
+ * only slightly. I need to get official permission to distribute
+ * under the Artistic License.
+ */
+/* We really need to integrate the atomic typedef with the typedef
+ * used by sv_refcnt of an SV. It's possible that for CPUs like alpha
+ * where we'd need to up sv_refcnt from 32 to 64 bits, we may be better
+ * off sticking with EMULATE_ATOMIC_REFCOUNTS instead.
+ */
+typedef U32 atomic_t; /* kludge */
+
+#ifdef i386
+
+# ifdef NO_SMP
+# define LOCK ""
+# else
+# define LOCK "lock ; "
+# endif
+
+# define __atomic_fool_gcc(x) (*(struct { int a[100]; } *)x)
+static __inline__ void atomic_inc(atomic_t *v)
+{
+ __asm__ __volatile__(
+ LOCK "incl %0"
+ :"=m" (__atomic_fool_gcc(v))
+ :"m" (__atomic_fool_gcc(v)));
+}
+
+static __inline__ int atomic_dec_and_test(atomic_t *v)
+{
+ unsigned char c;
+
+ __asm__ __volatile__(
+ LOCK "decl %0; sete %1"
+ :"=m" (__atomic_fool_gcc(v)), "=qm" (c)
+ :"m" (__atomic_fool_gcc(v)));
+ return c != 0;
+}
+# else
+/* XXX What symbol does gcc define for sparc64? */
+# ifdef sparc64
+# define __atomic_fool_gcc(x) ((struct { int a[100]; } *)x)
+typedef U32 atomic_t;
+extern __inline__ void atomic_add(int i, atomic_t *v)
+{
+ __asm__ __volatile__("
+1: lduw [%1], %%g5
+ add %%g5, %0, %%g7
+ cas [%1], %%g5, %%g7
+ sub %%g5, %%g7, %%g5
+ brnz,pn %%g5, 1b
+ nop"
+ : /* No outputs */
+ : "HIr" (i), "r" (__atomic_fool_gcc(v))
+ : "g5", "g7", "memory");
+}
+
+extern __inline__ int atomic_sub_return(int i, atomic_t *v)
+{
+ unsigned long oldval;
+ __asm__ __volatile__("
+1: lduw [%2], %%g5
+ sub %%g5, %1, %%g7
+ cas [%2], %%g5, %%g7
+ sub %%g5, %%g7, %%g5
+ brnz,pn %%g5, 1b
+ sub %%g7, %1, %0"
+ : "=&r" (oldval)
+ : "HIr" (i), "r" (__atomic_fool_gcc(v))
+ : "g5", "g7", "memory");
+ return (int)oldval;
+}
+
+#define atomic_inc(v) atomic_add(1,(v))
+#define atomic_dec_and_test(v) (atomic_sub_return(1, (v)) == 0)
+/* Add further gcc architectures here */
+# endif /* sparc64 */
+#endif /* i386 */
+#else
+/* Add non-gcc native atomic operations here */
+# define EMULATE_ATOMIC_REFCOUNTS
+#endif
diff --git a/bytecode.h b/bytecode.h
index bfa4025f14..f605e27e55 100644
--- a/bytecode.h
+++ b/bytecode.h
@@ -8,8 +8,6 @@ typedef OP *opindex;
typedef IV IV64;
EXT int iv_overflows INIT(0);
-void *bset_obj_store _((void *, I32));
-void freadpv _((U32, void *));
EXT SV *sv;
#ifndef USE_THREADS
@@ -21,17 +19,21 @@ EXT void **obj_list;
EXT I32 obj_list_fill INIT(-1);
#ifdef INDIRECT_BGET_MACROS
-#define FREAD(argp, len, nelem) bs.fread((char*)(argp),(len),(nelem),bs.data)
-#define FGETC() bs.fgetc(bs.data)
+#define BGET_FREAD(argp, len, nelem) \
+ bs.fread((char*)(argp),(len),(nelem),bs.data)
+#define BGET_FGETC() bs.fgetc(bs.data)
#else
-#define FREAD(argp, len, nelem) fread((argp), (len), (nelem), fp)
-#define FGETC() getc(fp)
+#define BGET_FREAD(argp, len, nelem) fread((argp), (len), (nelem), fp)
+#define BGET_FGETC() getc(fp)
#endif /* INDIRECT_BGET_MACROS */
-#define BGET_U32(arg) FREAD(&arg, sizeof(U32), 1); arg = ntohl((U32)arg)
-#define BGET_I32(arg) FREAD(&arg, sizeof(I32), 1); arg = (I32)ntohl((U32)arg)
-#define BGET_U16(arg) FREAD(&arg, sizeof(U16), 1); arg = ntohs((U16)arg)
-#define BGET_U8(arg) arg = FGETC()
+#define BGET_U32(arg) \
+ BGET_FREAD(&arg, sizeof(U32), 1); arg = ntohl((U32)arg)
+#define BGET_I32(arg) \
+ BGET_FREAD(&arg, sizeof(I32), 1); arg = (I32)ntohl((U32)arg)
+#define BGET_U16(arg) \
+ BGET_FREAD(&arg, sizeof(U16), 1); arg = ntohs((U16)arg)
+#define BGET_U8(arg) arg = BGET_FGETC()
#if INDIRECT_BGET_MACROS
#define BGET_PV(arg) do { \
@@ -61,7 +63,7 @@ EXT I32 obj_list_fill INIT(-1);
#endif /* INDIRECT_BGET_MACROS */
#define BGET_comment(arg) \
- do { arg = FGETC(); } while (arg != '\n' && arg != EOF)
+ do { arg = BGET_FGETC(); } while (arg != '\n' && arg != EOF)
/*
* In the following, sizeof(IV)*4 is just a way of encoding 32 on 64-bit-IV
@@ -88,7 +90,7 @@ EXT I32 obj_list_fill INIT(-1);
unsigned short *ary; \
int i; \
New(666, ary, 256, unsigned short); \
- FREAD(ary, 256, 2); \
+ BGET_FREAD(ary, 256, 2); \
for (i = 0; i < 256; i++) \
ary[i] = ntohs(ary[i]); \
arg = (char *) ary; \
@@ -96,7 +98,7 @@ EXT I32 obj_list_fill INIT(-1);
#define BGET_pvcontents(arg) arg = pv.xpv_pv
#define BGET_strconst(arg) do { \
- for (arg = tokenbuf; (*arg = FGETC()); arg++) /* nothing */; \
+ for (arg = tokenbuf; (*arg = BGET_FGETC()); arg++) /* nothing */; \
arg = tokenbuf; \
} while (0)
diff --git a/bytecode.pl b/bytecode.pl
index 8eadbdd941..4553edf9bc 100644
--- a/bytecode.pl
+++ b/bytecode.pl
@@ -34,12 +34,12 @@ EOT
my $perl_header;
($perl_header = $c_header) =~ s{[/ ]?\*/?}{#}g;
-unlink "byterun.c", "byterun.h", "ext/B/Asmdata.pm";
+unlink "byterun.c", "byterun.h", "ext/B/B/Asmdata.pm";
#
# Start with boilerplate for Asmdata.pm
#
-open(ASMDATA_PM, ">ext/B/Asmdata.pm") or die "Asmdata.pm: $!";
+open(ASMDATA_PM, ">ext/B/B/Asmdata.pm") or die "ext/B/B/Asmdata.pm: $!";
print ASMDATA_PM $perl_header, <<'EOT';
package B::Asmdata;
use Exporter;
@@ -65,20 +65,30 @@ print BYTERUN_C $c_header, <<'EOT';
#include "EXTERN.h"
#include "perl.h"
-#include "bytecode.h"
-#include "byterun.h"
+
+void *
+bset_obj_store(void *obj, I32 ix)
+{
+ if (ix > obj_list_fill) {
+ if (obj_list_fill == -1)
+ New(666, obj_list, ix + 1, void*);
+ else
+ Renew(obj_list, ix + 1, void*);
+ obj_list_fill = ix;
+ }
+ obj_list[ix] = obj;
+ return obj;
+}
#ifdef INDIRECT_BGET_MACROS
-void byterun(bs)
-struct bytestream bs;
+void byterun(struct bytestream bs)
#else
-void byterun(fp)
-FILE *fp;
+void byterun(FILE *fp)
#endif /* INDIRECT_BGET_MACROS */
{
dTHR;
int insn;
- while ((insn = FGETC()) != EOF) {
+ while ((insn = BGET_FGETC()) != EOF) {
switch (insn) {
EOT
@@ -155,18 +165,12 @@ struct bytestream {
int (*fread)(char *, size_t, size_t, void*);
void (*freadpv)(U32, void*);
};
-void freadpv _((U32, void *));
void byterun _((struct bytestream));
#else
void byterun _((FILE *));
#endif /* INDIRECT_BGET_MACROS */
-#ifndef PATCHLEVEL
-#include "patchlevel.h"
-#endif
-#if PATCHLEVEL < 4 || (PATCHLEVEL == 4 && SUBVERSION < 50)
-#define dTHR extern int errno
-#endif
+void *bset_obj_store _((void *, I32));
enum {
EOT
@@ -216,10 +220,10 @@ EXT SV * specialsv_list[%d];
#define INIT_SPECIALSV_LIST STMT_START { \
EOT
for ($i = 0; $i < @specialsv; $i++) {
- print BYTERUN_H "specialsv_list[$i] = $specialsv[$i]; \\\n";
+ print BYTERUN_H "\tspecialsv_list[$i] = $specialsv[$i]; \\\n";
}
print BYTERUN_H <<'EOT';
-} STMT_END
+ } STMT_END
EOT
#
diff --git a/byterun.c b/byterun.c
index 3d4b64fb9d..7c32930a6a 100644
--- a/byterun.c
+++ b/byterun.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 1997 Malcolm Beattie
+ * Copyright (c) 1996-1998 Malcolm Beattie
*
* You may distribute under the terms of either the GNU General Public
* License or the Artistic License, as specified in the README file.
@@ -11,20 +11,30 @@
#include "EXTERN.h"
#include "perl.h"
-#include "bytecode.h"
-#include "byterun.h"
+
+void *
+bset_obj_store(void *obj, I32 ix)
+{
+ if (ix > obj_list_fill) {
+ if (obj_list_fill == -1)
+ New(666, obj_list, ix + 1, void*);
+ else
+ Renew(obj_list, ix + 1, void*);
+ obj_list_fill = ix;
+ }
+ obj_list[ix] = obj;
+ return obj;
+}
#ifdef INDIRECT_BGET_MACROS
-void byterun(bs)
-struct bytestream bs;
+void byterun(struct bytestream bs)
#else
-void byterun(fp)
-FILE *fp;
+void byterun(FILE *fp)
#endif /* INDIRECT_BGET_MACROS */
{
dTHR;
int insn;
- while ((insn = FGETC()) != EOF) {
+ while ((insn = BGET_FGETC()) != EOF) {
switch (insn) {
case INSN_COMMENT: /* 35 */
{
diff --git a/byterun.h b/byterun.h
index 81e82049cf..edc043ddf1 100644
--- a/byterun.h
+++ b/byterun.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 1997 Malcolm Beattie
+ * Copyright (c) 1996-1998 Malcolm Beattie
*
* You may distribute under the terms of either the GNU General Public
* License or the Artistic License, as specified in the README file.
@@ -15,18 +15,12 @@ struct bytestream {
int (*fread)(char *, size_t, size_t, void*);
void (*freadpv)(U32, void*);
};
-void freadpv _((U32, void *));
void byterun _((struct bytestream));
#else
void byterun _((FILE *));
#endif /* INDIRECT_BGET_MACROS */
-#ifndef PATCHLEVEL
-#include "patchlevel.h"
-#endif
-#if PATCHLEVEL < 4 || (PATCHLEVEL == 4 && SUBVERSION < 50)
-#define dTHR extern int errno
-#endif
+void *bset_obj_store _((void *, I32));
enum {
INSN_RET, /* 0 */
@@ -187,8 +181,8 @@ EXT int optype_size[]
EXT SV * specialsv_list[4];
#define INIT_SPECIALSV_LIST STMT_START { \
-specialsv_list[0] = Nullsv; \
-specialsv_list[1] = &sv_undef; \
-specialsv_list[2] = &sv_yes; \
-specialsv_list[3] = &sv_no; \
-} STMT_END
+ specialsv_list[0] = Nullsv; \
+ specialsv_list[1] = &sv_undef; \
+ specialsv_list[2] = &sv_yes; \
+ specialsv_list[3] = &sv_no; \
+ } STMT_END
diff --git a/config_h.SH b/config_h.SH
index 5dd59fc5fa..f74da6286c 100644
--- a/config_h.SH
+++ b/config_h.SH
@@ -25,47 +25,24 @@ sed <<!GROK!THIS! >config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un-
* that running config_h.SH again will wipe out any changes you've made.
* For a more permanent change edit config.sh and rerun config_h.SH.
*
- * \$Id: Config_h.U,v 3.0.1.4 1995/09/25 09:10:49 ram Exp $
+ * \$Id: Config_h.U,v 3.0.1.5 1997/02/28 14:57:43 ram Exp $
*/
-/* Configuration time: $cf_time
- * Configured by: $cf_by
- * Target system: $myuname
+/*
+ * Package name : $package
+ * Source directory : $src
+ * Configuration time: $cf_time
+ * Configured by : $cf_by
+ * Target system : $myuname
*/
#ifndef _config_h_
#define _config_h_
-/* MEM_ALIGNBYTES:
- * This symbol contains the number of bytes required to align a
- * double. Usual values are 2, 4 and 8.
- * On NeXT starting with 3.2, you can build "Fat" Multiple Architecture
- * Binaries (MAB) for targets with varying alignment. This only matters
- * for perl, where the config.h can be generated and installed on one
- * system, and used by a different architecture to build an extension.
- * The default is eight, for safety.
- */
-#ifndef NeXT
-#define MEM_ALIGNBYTES $alignbytes /**/
-#else /* NeXT */
-#ifdef __m68k__
-#define MEM_ALIGNBYTES 2
-#else
-#ifdef __i386__
-#define MEM_ALIGNBYTES 4
-#else /* __hppa__, __sparc__ and default for unknown architectures */
-#define MEM_ALIGNBYTES 8
-#endif /* __i386__ */
-#endif /* __m68k__ */
-#endif /* NeXT */
-
-/* ARCHNAME:
- * This symbol holds a string representing the architecture name.
- * It may be used to construct an architecture-dependant pathname
- * where library files may be held under a private library, for
- * instance.
+/* LOC_SED:
+ * This symbol holds the complete pathname to the sed program.
*/
-#define ARCHNAME "$archname" /**/
+#define LOC_SED "$full_sed" /**/
/* BIN:
* This symbol holds the path of the bin directory where the package will
@@ -78,36 +55,6 @@ sed <<!GROK!THIS! >config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un-
#define BIN "$bin" /**/
#define BIN_EXP "$binexp" /**/
-/* CAT2:
- * This macro catenates 2 tokens together.
- */
-/* STRINGIFY:
- * This macro surrounds its token with double quotes.
- */
-#if $cpp_stuff == 1
-#define CAT2(a,b)a/**/b
-#define CAT3(a,b,c)a/**/b/**/c
-#define CAT4(a,b,c,d)a/**/b/**/c/**/d
-#define CAT5(a,b,c,d,e)a/**/b/**/c/**/d/**/e
-#define STRINGIFY(a)"a"
- /* If you can get stringification with catify, tell me how! */
-#endif
-#if $cpp_stuff == 42
-#define CAT2(a,b)a ## b
-#define CAT3(a,b,c)a ## b ## c
-#define CAT4(a,b,c,d)a ## b ## c ## d
-#define CAT5(a,b,c,d,e)a ## b ## c ## d ## e
-#define StGiFy(a)# a
-#define STRINGIFY(a)StGiFy(a)
-#define SCAT2(a,b)StGiFy(a) StGiFy(b)
-#define SCAT3(a,b,c)StGiFy(a) StGiFy(b) StGiFy(c)
-#define SCAT4(a,b,c,d)StGiFy(a) StGiFy(b) StGiFy(c) StGiFy(d)
-#define SCAT5(a,b,c,d,e)StGiFy(a) StGiFy(b) StGiFy(c) StGiFy(d) StGiFy(e)
-#endif
-#ifndef CAT2
-#include "Bletch: How does this C preprocessor catenate tokens?"
-#endif
-
/* CPPSTDIN:
* This symbol contains the first part of the string which will invoke
* the C preprocessor on the standard input and produce to standard
@@ -156,27 +103,6 @@ sed <<!GROK!THIS! >config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un-
*/
#$d_bzero HAS_BZERO /**/
-/* CASTI32:
- * This symbol is defined if the C compiler can cast negative
- * or large floating point numbers to 32-bit ints.
- */
-#$d_casti32 CASTI32 /**/
-
-/* CASTNEGFLOAT:
- * This symbol is defined if the C compiler can cast negative
- * numbers to unsigned longs, ints and shorts.
- */
-/* CASTFLAGS:
- * This symbol contains flags that say what 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
- */
-#$d_castneg CASTNEGFLOAT /**/
-#define CASTFLAGS $castflags /**/
-
/* HAS_CHOWN:
* This symbol, if defined, indicates that the chown routine is
* available.
@@ -195,12 +121,6 @@ sed <<!GROK!THIS! >config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un-
*/
#$d_chsize HAS_CHSIZE /**/
-/* VOID_CLOSEDIR:
- * This symbol, if defined, indicates that the closedir() routine
- * does not return a value.
- */
-#$d_void_closedir VOID_CLOSEDIR /**/
-
/* HASCONST:
* This symbol, if defined, indicates that this C compiler knows about
* the const type. There is no need to actually test for that symbol
@@ -245,6 +165,26 @@ sed <<!GROK!THIS! >config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un-
*/
#$d_dlerror HAS_DLERROR /**/
+/* SETUID_SCRIPTS_ARE_SECURE_NOW:
+ * This symbol, if defined, indicates that the bug that prevents
+ * setuid scripts from being secure is not present in this kernel.
+ */
+/* DOSUID:
+ * This symbol, if defined, indicates that the C program should
+ * check the script that it is executing for setuid/setgid bits, and
+ * attempt to emulate setuid/setgid on systems that have disabled
+ * setuid #! scripts because the kernel can't do it securely.
+ * It is up to the package designer to make sure that this emulation
+ * is done securely. Among other things, it should do an fstat on
+ * the script it just opened to make sure it really is a setuid/setgid
+ * script, it should make sure the arguments passed correspond exactly
+ * to the argument on the #! line, and it should not trust any
+ * subprocesses to which it must pass the filename rather than the
+ * file descriptor of the script to be executed.
+ */
+#$d_suidsafe SETUID_SCRIPTS_ARE_SECURE_NOW /**/
+#$d_dosuid DOSUID /**/
+
/* HAS_DUP2:
* This symbol, if defined, indicates that the dup2 routine is
* available to duplicate file descriptors.
@@ -315,13 +255,7 @@ sed <<!GROK!THIS! >config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un-
* available to get the list of process groups. If unavailable, multiple
* groups are probably not supported.
*/
-/* HAS_SETGROUPS:
- * This symbol, if defined, indicates that the setgroups() routine is
- * available to set the list of process groups. If unavailable, multiple
- * groups are probably not supported.
- */
#$d_getgrps HAS_GETGROUPS /**/
-#$d_setgrps HAS_SETGROUPS /**/
/* HAS_GETHOSTENT:
* This symbol, if defined, indicates that the gethostent routine is
@@ -329,81 +263,6 @@ sed <<!GROK!THIS! >config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un-
*/
#$d_gethent HAS_GETHOSTENT /**/
-/* HAS_GETHOSTBYADDR:
- * This symbol, if defined, indicates that the gethostbyaddr routine is
- * available to lookup hosts by their IP addresses.
- */
-#$d_gethbyaddr HAS_GETHOSTBYADDR /**/
-
-/* Netdb_host_t:
- * This symbol holds the type used for the 1st argument
- * to gethostbyaddr().
- */
-#define Netdb_host_t $netdb_host_type
-
-/* Netdb_hlen_t:
- * This symbol holds the type used for the 2nd argument
- * to gethostbyaddr().
- */
-#define Netdb_hlen_t $netdb_hlen_type
-
-/* HAS_GETHOSTBYNAME:
- * This symbol, if defined, indicates that the gethostbyname routine is
- * available to lookup hosts by their DNS names.
- */
-#$d_gethbyname HAS_GETHOSTBYNAME /**/
-
-/* Netdb_name_t:
- * This symbol holds the type used for the 1st argument
- * to gethostbyname(), the 1st argument to getnetbyname(),
- * the 1st argument to getprotobyname(), the 1st argument to
- * getservbyname(), the 2nd argument to getservbyname(),
- * and the 2nd argument to getservbyport().
- */
-#define Netdb_name_t $netdb_name_type
-
-/* HAS_GETNETBYADDR:
- * This symbol, if defined, indicates that the getnetbyaddr routine is
- * available to lookup networks by their IP addresses.
- */
-#$d_getnbyaddr HAS_GETNETBYADDR /**/
-
-/* Netdb_net_t:
- * This symbol holds the type used for the 1st argument
- * to getnetbyaddr().
- */
-#define Netdb_net_t $netdb_net_type
-
-/* HAS_GETNETBYNAME:
- * This symbol, if defined, indicates that the getnetbyname routine is
- * available to lookup networks by their names.
- */
-#$d_getnbyname HAS_GETNETBYNAME /**/
-
-/* HAS_GETPROTOBYNAME:
- * This symbol, if defined, indicates that the getprotobyname routine is
- * available to lookup protocols by their names.
- */
-#$d_getpbyname HAS_GETPROTOBYNAME /**/
-
-/* HAS_GETPROTOBYNUMBER:
- * This symbol, if defined, indicates that the getprotobynumber routine is
- * available to lookup protocols by their numbers.
- */
-#$d_getpbynumber HAS_GETPROTOBYNUMBER /**/
-
-/* HAS_GETSERVBYNAME:
- * This symbol, if defined, indicates that the getservbyname routine is
- * available to lookup services by their names.
- */
-#$d_getsbyname HAS_GETSERVBYNAME /**/
-
-/* HAS_GETSERVBYPORT:
- * This symbol, if defined, indicates that the getservbyport routine is
- * available to lookup services by their ports.
- */
-#$d_getsbyport HAS_GETSERVBYPORT /**/
-
/* HAS_UNAME:
* This symbol, if defined, indicates that the C program may use the
* uname() routine to derive the host name. See also HAS_GETHOSTNAME
@@ -417,6 +276,24 @@ sed <<!GROK!THIS! >config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un-
*/
#$d_getlogin HAS_GETLOGIN /**/
+/* HAS_GETPGID:
+ * This symbol, if defined, indicates to the C program that
+ * the getpgid(pid) function is available to get the
+ * process group id.
+ */
+#$d_getpgid HAS_GETPGID /**/
+
+/* HAS_GETPGRP:
+ * This symbol, if defined, indicates that the getpgrp routine is
+ * available to get the current process group.
+ */
+/* USE_BSD_GETPGRP:
+ * This symbol, if defined, indicates that getpgrp needs one
+ * arguments whereas USG one needs none.
+ */
+#$d_getpgrp HAS_GETPGRP /**/
+#$d_bsdgetpgrp USE_BSD_GETPGRP /**/
+
/* HAS_GETPGRP2:
* This symbol, if defined, indicates that the getpgrp2() (as in DG/UX)
* routine is available to get the current process group.
@@ -460,11 +337,12 @@ sed <<!GROK!THIS! >config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un-
#$d_htonl HAS_NTOHL /**/
#$d_htonl HAS_NTOHS /**/
-/* HAS_ISASCII:
- * This manifest constant lets the C program know that isascii
- * is available.
+/* HAS_INET_ATON:
+ * This symbol, if defined, indicates to the C program that the
+ * inet_aton() function is available to parse IP address "dotted-quad"
+ * strings.
*/
-#$d_isascii HAS_ISASCII /**/
+#$d_inetaton HAS_INET_ATON /**/
/* HAS_KILLPG:
* This symbol, if defined, indicates that the killpg routine is available
@@ -574,12 +452,6 @@ sed <<!GROK!THIS! >config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un-
*/
#$d_nice HAS_NICE /**/
-/* HAS_OPEN3:
- * This manifest constant lets the C program know that the three
- * argument form of open(2) is available.
- */
-#$d_open3 HAS_OPEN3 /**/
-
/* HAS_PATHCONF:
* This symbol, if defined, indicates that pathconf() is available
* to determine file-system related limits and options associated
@@ -607,16 +479,11 @@ sed <<!GROK!THIS! >config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un-
/* HAS_POLL:
* This symbol, if defined, indicates that the poll routine is
- * available to poll active file descriptors.
+ * available to poll active file descriptors. You may safely
+ * include <poll.h> when this symbol is defined.
*/
#$d_poll HAS_POLL /**/
-/* HAS_PTHREAD_YIELD:
- * This symbol, if defined, indicates that the pthread_yield routine is
- * available to yield the execution of the current thread.
- */
-#$d_pthread_yield HAS_PTHREAD_YIELD
-
/* HAS_READDIR:
* This symbol, if defined, indicates that the readdir routine is
* available to read directory entries. You may have to include
@@ -624,12 +491,6 @@ sed <<!GROK!THIS! >config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un-
*/
#$d_readdir HAS_READDIR /**/
-/* HAS_SCHED_YIELD:
- * This symbol, if defined, indicates that the sched_yield
- * routine is available to yield the execution of the current thread.
- */
-#$d_sched_yield HAS_SCHED_YIELD
-
/* HAS_SEEKDIR:
* This symbol, if defined, indicates that the seekdir routine is
* available. You may have to include <dirent.h>. See I_DIRENT.
@@ -668,29 +529,6 @@ sed <<!GROK!THIS! >config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un-
*/
#$d_rmdir HAS_RMDIR /**/
-/* HAS_SAFE_BCOPY:
- * This symbol, if defined, indicates that the bcopy routine is available
- * to copy potentially overlapping memory blocks. Otherwise you should
- * probably use memmove() or memcpy(). If neither is defined, roll your
- * own version.
- */
-#$d_safebcpy HAS_SAFE_BCOPY /**/
-
-/* HAS_SAFE_MEMCPY:
- * This symbol, if defined, indicates that the memcpy routine is available
- * to copy potentially overlapping memory blocks. Otherwise you should
- * probably use memmove() or memcpy(). If neither is defined, roll your
- * own version.
- */
-#$d_safemcpy HAS_SAFE_MEMCPY /**/
-
-/* HAS_SANE_MEMCMP:
- * This symbol, if defined, indicates that the memcmp routine is available
- * and can be used to compare relative magnitudes of chars with their high
- * bits set. If it is not defined, roll your own version.
- */
-#$d_sanemcmp HAS_SANE_MEMCMP /**/
-
/* HAS_SELECT:
* This symbol, if defined, indicates that the select routine is
* available to select active file descriptors. If the timeout field
@@ -729,6 +567,24 @@ sed <<!GROK!THIS! >config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un-
*/
#$d_setlocale HAS_SETLOCALE /**/
+/* HAS_SETPGID:
+ * This symbol, if defined, indicates that the setpgid(pid, gpid)
+ * routine is available to set process group ID.
+ */
+#$d_setpgid HAS_SETPGID /**/
+
+/* HAS_SETPGRP:
+ * This symbol, if defined, indicates that the setpgrp routine is
+ * available to set the current process group.
+ */
+/* USE_BSD_SETPGRP:
+ * This symbol, if defined, indicates that setpgrp needs two
+ * arguments whereas USG one needs none. See also HAS_SETPGID
+ * for a POSIX interface.
+ */
+#$d_setpgrp HAS_SETPGRP /**/
+#$d_bsdsetpgrp USE_BSD_SETPGRP /**/
+
/* HAS_SETPGRP2:
* This symbol, if defined, indicates that the setpgrp2() (as in DG/UX)
* routine is available to set the current process group.
@@ -805,12 +661,6 @@ sed <<!GROK!THIS! >config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un-
#define Shmat_t $shmattype /**/
#$d_shmatprototype HAS_SHMAT_PROTOTYPE /**/
-/* HAS_SIGACTION:
- * This symbol, if defined, indicates that Vr4's sigaction() routine
- * is available.
- */
-#$d_sigaction HAS_SIGACTION /**/
-
/* HAS_SOCKET:
* This symbol, if defined, indicates that the BSD socket interface is
* supported.
@@ -828,65 +678,6 @@ sed <<!GROK!THIS! >config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un-
*/
#$d_statblks USE_STAT_BLOCKS /**/
-/* USE_STDIO_PTR:
- * This symbol is defined if the _ptr and _cnt fields (or similar)
- * of the stdio FILE structure can be used to access the stdio buffer
- * for a file handle. If this is defined, then the FILE_ptr(fp)
- * and FILE_cnt(fp) macros will also be defined and should be used
- * to access these fields.
- */
-/* FILE_ptr:
- * This macro is used to access the _ptr field (or equivalent) of the
- * FILE structure pointed to by its argument. This macro will always be
- * defined if USE_STDIO_PTR is defined.
- */
-/* STDIO_PTR_LVALUE:
- * This symbol is defined if the FILE_ptr macro can be used as an
- * lvalue.
- */
-/* FILE_cnt:
- * This macro is used to access the _cnt field (or equivalent) of the
- * FILE structure pointed to by its argument. This macro will always be
- * defined if USE_STDIO_PTR is defined.
- */
-/* STDIO_CNT_LVALUE:
- * This symbol is defined if the FILE_cnt macro can be used as an
- * lvalue.
- */
-#$d_stdstdio USE_STDIO_PTR /**/
-#ifdef USE_STDIO_PTR
-#define FILE_ptr(fp) $stdio_ptr
-#$d_stdio_ptr_lval STDIO_PTR_LVALUE /**/
-#define FILE_cnt(fp) $stdio_cnt
-#$d_stdio_cnt_lval STDIO_CNT_LVALUE /**/
-#endif
-
-/* USE_STDIO_BASE:
- * This symbol is defined if the _base field (or similar) of the
- * stdio FILE structure can be used to access the stdio buffer for
- * a file handle. If this is defined, then the FILE_base(fp) macro
- * will also be defined and should be used to access this field.
- * Also, the FILE_bufsiz(fp) macro will be defined and should be used
- * to determine the number of bytes in the buffer. USE_STDIO_BASE
- * will never be defined unless USE_STDIO_PTR is.
- */
-/* FILE_base:
- * This macro is used to access the _base field (or equivalent) of the
- * FILE structure pointed to by its argument. This macro will always be
- * defined if USE_STDIO_BASE is defined.
- */
-/* FILE_bufsiz:
- * This macro is used to determine the number of bytes in the I/O
- * buffer pointed to by _base field (or equivalent) of the FILE
- * structure pointed to its argument. This macro will always be defined
- * if USE_STDIO_BASE is defined.
- */
-#$d_stdiobase USE_STDIO_BASE /**/
-#ifdef USE_STDIO_BASE
-#define FILE_base(fp) $stdio_base
-#define FILE_bufsiz(fp) $stdio_bufsiz
-#endif
-
/* HAS_STRCHR:
* This symbol is defined to indicate that the strchr()/strrchr()
* functions are available for string searching. If not, try the
@@ -1028,14 +819,6 @@ sed <<!GROK!THIS! >config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un-
*/
#$d_vfork HAS_VFORK /**/
-/* Signal_t:
- * This symbol's value is either "void" or "int", corresponding to the
- * appropriate return type of a signal handler. Thus, you can declare
- * a signal handler using "Signal_t (*handler)()", and define the
- * handler using "Signal_t handler(sig)".
- */
-#define Signal_t $signal_t /* Signal handler's return type */
-
/* HASVOLATILE:
* This symbol, if defined, indicates that this C compiler knows about
* the volatile declaration.
@@ -1045,20 +828,6 @@ sed <<!GROK!THIS! >config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un-
#define volatile
#endif
-/* HAS_VPRINTF:
- * This symbol, if defined, indicates that the vprintf routine is available
- * to printf with a pointer to an argument list. If unavailable, you
- * may need to write your own, probably in terms of _doprnt().
- */
-/* USE_CHAR_VSPRINTF:
- * This symbol is defined if this system has vsprintf() returning type
- * (char*). The trend seems to be to declare it as "int vsprintf()". It
- * is up to the package author to declare vsprintf correctly based on the
- * symbol.
- */
-#$d_vprintf HAS_VPRINTF /**/
-#$d_charvspr USE_CHAR_VSPRINTF /**/
-
/* HAS_WAIT4:
* This symbol, if defined, indicates that wait4() exists.
*/
@@ -1098,30 +867,16 @@ sed <<!GROK!THIS! >config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un-
*/
#define Gid_t $gidtype /* Type for getgid(), etc... */
-/* Groups_t:
- * This symbol holds the type used for the second argument to
- * [gs]etgroups(). Usually, this is the same of gidtype, but
- * sometimes it isn't. It can be int, ushort, uid_t, etc...
- * It may be necessary to include <sys/types.h> to get any
- * typedef'ed information. This is only required if you have
- * getgroups() or setgroups().
- */
-#if defined(HAS_GETGROUPS) || defined(HAS_SETGROUPS)
-#define Groups_t $groupstype /* Type for 2nd arg to [gs]etgroups() */
-#endif
-
-/* DB_Prefix_t:
- * This symbol 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 u_int32_t.
+/* I_DBM:
+ * This symbol, if defined, indicates that <dbm.h> exists and should
+ * be included.
*/
-/* DB_Hash_t:
- * This symbol 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.
+/* I_RPCSVC_DBM:
+ * This symbol, if defined, indicates that <rpcsvc/dbm.h> exists and
+ * should be included.
*/
-#define DB_Hash_t $db_hashtype /**/
-#define DB_Prefix_t $db_prefixtype /**/
+#$i_dbm I_DBM /**/
+#$i_rpcsvcdbm I_RPCSVC_DBM /**/
/* I_DIRENT:
* This symbol, if defined, indicates to the C program that it should
@@ -1174,6 +929,12 @@ sed <<!GROK!THIS! >config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un-
*/
#$i_limits I_LIMITS /**/
+/* I_LOCALE:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <locale.h>.
+ */
+#$i_locale I_LOCALE /**/
+
/* I_MATH:
* This symbol, if defined, indicates to the C program that it should
* include <math.h>.
@@ -1204,12 +965,6 @@ sed <<!GROK!THIS! >config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un-
*/
#$i_niin I_NETINET_IN /**/
-/* I_NETDB:
- * This symbol, if defined, indicates that <netdb.h> exists and
- * should be included.
- */
-#$i_netdb I_NETDB /**/
-
/* I_PWD:
* This symbol, if defined, indicates to the C program that it should
* include <pwd.h>.
@@ -1246,6 +1001,12 @@ sed <<!GROK!THIS! >config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un-
#$d_pwexpire PWEXPIRE /**/
#$d_pwcomment PWCOMMENT /**/
+/* I_SFIO:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <sfio.h>.
+ */
+#$i_sfio I_SFIO /**/
+
/* I_STDDEF:
* This symbol, if defined, indicates that <stddef.h> exists and should
* be included.
@@ -1306,6 +1067,12 @@ sed <<!GROK!THIS! >config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un-
*/
#$i_sysselct I_SYS_SELECT /**/
+/* I_SYS_STAT:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <sys/stat.h>.
+ */
+#$i_sysstat I_SYS_STAT /**/
+
/* I_SYS_TIMES:
* This symbol, if defined, indicates to the C program that it should
* include <sys/times.h>.
@@ -1350,22 +1117,6 @@ sed <<!GROK!THIS! >config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un-
#$i_termios I_TERMIOS /**/
#$i_sgtty I_SGTTY /**/
-/* I_TIME:
- * This symbol, if defined, indicates to the C program that it should
- * include <time.h>.
- */
-/* I_SYS_TIME:
- * This symbol, if defined, indicates to the C program that it should
- * include <sys/time.h>.
- */
-/* I_SYS_TIME_KERNEL:
- * This symbol, if defined, indicates to the C program that it should
- * include <sys/time.h> with KERNEL defined.
- */
-#$i_time I_TIME /**/
-#$i_systime I_SYS_TIME /**/
-#$i_systimek I_SYS_TIME_KERNEL /**/
-
/* I_UNISTD:
* This symbol, if defined, indicates to the C program that it should
* include <unistd.h>.
@@ -1378,6 +1129,14 @@ sed <<!GROK!THIS! >config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un-
*/
#$i_utime I_UTIME /**/
+/* I_VALUES:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <values.h> to get definition of symbols like MINFLOAT or
+ * MAXLONG, i.e. machine dependant limitations. Probably, you
+ * should use <limits.h> instead, if it is available.
+ */
+#$i_values I_VALUES /**/
+
/* I_STDARG:
* This symbol, if defined, indicates that <stdarg.h> exists and should
* be included.
@@ -1395,22 +1154,6 @@ sed <<!GROK!THIS! >config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un-
*/
#$i_vfork I_VFORK /**/
-/* INTSIZE:
- * This symbol contains the value of sizeof(int) so that the C
- * preprocessor can make decisions based on it.
- */
-/* LONGSIZE:
- * This symbol contains the value of sizeof(long) so that the C
- * preprocessor can make decisions based on it.
- */
-/* SHORTSIZE:
- * This symbol contains the value of sizeof(short) so that the C
- * preprocessor can make decisions based on it.
- */
-#define INTSIZE $intsize /**/
-#define LONGSIZE $longsize /**/
-#define SHORTSIZE $shortsize /**/
-
/* Off_t:
* This symbol holds the type used to declare offsets in the kernel.
* It can be int, long, off_t, etc... It may be necessary to include
@@ -1418,6 +1161,21 @@ sed <<!GROK!THIS! >config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un-
*/
#define Off_t $lseektype /* <offset> type */
+/* Free_t:
+ * This variable contains the return type of free(). It is usually
+ * void, but occasionally int.
+ */
+/* Malloc_t:
+ * This symbol is the type of pointer returned by malloc and realloc.
+ */
+#define Malloc_t $malloctype /**/
+#define Free_t $freetype /**/
+
+/* MYMALLOC:
+ * This symbol, if defined, indicates that we're using our own malloc.
+ */
+#$d_mymalloc MYMALLOC /**/
+
/* Mode_t:
* This symbol holds the type used to declare file modes
* for systems calls. It is usually mode_t, but may be
@@ -1426,32 +1184,12 @@ sed <<!GROK!THIS! >config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un-
*/
#define Mode_t $modetype /* file mode parameter for system calls */
-/* VAL_O_NONBLOCK:
- * This symbol is to be used during open() or fcntl(F_SETFL) to turn on
- * non-blocking I/O for the file descriptor. Note that there is no way
- * back, i.e. you cannot turn it blocking again this way. If you wish to
- * alternatively switch between blocking and non-blocking, use the
- * ioctl(FIOSNBIO) call instead, but that is not supported by all devices.
- */
-/* VAL_EAGAIN:
- * This symbol holds the errno error code set by read() when no data was
- * present on the non-blocking file descriptor.
- */
-/* RD_NODATA:
- * This symbol holds the return code from read() when no data is present
- * on the non-blocking file descriptor. Be careful! If EOF_NONBLOCK is
- * not defined, then you can't distinguish between no data and EOF by
- * issuing a read(). You'll have to find another way to tell for sure!
- */
-/* EOF_NONBLOCK:
- * This symbol, if defined, indicates to the C program that a read() on
- * a non-blocking file descriptor will return 0 on EOF, and not the value
- * held in RD_NODATA (-1 usually, in that case!).
+/* Pid_t:
+ * This symbol holds the type used to declare process ids in the kernel.
+ * It can be int, uint, pid_t, etc... It may be necessary to include
+ * <sys/types.h> to get any typedef'ed information.
*/
-#define VAL_O_NONBLOCK $o_nonblock
-#define VAL_EAGAIN $eagain
-#define RD_NODATA $rd_nodata
-#$d_eofnblk EOF_NONBLOCK
+#define Pid_t $pidtype /* PID type */
/* CAN_PROTOTYPE:
* If defined, this macro indicates that the C compiler can handle
@@ -1471,19 +1209,14 @@ sed <<!GROK!THIS! >config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un-
#define _(args) ()
#endif
-/* RANDBITS:
- * This symbol contains the number of bits of random number the rand()
- * function produces. Usual values are 15, 16, and 31.
- */
-#define RANDBITS $randbits /**/
-
-/* Select_fd_set_t:
- * This symbol 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(), of course.
+/* SH_PATH:
+ * This symbol contains the full pathname to the shell used on this
+ * 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.
*/
-#define Select_fd_set_t $selecttype /**/
+#define SH_PATH "$sh" /**/
/* Size_t:
* This symbol holds the type used to declare length parameters
@@ -1493,16 +1226,6 @@ sed <<!GROK!THIS! >config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un-
*/
#define Size_t $sizetype /* length paramater for string functions */
-/* SSize_t:
- * This symbol holds the type used by functions that return
- * a count of bytes or an error condition. It must be a signed type.
- * It is usually ssize_t, but may be long or int, etc.
- * It may be necessary to include <sys/types.h> or <unistd.h>
- * to get any typedef'ed information.
- * We will pick a type such that sizeof(SSize_t) == sizeof(Size_t).
- */
-#define SSize_t $ssizetype /* signed count of bytes */
-
/* STDCHAR:
* This symbol is defined to be the type of char used in stdio.h.
* It has the values "unsigned char" or "char".
@@ -1516,39 +1239,41 @@ sed <<!GROK!THIS! >config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un-
*/
#define Uid_t $uidtype /* UID type */
-/* LOC_SED:
- * This symbol holds the complete pathname to the sed program.
- */
-#define LOC_SED "$full_sed" /**/
-
-/* OSNAME:
- * This symbol contains the name of the operating system, as determined
- * by Configure. You shouldn't rely on it too much; the specific
- * feature tests from Configure are generally more reliable.
- */
-#define OSNAME "$osname" /**/
-
-/* ARCHLIB:
- * This variable, if defined, 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. If ARCHLIB is the
- * same as PRIVLIB, it is not defined, since presumably the
- * program already searches PRIVLIB.
- */
-/* ARCHLIB_EXP:
- * This symbol contains the ~name expanded version of ARCHLIB, to be used
- * in programs that are not prepared to deal with ~ expansion at run-time.
+/* VOIDFLAGS:
+ * This symbol indicates how much support of the void type is given by this
+ * compiler. What various bits mean:
+ *
+ * 1 = supports declaration of void
+ * 2 = supports arrays of pointers to functions returning void
+ * 4 = supports comparisons between pointers to void functions and
+ * addresses of void functions
+ * 8 = suports declaration of generic void pointers
+ *
+ * The package designer should define VOIDUSED to indicate the requirements
+ * of the package. This can be done either by #defining VOIDUSED before
+ * including config.h, or by defining defvoidused in Myinit.U. If the
+ * latter approach is taken, only those flags will be tested. If the
+ * level of void support necessary is not present, defines void to int.
*/
-#$d_archlib ARCHLIB "$archlib" /**/
-#$d_archlib ARCHLIB_EXP "$archlibexp" /**/
+#ifndef VOIDUSED
+#define VOIDUSED $defvoidused
+#endif
+#define VOIDFLAGS $voidflags
+#if (VOIDFLAGS & VOIDUSED) != VOIDUSED
+#define void int /* is void to be avoided? */
+#define M_VOID /* Xenix strikes again */
+#endif
-/* BINCOMPAT3:
- * This symbol, if defined, indicates that Perl 5.004 should be
- * binary-compatible with Perl 5.003.
+/* MEM_ALIGNBYTES:
+ * This symbol contains the number of bytes required to align a
+ * double. Usual values are 2, 4 and 8.
+ * On NeXT starting with 3.2, you can build "Fat" Multiple Architecture
+ * Binaries (MAB) for targets with varying alignment. This only matters
+ * for perl, where the config.h can be generated and installed on one
+ * system, and used by a different architecture to build an extension.
+ * The default is eight, for safety.
*/
-#$d_bincompat3 BINCOMPAT3 /**/
+#define MEM_ALIGNBYTES $alignbytes /**/
/* BYTEORDER:
* This symbol holds the hexadecimal constant defined in byteorder,
@@ -1573,39 +1298,32 @@ sed <<!GROK!THIS! >config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un-
#endif /* ENDIAN CHECK */
#endif /* NeXT */
-/* CSH:
- * This symbol, if defined, indicates that the C-shell exists.
- * If defined, contains the full pathname of csh.
+/* CASTI32:
+ * This symbol is defined if the C compiler can cast negative
+ * or large floating point numbers to 32-bit ints.
*/
-#$d_csh CSH "$full_csh" /**/
+#$d_casti32 CASTI32 /**/
-/* DLSYM_NEEDS_UNDERSCORE:
- * This symbol, if defined, indicates that we need to prepend an
- * underscore to the symbol name before calling dlsym(). This only
- * makes sense if you *have* dlsym, which we will presume is the
- * case if you're using dl_dlopen.xs.
+/* CASTNEGFLOAT:
+ * This symbol is defined if the C compiler can cast negative
+ * numbers to unsigned longs, ints and shorts.
*/
-#$d_dlsymun DLSYM_NEEDS_UNDERSCORE /**/
-
-/* SETUID_SCRIPTS_ARE_SECURE_NOW:
- * This symbol, if defined, indicates that the bug that prevents
- * setuid scripts from being secure is not present in this kernel.
+/* CASTFLAGS:
+ * This symbol contains flags that say what 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
*/
-/* DOSUID:
- * This symbol, if defined, indicates that the C program should
- * check the script that it is executing for setuid/setgid bits, and
- * attempt to emulate setuid/setgid on systems that have disabled
- * setuid #! scripts because the kernel can't do it securely.
- * It is up to the package designer to make sure that this emulation
- * is done securely. Among other things, it should do an fstat on
- * the script it just opened to make sure it really is a setuid/setgid
- * script, it should make sure the arguments passed correspond exactly
- * to the argument on the #! line, and it should not trust any
- * subprocesses to which it must pass the filename rather than the
- * file descriptor of the script to be executed.
+#$d_castneg CASTNEGFLOAT /**/
+#define CASTFLAGS $castflags /**/
+
+/* VOID_CLOSEDIR:
+ * This symbol, if defined, indicates that the closedir() routine
+ * does not return a value.
*/
-#$d_suidsafe SETUID_SCRIPTS_ARE_SECURE_NOW /**/
-#$d_dosuid DOSUID /**/
+#$d_void_closedir VOID_CLOSEDIR /**/
/* Gconvert:
* This preprocessor macro is defined to convert a floating point
@@ -1624,68 +1342,51 @@ sed <<!GROK!THIS! >config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un-
*/
#define Gconvert(x,n,t,b) $d_Gconvert
-/* HAS_GETPGID:
+/* HAS_GNULIBC:
* This symbol, if defined, indicates to the C program that
- * the getpgid(pid) function is available to get the
- * process group id.
- */
-#$d_getpgid HAS_GETPGID /**/
-
-/* HAS_GETPGRP:
- * This symbol, if defined, indicates that the getpgrp routine is
- * available to get the current process group.
+ * the GNU C library is being used.
*/
-/* USE_BSD_GETPGRP:
- * This symbol, if defined, indicates that getpgrp needs one
- * arguments whereas USG one needs none.
+#$d_gnulibc HAS_GNULIBC /**/
+/* HAS_ISASCII:
+ * This manifest constant lets the C program know that isascii
+ * is available.
*/
-#$d_getpgrp HAS_GETPGRP /**/
-#$d_bsdgetpgrp USE_BSD_GETPGRP /**/
+#$d_isascii HAS_ISASCII /**/
-/* HAS_INET_ATON:
- * This symbol, if defined, indicates to the C program that the
- * inet_aton() function is available to parse IP address "dotted-quad"
- * strings.
+/* HAS_OPEN3:
+ * This manifest constant lets the C program know that the three
+ * argument form of open(2) is available.
*/
-#$d_inetaton HAS_INET_ATON /**/
+#$d_open3 HAS_OPEN3 /**/
-/* HAS_SETPGID:
- * This symbol, if defined, indicates to the C program that
- * the setpgid(pid, gpid) function is available to set the
- * process group id.
+/* HAS_SAFE_BCOPY:
+ * This symbol, if defined, indicates that the bcopy routine is available
+ * to copy potentially overlapping memory blocks. Otherwise you should
+ * probably use memmove() or memcpy(). If neither is defined, roll your
+ * own version.
*/
-#$d_setpgid HAS_SETPGID /**/
+#$d_safebcpy HAS_SAFE_BCOPY /**/
-/* HAS_SETPGRP:
- * This symbol, if defined, indicates that the setpgrp routine is
- * available to set the current process group.
- */
-/* USE_BSD_SETPGRP:
- * This symbol, if defined, indicates that setpgrp needs two
- * arguments whereas USG one needs none. See also HAS_SETPGID
- * for a POSIX interface.
- */
-/* USE_BSDPGRP:
- * This symbol, if defined, indicates that the BSD notion of process
- * group is to be used. For instance, you have to say setpgrp(pid, pgrp)
- * instead of the USG setpgrp(). This should be obsolete since
- * there are systems which have BSD-ish setpgrp but USG-ish getpgrp.
+/* HAS_SAFE_MEMCPY:
+ * This symbol, if defined, indicates that the memcpy routine is available
+ * to copy potentially overlapping memory blocks. Otherwise you should
+ * probably use memmove() or memcpy(). If neither is defined, roll your
+ * own version.
*/
-#$d_setpgrp HAS_SETPGRP /**/
-#$d_bsdsetpgrp USE_BSD_SETPGRP /**/
-#$d_bsdpgrp USE_BSDPGRP /**/
+#$d_safemcpy HAS_SAFE_MEMCPY /**/
-/* USE_SFIO:
- * This symbol, if defined, indicates that sfio should
- * be used.
+/* HAS_SANE_MEMCMP:
+ * This symbol, if defined, indicates that the memcmp routine is available
+ * and can be used to compare relative magnitudes of chars with their high
+ * bits set. If it is not defined, roll your own version.
*/
-#$d_sfio USE_SFIO /**/
+#$d_sanemcmp HAS_SANE_MEMCMP /**/
-/* PTHREADS_CREATED_JOINABLE:
- * This symbol, if defined, indicates that pthreads are created
- * in the joinable (aka undetached) state.
+/* HAS_SIGACTION:
+ * This symbol, if defined, indicates that Vr4's sigaction() routine
+ * is available.
*/
-#$d_pthreads_created_joinable PTHREADS_CREATED_JOINABLE /**/
+#$d_sigaction HAS_SIGACTION /**/
/* Sigjmp_buf:
* This is the buffer type to be used with Sigsetjmp and Siglongjmp.
@@ -1711,78 +1412,236 @@ sed <<!GROK!THIS! >config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un-
#define Siglongjmp(buf,retval) longjmp((buf),(retval))
#endif
-/* USE_DYNAMIC_LOADING:
- * This symbol, if defined, indicates that dynamic loading of
- * some sort is available.
+/* USE_STDIO_PTR:
+ * This symbol is defined if the _ptr and _cnt fields (or similar)
+ * of the stdio FILE structure can be used to access the stdio buffer
+ * for a file handle. If this is defined, then the FILE_ptr(fp)
+ * and FILE_cnt(fp) macros will also be defined and should be used
+ * to access these fields.
*/
-#$usedl USE_DYNAMIC_LOADING /**/
+/* FILE_ptr:
+ * This macro is used to access the _ptr field (or equivalent) of the
+ * FILE structure pointed to by its argument. This macro will always be
+ * defined if USE_STDIO_PTR is defined.
+ */
+/* STDIO_PTR_LVALUE:
+ * This symbol is defined if the FILE_ptr macro can be used as an
+ * lvalue.
+ */
+/* FILE_cnt:
+ * This macro is used to access the _cnt field (or equivalent) of the
+ * FILE structure pointed to by its argument. This macro will always be
+ * defined if USE_STDIO_PTR is defined.
+ */
+/* STDIO_CNT_LVALUE:
+ * This symbol is defined if the FILE_cnt macro can be used as an
+ * lvalue.
+ */
+#$d_stdstdio USE_STDIO_PTR /**/
+#ifdef USE_STDIO_PTR
+#define FILE_ptr(fp) $stdio_ptr
+#$d_stdio_ptr_lval STDIO_PTR_LVALUE /**/
+#define FILE_cnt(fp) $stdio_cnt
+#$d_stdio_cnt_lval STDIO_CNT_LVALUE /**/
+#endif
-/* I_DBM:
- * This symbol, if defined, indicates that <dbm.h> exists and should
- * be included.
+/* USE_STDIO_BASE:
+ * This symbol is defined if the _base field (or similar) of the
+ * stdio FILE structure can be used to access the stdio buffer for
+ * a file handle. If this is defined, then the FILE_base(fp) macro
+ * will also be defined and should be used to access this field.
+ * Also, the FILE_bufsiz(fp) macro will be defined and should be used
+ * to determine the number of bytes in the buffer. USE_STDIO_BASE
+ * will never be defined unless USE_STDIO_PTR is.
*/
-/* I_RPCSVC_DBM:
- * This symbol, if defined, indicates that <rpcsvc/dbm.h> exists and
- * should be included.
+/* FILE_base:
+ * This macro is used to access the _base field (or equivalent) of the
+ * FILE structure pointed to by its argument. This macro will always be
+ * defined if USE_STDIO_BASE is defined.
*/
-#$i_dbm I_DBM /**/
-#$i_rpcsvcdbm I_RPCSVC_DBM /**/
+/* FILE_bufsiz:
+ * This macro is used to determine the number of bytes in the I/O
+ * buffer pointed to by _base field (or equivalent) of the FILE
+ * structure pointed to its argument. This macro will always be defined
+ * if USE_STDIO_BASE is defined.
+ */
+#$d_stdiobase USE_STDIO_BASE /**/
+#ifdef USE_STDIO_BASE
+#define FILE_base(fp) $stdio_base
+#define FILE_bufsiz(fp) $stdio_bufsiz
+#endif
-/* I_LOCALE:
- * This symbol, if defined, indicates to the C program that it should
- * include <locale.h>.
+/* HAS_VPRINTF:
+ * This symbol, if defined, indicates that the vprintf routine is available
+ * to printf with a pointer to an argument list. If unavailable, you
+ * may need to write your own, probably in terms of _doprnt().
*/
-#$i_locale I_LOCALE /**/
+/* USE_CHAR_VSPRINTF:
+ * This symbol is defined if this system has vsprintf() returning type
+ * (char*). The trend seems to be to declare it as "int vsprintf()". It
+ * is up to the package author to declare vsprintf correctly based on the
+ * symbol.
+ */
+#$d_vprintf HAS_VPRINTF /**/
+#$d_charvspr USE_CHAR_VSPRINTF /**/
-/* I_SFIO:
+/* I_TIME:
* This symbol, if defined, indicates to the C program that it should
- * include <sfio.h>.
+ * include <time.h>.
*/
-#$i_sfio I_SFIO /**/
-
-/* I_SYS_STAT:
+/* I_SYS_TIME:
* This symbol, if defined, indicates to the C program that it should
- * include <sys/stat.h>.
+ * include <sys/time.h>.
*/
-#$i_sysstat I_SYS_STAT /**/
-
-/* I_VALUES:
+/* I_SYS_TIME_KERNEL:
* This symbol, if defined, indicates to the C program that it should
- * include <values.h> to get definition of symbols like MINFLOAT or
- * MAXLONG, i.e. machine dependant limitations. Probably, you
- * should use <limits.h> instead, if it is available.
+ * include <sys/time.h> with KERNEL defined.
*/
-#$i_values I_VALUES /**/
+#$i_time I_TIME /**/
+#$i_systime I_SYS_TIME /**/
+#$i_systimek I_SYS_TIME_KERNEL /**/
-/* Free_t:
- * This variable contains the return type of free(). It is usually
- * void, but occasionally int.
+/* INTSIZE:
+ * This symbol contains the value of sizeof(int) so that the C
+ * preprocessor can make decisions based on it.
*/
-/* Malloc_t:
- * This symbol is the type of pointer returned by malloc and realloc.
+/* LONGSIZE:
+ * This symbol contains the value of sizeof(long) so that the C
+ * preprocessor can make decisions based on it.
*/
-#define Malloc_t $malloctype /**/
-#define Free_t $freetype /**/
+/* SHORTSIZE:
+ * This symbol contains the value of sizeof(short) so that the C
+ * preprocessor can make decisions based on it.
+ */
+#define INTSIZE $intsize /**/
+#define LONGSIZE $longsize /**/
+#define SHORTSIZE $shortsize /**/
-/* MYMALLOC:
- * This symbol, if defined, indicates that we're using our own malloc.
+/* VAL_O_NONBLOCK:
+ * This symbol is to be used during open() or fcntl(F_SETFL) to turn on
+ * non-blocking I/O for the file descriptor. Note that there is no way
+ * back, i.e. you cannot turn it blocking again this way. If you wish to
+ * alternatively switch between blocking and non-blocking, use the
+ * ioctl(FIOSNBIO) call instead, but that is not supported by all devices.
*/
-#$d_mymalloc MYMALLOC /**/
+/* VAL_EAGAIN:
+ * This symbol holds the errno error code set by read() when no data was
+ * present on the non-blocking file descriptor.
+ */
+/* RD_NODATA:
+ * This symbol holds the return code from read() when no data is present
+ * on the non-blocking file descriptor. Be careful! If EOF_NONBLOCK is
+ * not defined, then you can't distinguish between no data and EOF by
+ * issuing a read(). You'll have to find another way to tell for sure!
+ */
+/* EOF_NONBLOCK:
+ * This symbol, if defined, indicates to the C program that a read() on
+ * a non-blocking file descriptor will return 0 on EOF, and not the value
+ * held in RD_NODATA (-1 usually, in that case!).
+ */
+#define VAL_O_NONBLOCK $o_nonblock
+#define VAL_EAGAIN $eagain
+#define RD_NODATA $rd_nodata
+#$d_eofnblk EOF_NONBLOCK
+
+/* RANDBITS:
+ * This symbol contains the number of bits of random number the rand()
+ * function produces. Usual values are 15, 16, and 31.
+ */
+#define RANDBITS $randbits /**/
+
+/* SSize_t:
+ * This symbol holds the type used by functions that return
+ * a count of bytes or an error condition. It must be a signed type.
+ * It is usually ssize_t, but may be long or int, etc.
+ * It may be necessary to include <sys/types.h> or <unistd.h>
+ * to get any typedef'ed information.
+ * We will pick a type such that sizeof(SSize_t) == sizeof(Size_t).
+ */
+#define SSize_t $ssizetype /* signed count of bytes */
-/* OLDARCHLIB:
+/* OSNAME:
+ * This symbol contains the name of the operating system, as determined
+ * by Configure. You shouldn't rely on it too much; the specific
+ * feature tests from Configure are generally more reliable.
+ */
+#define OSNAME "$osname" /**/
+
+/* ARCHLIB:
* This variable, if defined, holds the name of the directory in
- * which the user has perl5.000 or perl5.001 architecture-dependent
- * public library files for $package. For the most part, these
- * files will work with 5.002 (and later), but that is not
- * guaranteed.
+ * 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. If ARCHLIB is the
+ * same as PRIVLIB, it is not defined, since presumably the
+ * program already searches PRIVLIB.
+ */
+/* ARCHLIB_EXP:
+ * This symbol contains the ~name expanded version of ARCHLIB, to be used
+ * in programs that are not prepared to deal with ~ expansion at run-time.
+ */
+#$d_archlib ARCHLIB "$archlib" /**/
+#$d_archlib ARCHLIB_EXP "$archlibexp" /**/
+
+/* CAT2:
+ * This macro catenates 2 tokens together.
+ */
+/* STRINGIFY:
+ * This macro surrounds its token with double quotes.
+ */
+#if $cpp_stuff == 1
+#define CAT2(a,b)a/**/b
+#define STRINGIFY(a)"a"
+ /* If you can get stringification with catify, tell me how! */
+#endif
+#if $cpp_stuff == 42
+#define CAT2(a,b)a ## b
+#define StGiFy(a)# a
+#define STRINGIFY(a)StGiFy(a)
+#endif
+#if $cpp_stuff != 1 && $cpp_stuff != 42
+#include "Bletch: How does this C preprocessor catenate tokens?"
+#endif
+
+/* CSH:
+ * This symbol, if defined, indicates that the C-shell exists.
+ * If defined, contains the full pathname of csh.
*/
-/* OLDARCHLIB_EXP:
- * This symbol contains the ~name expanded version of OLDARCHLIB, to be
- * used in programs that are not prepared to deal with ~ expansion at
- * run-time.
+#$d_csh CSH "$full_csh" /**/
+
+/* HAS_SETGROUPS:
+ * This symbol, if defined, indicates that the setgroups() routine is
+ * available to set the list of process groups. If unavailable, multiple
+ * groups are probably not supported.
*/
-#$d_oldarchlib OLDARCHLIB "$oldarchlib" /**/
-#$d_oldarchlib OLDARCHLIB_EXP "$oldarchlibexp" /**/
+#$d_setgrps HAS_SETGROUPS /**/
+
+/* Signal_t:
+ * This symbol's value is either "void" or "int", corresponding to the
+ * appropriate return type of a signal handler. Thus, you can declare
+ * a signal handler using "Signal_t (*handler)()", and define the
+ * handler using "Signal_t handler(sig)".
+ */
+#define Signal_t $signal_t /* Signal handler's return type */
+
+/* Groups_t:
+ * This symbol holds the type used for the second argument to
+ * getgroups() and setgropus(). Usually, this is the same as
+ * gidtype (gid_t) , but sometimes it isn't.
+ * It can be int, ushort, uid_t, etc...
+ * It may be necessary to include <sys/types.h> to get any
+ * typedef'ed information. This is only required if you have
+ * getgroups() or setgropus()..
+ */
+#if defined(HAS_GETGROUPS) || defined(HAS_SETGROUPS)
+#define Groups_t $groupstype /* Type for 2nd arg to [sg]etgroups() */
+#endif
+
+/* I_NETDB:
+ * This symbol, if defined, indicates that <netdb.h> exists and
+ * should be included.
+ */
+#$i_netdb I_NETDB /**/
/* PRIVLIB:
* This symbol contains the name of the private library for this package.
@@ -1797,15 +1656,6 @@ sed <<!GROK!THIS! >config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un-
#define PRIVLIB "$privlib" /**/
#define PRIVLIB_EXP "$privlibexp" /**/
-/* SH_PATH:
- * This symbol contains the full pathname to the shell used on this
- * 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.
- */
-#define SH_PATH "$sh" /**/
-
/* SIG_NAME:
* This symbol contains a list of signal names in order of
* signal number. This is intended
@@ -1834,8 +1684,8 @@ sed <<!GROK!THIS! >config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un-
* The last element is 0, corresponding to the 0 at the end of
* the sig_name list.
*/
-#define SIG_NAME "`echo $sig_name | sed 's/ /","/g'`",0 /**/
-#define SIG_NUM `echo $sig_num 0 | sed 's/ /,/g'` /**/
+#define SIG_NAME $sig_name_init /**/
+#define SIG_NUM $sig_num /**/
/* SITEARCH:
* This symbol contains the name of the private library for this package.
@@ -1869,6 +1719,39 @@ sed <<!GROK!THIS! >config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un-
#define SITELIB "$sitelib" /**/
#define SITELIB_EXP "$sitelibexp" /**/
+/* DLSYM_NEEDS_UNDERSCORE:
+ * This symbol, if defined, indicates that we need to prepend an
+ * underscore to the symbol name before calling dlsym(). This only
+ * makes sense if you *have* dlsym, which we will presume is the
+ * case if you're using dl_dlopen.xs.
+ */
+#$d_dlsymun DLSYM_NEEDS_UNDERSCORE /**/
+
+/* USE_SFIO:
+ * This symbol, if defined, indicates that sfio should
+ * be used.
+ */
+#$d_sfio USE_SFIO /**/
+
+/* USE_DYNAMIC_LOADING:
+ * This symbol, if defined, indicates that dynamic loading of
+ * some sort is available.
+ */
+#$usedl USE_DYNAMIC_LOADING /**/
+
+/* DB_Prefix_t:
+ * This symbol 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 u_int32_t.
+ */
+/* DB_Hash_t:
+ * This symbol 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.
+ */
+#define DB_Hash_t $db_hashtype /**/
+#define DB_Prefix_t $db_prefixtype /**/
+
/* STARTPERL:
* This variable contains the string to put in front of a perl
* script to make sure (one hopes) that it runs with perl and not
@@ -1883,30 +1766,61 @@ sed <<!GROK!THIS! >config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un-
*/
#$useperlio USE_PERLIO /**/
-/* VOIDFLAGS:
- * This symbol indicates how much support of the void type is given by this
- * compiler. What various bits mean:
- *
- * 1 = supports declaration of void
- * 2 = supports arrays of pointers to functions returning void
- * 4 = supports comparisons between pointers to void functions and
- * addresses of void functions
- * 8 = suports declaration of generic void pointers
- *
- * The package designer should define VOIDUSED to indicate the requirements
- * of the package. This can be done either by #defining VOIDUSED before
- * including config.h, or by defining defvoidused in Myinit.U. If the
- * latter approach is taken, only those flags will be tested. If the
- * level of void support necessary is not present, defines void to int.
+/* Netdb_host_t:
+ * This symbol holds the type used for the 1st argument
+ * to gethostbyaddr().
*/
-#ifndef VOIDUSED
-#define VOIDUSED $defvoidused
-#endif
-#define VOIDFLAGS $voidflags
-#if (VOIDFLAGS & VOIDUSED) != VOIDUSED
-#define void int /* is void to be avoided? */
-#define M_VOID /* Xenix strikes again */
-#endif
+/* Netdb_hlen_t:
+ * This symbol holds the type used for the 2nd argument
+ * to gethostbyaddr().
+ */
+/* Netdb_name_t:
+ * This symbol holds the type used for the argument to
+ * gethostbyname().
+ */
+/* Netdb_net_t:
+ * This symbol holds the type used for the 1st argument to
+ * getnetbyaddr().
+ */
+#define Netdb_host_t $netdb_host_type /**/
+#define Netdb_hlen_t $netdb_hlen_type /**/
+#define Netdb_name_t $netdb_name_type /**/
+#define Netdb_net_t $netdb_net_type /**/
+
+/* Select_fd_set_t:
+ * This symbol 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(), of course.
+ */
+#define Select_fd_set_t $selecttype /**/
+
+/* ARCHNAME:
+ * This symbol holds a string representing the architecture name.
+ * It may be used to construct an architecture-dependant pathname
+ * where library files may be held under a private library, for
+ * instance.
+ */
+#define ARCHNAME "$archname" /**/
+
+/* HAS_PTHREAD_YIELD:
+ * This symbol, if defined, indicates that the pthread_yield
+ * routine is available to yield the execution of the current
+ * thread.
+ */
+#$d_pthread_yield HAS_PTHREAD_YIELD /**/
+
+/* PTHREADS_CREATED_JOINABLE:
+ * This symbol, if defined, indicates that pthreads are created
+ * in the joinable (aka undetached) state.
+ */
+#$d_pthreads_created_joinable PTHREADS_CREATED_JOINABLE /**/
+
+/* USE_THREADS:
+ * This symbol, if defined, indicates that Perl should
+ * be built to use threads.
+ */
+#$usethreads USE_THREADS /**/
#endif
!GROK!THIS!
diff --git a/djgpp/djgpp.c b/djgpp/djgpp.c
index 578a1f9bd7..466b4abc60 100644
--- a/djgpp/djgpp.c
+++ b/djgpp/djgpp.c
@@ -15,24 +15,12 @@
#include "perl.h"
#include "XSUB.h"
-#if DJGPP==2 && DJGPP_MINOR<2
-
-/* XXX I should rewrite this stuff someday. ML */
-
-/* This is from popen.c */
-
-/* Copyright (C) 1997 DJ Delorie, see COPYING.DJ for details */
-/* Copyright (C) 1996 DJ Delorie, see COPYING.DJ for details */
-/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
-
-/* hold file pointer, descriptor, command, mode, temporary file name,
- and the status of the command */
+/* hold file pointer, command, mode, and the status of the command */
struct pipe_list {
FILE *fp;
- int fd;
int exit_status;
- char *command, mode[10], temp_name[L_tmpnam];
struct pipe_list *next;
+ char *command, mode;
};
/* static, global list pointer */
@@ -42,131 +30,87 @@ FILE *
popen (const char *cm, const char *md) /* program name, pipe mode */
{
struct pipe_list *l1;
+ int fd;
+ char *temp_name=NULL;
/* make new node */
- if ((l1 = (struct pipe_list *) malloc (sizeof (struct pipe_list))) == NULL)
- return NULL;
-
- /* zero out elements to we'll get here */
- l1->fp = NULL;
- l1->next = pl;
- pl = l1;
-
- /* stick in elements we know already */
- l1->exit_status = -1;
- strcpy (l1->mode, md);
- if (tmpnam (l1->temp_name) == NULL)
- return NULL;
-
- /* if can save the program name, build temp file */
- if ((l1->command = malloc(strlen(cm)+1)))
+ if ((l1 = (struct pipe_list *) malloc (sizeof (*l1)))
+ && (temp_name = malloc (L_tmpnam)) && tmpnam (temp_name))
{
- strcpy(l1->command, cm);
+ l1->fp = NULL;
+ l1->command = NULL;
+ l1->next = pl;
+ l1->exit_status = -1;
+ l1->mode = md[0];
+
/* if caller wants to read */
- if (l1->mode[0] == 'r')
+ if (md[0] == 'r' && (fd = dup (fileno (stdout))) >= 0)
{
- /* dup stdout */
- if ((l1->fd = dup (fileno (stdout))) == EOF)
- l1->fp = NULL;
- else if (!(l1->fp = freopen (l1->temp_name, "wb", stdout)))
- l1->fp = NULL;
- else
- /* exec cmd */
+ if ((l1->fp = freopen (temp_name, "wb", stdout)))
{
- if ((l1->exit_status = system (cm)) == EOF)
- l1->fp = NULL;
+ l1->exit_status = system (cm);
+ if (dup2 (fd, fileno (stdout)) >= 0)
+ l1->fp = fopen (temp_name, md);
}
- /* reopen real stdout */
- if (dup2 (l1->fd, fileno (stdout)) == EOF)
- l1->fp = NULL;
- else
- /* open file for reader */
- l1->fp = fopen (l1->temp_name, l1->mode);
- close(l1->fd);
+ close (fd);
}
- else
- /* if caller wants to write */
- if (l1->mode[0] == 'w')
- /* open temp file */
- l1->fp = fopen (l1->temp_name, l1->mode);
- else
- /* unknown mode */
- l1->fp = NULL;
+ /* if caller wants to write */
+ else if (md[0] == 'w' && (l1->command = malloc (1 + strlen (cm))))
+ {
+ strcpy (l1->command, cm);
+ l1->fp = fopen (temp_name, md);
+ }
+
+ if (l1->fp)
+ {
+ l1->fp->_flag |= _IORMONCL; /* remove on close */
+ l1->fp->_name_to_remove = temp_name;
+ return (pl = l1)->fp;
+ }
+ free (l1->command);
}
- return l1->fp; /* return == NULL ? ERROR : OK */
+ free (temp_name);
+ free (l1);
+ return NULL;
}
int
pclose (FILE *pp)
{
- struct pipe_list *l1, *l2; /* list pointers */
- int retval=0; /* function return value */
-
- /* if pointer is first node */
- if (pl->fp == pp)
- {
- /* save node and take it out the list */
- l1 = pl;
- pl = l1->next;
- }
- else
- /* if more than one node in list */
- if (pl->next)
- {
- /* find right node */
- for (l2 = pl, l1 = pl->next; l1; l2 = l1, l1 = l2->next)
- if (l1->fp == pp)
- break;
+ struct pipe_list *l1, **l2; /* list pointers */
+ int retval=-1; /* function return value */
- /* take node out of list */
- l2->next = l1->next;
- }
- else
- return -1;
+ for (l2 = &pl; *l2 && (*l2)->fp != pp; l2 = &((*l2)->next))
+ ;
+ if (!(l1 = *l2))
+ return retval;
+ *l2 = l1->next;
- /* if FILE not in list - return error */
- if (l1->fp == pp)
+ /* if pipe was opened to write */
+ if (l1->mode == 'w')
{
- /* close the (hopefully) popen()ed file */
- fclose (l1->fp);
+ int fd;
+ fflush (l1->fp);
+ close (fileno (l1->fp));
- /* if pipe was opened to write */
- if (l1->mode[0] == 'w')
+ if ((fd = dup (fileno (stdin))) >= 0
+ && (freopen (l1->fp->_name_to_remove, "rb", stdin)))
{
- /* dup stdin */
- if ((l1->fd = dup (fileno (stdin))) == EOF)
- retval = -1;
- else
- /* open temp stdin */
- if (!(l1->fp = freopen (l1->temp_name, "rb", stdin)))
- retval = -1;
- else
- /* exec cmd */
- if ((retval = system (l1->command)) != EOF)
- {
- /* reopen stdin */
- if (dup2 (l1->fd, fileno (stdin)) == EOF)
- retval = -1;
- }
- close(l1->fd);
+ retval = system (l1->command);
+ dup2 (fd, fileno (stdin));
}
- else
- /* if pipe was opened to read, return the exit status we saved */
- if (l1->mode[0] == 'r')
- retval = l1->exit_status;
- else
- /* invalid mode */
- retval = -1;
+ close (fd);
+ free (l1->command);
}
- remove (l1->temp_name); /* remove temporary file */
- free (l1->command); /* dealloc memory */
- free (l1); /* dealloc memory */
+ else
+ /* if pipe was opened to read, return the exit status we saved */
+ retval = l1->exit_status;
- return retval; /* retval==0 ? OK : ERROR */
+ fclose (l1->fp); /* this removes the temp file */
+ free (l1);
+ return retval; /* retval==0 ? OK : ERROR */
}
-#endif
-
/**/
#define EXECF_SPAWN 0
diff --git a/doio.c b/doio.c
index 3167aea6b7..de0cdee95b 100644
--- a/doio.c
+++ b/doio.c
@@ -564,13 +564,7 @@ badexit:
/* explicit renamed to avoid C++ conflict -- kja */
bool
-#ifndef CAN_PROTOTYPE
-do_close(gv,not_implicit)
-GV *gv;
-bool not_implicit;
-#else
do_close(GV *gv, bool not_implicit)
-#endif /* CAN_PROTOTYPE */
{
bool retval;
IO *io;
diff --git a/dosish.h b/dosish.h
index 6c58eedfee..1d52d0c0cd 100644
--- a/dosish.h
+++ b/dosish.h
@@ -29,6 +29,7 @@
# define pthread_mutexattr_default NULL
# define pthread_condattr_default NULL
# define pthread_addr_t any_t
+# define PTHREAD_CREATE_JOINABLE (&err)
# endif
#else /* DJGPP */
# ifdef WIN32
@@ -121,6 +122,7 @@
# define HAS_UTIME
# define HAS_KILL
# define HAS_WAIT
+# define HAS_CHOWN
/*
* This provides a layer of functions and macros to ensure extensions will
* get to use the same RTL functions as the core.
diff --git a/embed.h b/embed.h
index 825ef58789..111e5e667b 100644
--- a/embed.h
+++ b/embed.h
@@ -68,7 +68,9 @@
#define bool__amg Perl_bool__amg
#define boot_core_UNIVERSAL Perl_boot_core_UNIVERSAL
#define bor_amg Perl_bor_amg
+#define bset_obj_store Perl_bset_obj_store
#define bxor_amg Perl_bxor_amg
+#define byterun Perl_byterun
#define call_list Perl_call_list
#define cando Perl_cando
#define cast_ulong Perl_cast_ulong
@@ -909,6 +911,7 @@
#define sle_amg Perl_sle_amg
#define slt_amg Perl_slt_amg
#define sne_amg Perl_sne_amg
+#define specialsv_list Perl_specialsv_list
#define sqrt_amg Perl_sqrt_amg
#define stack_grow Perl_stack_grow
#define start_subparse Perl_start_subparse
diff --git a/embedvar.h b/embedvar.h
index 1bd27cc16f..4e3f81630e 100644
--- a/embedvar.h
+++ b/embedvar.h
@@ -855,6 +855,7 @@
#define sv_no (Perl_Vars.Gsv_no)
#define sv_undef (Perl_Vars.Gsv_undef)
#define sv_yes (Perl_Vars.Gsv_yes)
+#define svref_mutex (Perl_Vars.Gsvref_mutex)
#define thisexpr (Perl_Vars.Gthisexpr)
#define thr_key (Perl_Vars.Gthr_key)
#define threads_mutex (Perl_Vars.Gthreads_mutex)
@@ -974,6 +975,7 @@
#define Gsv_no sv_no
#define Gsv_undef sv_undef
#define Gsv_yes sv_yes
+#define Gsvref_mutex svref_mutex
#define Gthisexpr thisexpr
#define Gthr_key thr_key
#define Gthreads_mutex threads_mutex
@@ -1093,6 +1095,7 @@
#define sv_no Perl_sv_no
#define sv_undef Perl_sv_undef
#define sv_yes Perl_sv_yes
+#define svref_mutex Perl_svref_mutex
#define thisexpr Perl_thisexpr
#define thr_key Perl_thr_key
#define threads_mutex Perl_threads_mutex
diff --git a/ext/B/B.xs b/ext/B/B.xs
index 0bb7acba02..3e519afe43 100644
--- a/ext/B/B.xs
+++ b/ext/B/B.xs
@@ -11,8 +11,6 @@
#include "perl.h"
#include "XSUB.h"
#include "INTERN.h"
-#include "bytecode.h"
-#include "byterun.h"
static char *svclassnames[] = {
"B::NULL",
@@ -288,20 +286,6 @@ cchar(SV *sv)
return sstr;
}
-void *
-bset_obj_store(void *obj, I32 ix)
-{
- if (ix > obj_list_fill) {
- if (obj_list_fill == -1)
- New(666, obj_list, ix + 1, void*);
- else
- Renew(obj_list, ix + 1, void*);
- obj_list_fill = ix;
- }
- obj_list[ix] = obj;
- return obj;
-}
-
#ifdef INDIRECT_BGET_MACROS
void freadpv(U32 len, void *data)
{
diff --git a/ext/B/B/Asmdata.pm b/ext/B/B/Asmdata.pm
index 3a3cf6da61..b1df379009 100644
--- a/ext/B/B/Asmdata.pm
+++ b/ext/B/B/Asmdata.pm
@@ -1,5 +1,5 @@
#
-# Copyright (c) 1996, 1997 Malcolm Beattie
+# Copyright (c) 1996-1998 Malcolm Beattie
#
# You may distribute under the terms of either the GNU General Public
# License or the Artistic License, as specified in the README file.
diff --git a/ext/B/Makefile.PL b/ext/B/Makefile.PL
index bc42a34d33..92f01e24c4 100644
--- a/ext/B/Makefile.PL
+++ b/ext/B/Makefile.PL
@@ -4,7 +4,6 @@ use Config;
my $e = $Config{'exe_ext'};
my $o = $Config{'obj_ext'};
my $exeout_flag = '-o ';
-my @extras = ();
if ($^O eq 'MSWin32') {
if ($Config{'cc'} =~ /^cl/i) {
$exeout_flag = '-Fe';
@@ -12,21 +11,13 @@ if ($^O eq 'MSWin32') {
elsif ($Config{'cc'} =~ /^bcc/i) {
$exeout_flag = '-e';
}
- # XXX this probably applies to everyone else
- @extras = (
- OBJECT => "B$o byterun$o",
- depend => {
- "B$o" => "B.c ../../bytecode.h ../../byterun.h",
- "byterun$o" => "../../byterun.c ../../bytecode.h ../../byterun.h",
- });
}
WriteMakefile(
NAME => "B",
VERSION => "a5",
- @extras,
clean => {
- FILES => "perl byteperl$e *$o B.c *~"
+ FILES => "perl$e byteperl$e *$o B.c *~"
}
);
diff --git a/ext/DB_File/DB_File.xs b/ext/DB_File/DB_File.xs
index b6da38609d..91b4dc2ad5 100644
--- a/ext/DB_File/DB_File.xs
+++ b/ext/DB_File/DB_File.xs
@@ -533,14 +533,6 @@ DB_File db ;
DBT_flags(key) ;
DBT_flags(value) ;
RETVAL = do_SEQ(db, key, value, R_LAST) ;
- if (RETVAL < 0 && errno == EBADF)
- {
- recno_t oops = -1;
- key.data = &oops;
- key.size = sizeof(oops);
- db_get(db, key, value, 0);
- RETVAL = do_SEQ(db, key, value, R_LAST) ;
- }
if (RETVAL == 0)
RETVAL = *(I32 *)key.data ;
else /* No key means empty file */
diff --git a/ext/POSIX/POSIX.xs b/ext/POSIX/POSIX.xs
index d3714557ec..31439b2365 100644
--- a/ext/POSIX/POSIX.xs
+++ b/ext/POSIX/POSIX.xs
@@ -247,6 +247,12 @@ char *tzname[] = { "" , "" };
* support is added and NETaa14816 is considered in full.
* It does not address tzname aspects of NETaa14816.
*/
+#ifdef HAS_GNULIBC
+# ifndef STRUCT_TM_HASZONE
+# define STRUCT_TM_HAS_ZONE
+# endif
+#endif
+
#ifdef STRUCT_TM_HASZONE
static void
init_tm(ptm) /* see mktime, strftime and asctime */
diff --git a/ext/SDBM_File/Makefile.PL b/ext/SDBM_File/Makefile.PL
index 02dfd7d84f..c0daa064c7 100644
--- a/ext/SDBM_File/Makefile.PL
+++ b/ext/SDBM_File/Makefile.PL
@@ -6,21 +6,37 @@ use ExtUtils::MakeMaker;
# which perform the corresponding actions in the subdirectory.
$define = ($^O eq 'MSWin32') ? '-DMSDOS' : '';
+if ($^O eq 'MSWin32') {
+ $myextlib = 'sdbm\\libsdbm$(LIB_EXT)';
+} elsif ($^O eq 'VMS') {
+ $myextlib = 'sdbm/libsdbm$(LIB_EXT)';
+} else {
+ $myextlib = 'sdbm/libsdbm$(LIB_EXT)';
+}
WriteMakefile(
- NAME => 'SDBM_File',
- MYEXTLIB => 'sdbm'.($^O eq 'MSWin32' ? '\\' : '/').'libsdbm$(LIB_EXT)',
- MAN3PODS => ' ', # Pods will be built by installman.
- XSPROTOARG => '-noprototypes', # XXX remove later?
- VERSION_FROM => 'SDBM_File.pm',
- DEFINE => $define,
-);
-
+ NAME => 'SDBM_File',
+ MYEXTLIB => $myextlib,
+ MAN3PODS => ' ', # Pods will be built by installman.
+ XSPROTOARG => '-noprototypes', # XXX remove later?
+ VERSION_FROM => 'SDBM_File.pm',
+ DEFINE => $define,
+# NORECURS => $^O eq 'VMS',
+# SKIP => $^O eq 'VMS' ? 'subdirs' : '', # Don't do the subdirs section for VMS
+ );
sub MY::postamble {
+ if ($^O ne 'VMS') {
'
$(MYEXTLIB): sdbm/Makefile
cd sdbm && $(MAKE) all
';
+ } else {
+ '
+$(MYEXTLIB): [.sdbm]descrip.mms
+ set def [.sdbm]
+ $(MMS) all
+ set def [-]
+';
+ }
}
-
diff --git a/ext/SDBM_File/sdbm/Makefile.PL b/ext/SDBM_File/sdbm/Makefile.PL
index 50fd83eb25..e9d4dcd0fa 100644
--- a/ext/SDBM_File/sdbm/Makefile.PL
+++ b/ext/SDBM_File/sdbm/Makefile.PL
@@ -5,11 +5,11 @@ $define .= ' -DWIN32' if ($^O eq 'MSWin32');
WriteMakefile(
NAME => 'sdbm', # (doesn't matter what the name is here) oh yes it does
- LINKTYPE => 'static',
+# LINKTYPE => 'static',
DEFINE => $define,
INC => '-I$(PERL_INC)', # force PERL_INC dir ahead of system -I's
SKIP => [qw(dynamic dynamic_lib)],
- OBJECT => '$(O_FILES)',
+ OBJECT => ($^O eq 'VMS') ? 'sdbm.obj pair.obj hash.obj' : '$(O_FILES)',
clean => {'FILES' => 'dbu libsdbm.a dbd dba dbe x-dbu *.dir *.pag'},
H => [qw(tune.h sdbm.h pair.h $(PERL_INC)/config.h)],
C => [qw(sdbm.c pair.c hash.c)]
diff --git a/ext/SDBM_File/sdbm/sdbm.h b/ext/SDBM_File/sdbm/sdbm.h
index ac2dc36b01..b3ed2d4b8b 100644
--- a/ext/SDBM_File/sdbm/sdbm.h
+++ b/ext/SDBM_File/sdbm/sdbm.h
@@ -9,7 +9,11 @@
#define PAIRMAX 1008 /* arbitrary on PBLKSIZ-N */
#define SPLTMAX 10 /* maximum allowed splits */
/* for a single insertion */
+#ifdef VMS
+#define DIRFEXT ".sdbm_dir"
+#else
#define DIRFEXT ".dir"
+#endif
#define PAGFEXT ".pag"
typedef struct {
@@ -116,11 +120,15 @@ extern long sdbm_hash proto((char *, int));
#include <ctype.h>
#include <setjmp.h>
-#ifdef I_UNISTD
+#if defined(I_UNISTD) || defined(VMS)
#include <unistd.h>
#endif
-#if !defined(MSDOS) && !defined(WIN32)
+#ifdef VMS
+# include <fcntl.h>
+#endif
+
+#if !defined(MSDOS) && !defined(WIN32) && !defined(VMS)
# ifdef PARAM_NEEDS_TYPES
# include <sys/types.h>
# endif
@@ -237,7 +245,7 @@ extern long sdbm_hash proto((char *, int));
# endif
#else
# ifndef memcmp
-# /* maybe we should have included the full embedding header... */
+ /* maybe we should have included the full embedding header... */
# ifdef NO_EMBED
# define memcmp my_memcmp
# else
@@ -264,7 +272,11 @@ extern long sdbm_hash proto((char *, int));
#endif
#ifdef I_NETINET_IN
-# include <netinet/in.h>
+# ifdef VMS
+# include <in.h>
+# else
+# include <netinet/in.h>
+# endif
#endif
#endif /* Include guard */
diff --git a/global.sym b/global.sym
index 1e2ada5a7e..f068bb7327 100644
--- a/global.sym
+++ b/global.sym
@@ -29,16 +29,15 @@ eq_amg
exp_amg
expectterm
fallback_amg
-find_threadsv
fold
fold_locale
freq
+ge_amg
get_op_descs
get_op_names
-ge_amg
gt_amg
-init_thread_intern
inc_amg
+init_thread_intern
io_close
know_next
le_amg
@@ -101,6 +100,7 @@ sin_amg
sle_amg
slt_amg
sne_amg
+specialsv_list
sqrt_amg
string_amg
subtr_amg
@@ -162,28 +162,11 @@ yyval
# Functions
Gv_AMupdate
-sv_true
-sv_iv
-sv_uv
-sv_nv
amagic_call
append_elem
append_list
apply
assertref
-avhv_delete
-avhv_delete_ent
-avhv_exists
-avhv_exists_ent
-avhv_fetch
-avhv_fetch_ent
-avhv_iterinit
-avhv_iternext
-avhv_iternextsv
-avhv_iterval
-avhv_keys
-avhv_store
-avhv_store_ent
av_clear
av_extend
av_fake
@@ -198,11 +181,26 @@ av_shift
av_store
av_undef
av_unshift
+avhv_delete
+avhv_delete_ent
+avhv_exists
+avhv_exists_ent
+avhv_fetch
+avhv_fetch_ent
+avhv_iterinit
+avhv_iternext
+avhv_iternextsv
+avhv_iterval
+avhv_keys
+avhv_store
+avhv_store_ent
bind_match
block_end
block_gimme
block_start
boot_core_UNIVERSAL
+bset_obj_store
+byterun
call_list
cando
cast_ulong
@@ -309,6 +307,7 @@ fetch_io
filter_add
filter_del
filter_read
+find_threadsv
fold_constants
force_ident
force_list
@@ -337,7 +336,6 @@ gv_init
gv_stashpv
gv_stashpvn
gv_stashsv
-hexdigit
hv_clear
hv_delayfree_ent
hv_delete
@@ -377,8 +375,8 @@ list
listkids
localize
looks_like_number
-magic_clearenv
magic_clear_all_env
+magic_clearenv
magic_clearpack
magic_clearsig
magic_existspack
@@ -397,6 +395,7 @@ magic_len
magic_mutexfree
magic_nextpack
magic_set
+magic_set_all_env
magic_setamagic
magic_setarylen
magic_setbm
@@ -416,7 +415,6 @@ magic_setsubstr
magic_settaint
magic_setuvar
magic_setvec
-magic_set_all_env
magic_sizepack
magic_wipepack
magicname
@@ -491,8 +489,8 @@ newSVREF
newSViv
newSVnv
newSVpv
-newSVpvn
newSVpvf
+newSVpvn
newSVrv
newSVsv
newUNOP
@@ -887,19 +885,19 @@ regprop
repeatcpy
rninstr
rsignal
+rsignal_restore
rsignal_save
rsignal_state
-rsignal_restore
rxres_free
rxres_restore
rxres_save
safecalloc
-safemalloc
safefree
+safemalloc
saferealloc
safexcalloc
-safexmalloc
safexfree
+safexmalloc
safexrealloc
same_dirent
save_I16
@@ -971,10 +969,10 @@ sv_2uv
sv_add_arena
sv_backoff
sv_bless
-sv_catpvf
-sv_catpvf_mg
sv_catpv
sv_catpv_mg
+sv_catpvf
+sv_catpvf_mg
sv_catpvn
sv_catpvn_mg
sv_catsv
@@ -985,8 +983,8 @@ sv_clean_objs
sv_clear
sv_cmp
sv_cmp_locale
-sv_compile_2op
sv_collxfrm
+sv_compile_2op
sv_dec
sv_derived_from
sv_dump
@@ -999,11 +997,13 @@ sv_inc
sv_insert
sv_isa
sv_isobject
+sv_iv
sv_len
sv_magic
sv_mortalcopy
sv_newmortal
sv_newref
+sv_nv
sv_peek
sv_pvn
sv_pvn_force
@@ -1012,8 +1012,6 @@ sv_reftype
sv_replace
sv_report_used
sv_reset
-sv_setpvf
-sv_setpvf_mg
sv_setiv
sv_setiv_mg
sv_setnv
@@ -1021,6 +1019,8 @@ sv_setnv_mg
sv_setptrobj
sv_setpv
sv_setpv_mg
+sv_setpvf
+sv_setpvf_mg
sv_setpviv
sv_setpviv_mg
sv_setpvn
@@ -1035,12 +1035,14 @@ sv_setuv
sv_setuv_mg
sv_taint
sv_tainted
+sv_true
sv_unmagic
sv_unref
sv_untaint
sv_upgrade
sv_usepvn
sv_usepvn_mg
+sv_uv
sv_vcatpvfn
sv_vsetpvfn
taint_env
@@ -1056,8 +1058,8 @@ wait4pid
warn
watch
whichsig
-yyerror
yydestruct
+yyerror
yylex
yyparse
yywarn
diff --git a/hints/aix.sh b/hints/aix.sh
index 569a292870..076eed5769 100644
--- a/hints/aix.sh
+++ b/hints/aix.sh
@@ -78,8 +78,7 @@ lddlflags='-H512 -T512 -bhalt:4 -bM:SRE -bI:$(PERL_INC)/perl.exp -bE:$(BASEEXT).
esac
if [ "X$usethreads" != "X" ]; then
- ccflags="-DUSE_THREADS -DNEED_PTHREAD_INIT $ccflags"
- cppflags="-DUSE_THREADS -DNEED_PTHREAD_INIT $cppflags"
+ ccflags="-DNEED_PTHREAD_INIT $ccflags"
case "$cc" in
xlc_r | cc_r)
;;
diff --git a/hints/amigaos.sh b/hints/amigaos.sh
index e768643691..9d86e52bc0 100644
--- a/hints/amigaos.sh
+++ b/hints/amigaos.sh
@@ -42,10 +42,6 @@ lddlflags='-oformat a.out-amiga -r'
# ccflags='-DAMIGAOS -mstackextend -m68020 -resident32'
# ldflags='-m68020 -resident32'
-# Avoid telldir prototype conflict in pp_sys.c (AmigaOS uses const DIR *)
-# Configure should test for this. Volunteers?
-pp_sys_cflags='ccflags="$ccflags -DHAS_TELLDIR_PROTOTYPE"'
-
# AmigaOS always reports only two links to directories, even if they
# contain subdirectories. Consequently, we use this variable to stop
# File::Find using the link count to determine whether there are
diff --git a/hints/bsdos.sh b/hints/bsdos.sh
index 7c7c6e9565..c89a0a9833 100644
--- a/hints/bsdos.sh
+++ b/hints/bsdos.sh
@@ -33,9 +33,6 @@ libswanted="$*"
glibpth="$glibpth /usr/X11/lib"
ldflags="$ldflags -L/usr/X11/lib"
-# Avoid telldir prototype conflict in pp_sys.c
-pp_sys_cflags='ccflags="$ccflags -DHAS_TELLDIR_PROTOTYPE"'
-
case "$optimize" in
'') optimize='-O2' ;;
esac
diff --git a/hints/dec_osf.sh b/hints/dec_osf.sh
index 2e8ffac5bd..ae49f503a0 100644
--- a/hints/dec_osf.sh
+++ b/hints/dec_osf.sh
@@ -184,10 +184,10 @@ if [ "X$usethreads" != "X" ]; then
# Threads interfaces changed with V4.0.
case "$_DEC_uname_r" in
*[123].*) libswanted="$libswanted pthreads mach exc c_r"
- ccflags="-DUSE_THREADS -threads $ccflags"
+ ccflags="-threads $ccflags"
;;
*) libswanted="$libswanted pthread exc"
- ccflags="-DUSE_THREADS -pthread $ccflags"
+ ccflags="-pthread $ccflags"
;;
esac
usemymalloc='n'
diff --git a/hints/dos_djgpp.sh b/hints/dos_djgpp.sh
index 85455c3852..f50cd01884 100644
--- a/hints/dos_djgpp.sh
+++ b/hints/dos_djgpp.sh
@@ -2,6 +2,7 @@
# Original by Laszlo Molnar <molnarl@cdata.tvnet.hu>
# 971015 - archname changed from 'djgpp' to 'dos-djgpp'
+# 971210 - threads support
archname='dos-djgpp'
archobjs='djgpp.o'
@@ -38,7 +39,7 @@ startperl='#!perl'
case "X$optimize" in
X)
- optimize="-O2 -fomit-frame-pointer -malign-loops=2 -malign-jumps=2 -malign-functions=2"
+ optimize="-O2 -malign-loops=2 -malign-jumps=2 -malign-functions=2"
;;
esac
ldflags='-s'
@@ -61,3 +62,11 @@ case "\$1\$2" in
esac
exec tr.exe "\$@"
EOSC
+
+if [ "X$usethreads" != "X" ]; then
+ ccflags="-DUSE_THREADS $ccflags"
+ cppflags="-DUSE_THREADS $cppflags"
+ set `echo X "$libswanted "| sed -e 's/ c / gthreads c /'`
+ shift
+ libswanted="$*"
+fi
diff --git a/hints/freebsd.sh b/hints/freebsd.sh
index e20d40d249..5e89d56039 100644
--- a/hints/freebsd.sh
+++ b/hints/freebsd.sh
@@ -94,10 +94,6 @@ case "$osvers" in
;;
esac
-# Avoid telldir prototype conflict in pp_sys.c (FreeBSD uses const DIR *)
-# Configure should test for this. Volunteers?
-pp_sys_cflags='ccflags="$ccflags -DHAS_TELLDIR_PROTOTYPE"'
-
cat <<'EOM' >&4
Some users have reported that Configure halts when testing for
@@ -120,5 +116,4 @@ EOM
exit 1
fi
libswanted="$libswanted c_r"
- ccflags="-DUSE_THREADS $ccflags"
fi
diff --git a/hints/hpux.sh b/hints/hpux.sh
index c2500d0c37..cbf80cc669 100644
--- a/hints/hpux.sh
+++ b/hints/hpux.sh
@@ -60,10 +60,6 @@
# reading from a NULL pointer causes a SEGV.
ccflags="$ccflags -D_HPUX_SOURCE"
-# If you plan to use gcc, then you should uncomment the following line
-# so you get the HP math library and not the GCC math library.
-# ccflags="$ccflags -L/lib/pa1.1"
-
# Check if you're using the bundled C compiler. This compiler doesn't support
# ANSI C (the -Aa flag) nor can it produce shared libraries. Thus we have
# to turn off dynamic loading.
@@ -92,6 +88,12 @@ EOM
;;
esac
+# Even if you use gcc, prefer the HP math library over the GNU one.
+
+case "`$cc -v 2>&1`" in
+"*gcc*" ) test -d /lib/pa1.1 && ccflags="$ccflags -L/lib/pa1.1" ;;
+esac
+
# Determine the architecture type of this system.
# Keep leading tab below -- Configure Black Magic -- RAM, 03/02/97
xxOsRevMajor=`uname -r | sed -e 's/^[^0-9]*//' | cut -d. -f1`;
diff --git a/hints/irix_6.sh b/hints/irix_6.sh
index 6d22d524b0..3d8202a8ae 100644
--- a/hints/irix_6.sh
+++ b/hints/irix_6.sh
@@ -84,9 +84,6 @@ case "$cc" in
;;
esac
-# This should be a Configure thing, but not for now...
-pp_sys_cflags='ccflags="$ccflags -DHAS_TELLDIR_PROTOTYPE"'
-
# We don't want these libraries. Anyone know why?
set `echo X "$libswanted "|sed -e 's/ socket / /' -e 's/ nsl / /' -e 's/ dl / /'`
shift
@@ -160,8 +157,6 @@ EOF
esac
unset uname_r
fi
- ccflags="-DUSE_THREADS $ccflags"
- cppflags="-DUSE_THREADS $cppflags"
# -lpthread needs to come before -lc but after other libraries such
# as -lgdbm and such like. We assume here that -lc is present in
# libswanted. If that fails to be true in future, then this can be
diff --git a/hints/linux.sh b/hints/linux.sh
index 8ff7f5d747..1ddbca1964 100644
--- a/hints/linux.sh
+++ b/hints/linux.sh
@@ -195,8 +195,7 @@ fi
# ccdlflags='-Wl,-E'
if [ "X$usethreads" != "X" ]; then
- ccflags="-D_REENTRANT -DUSE_THREADS $ccflags"
- cppflags="-D_REENTRANT -DUSE_THREADS $cppflags"
+ ccflags="-D_REENTRANT $ccflags"
# -lpthread needs to come before -lc but after other libraries such
# as -lgdbm and such like. We assume here that -lc is present in
# libswanted. If that fails to be true in future, then this can be
diff --git a/hints/netbsd.sh b/hints/netbsd.sh
index c508815a46..836c7eff0b 100644
--- a/hints/netbsd.sh
+++ b/hints/netbsd.sh
@@ -56,7 +56,3 @@ case "$osvers" in
d_setruid="$undef"
;;
esac
-
-# Avoid telldir prototype conflict in pp_sys.c (NetBSD uses const DIR *)
-# Configure should test for this. Volunteers?
-pp_sys_cflags='ccflags="$ccflags -DHAS_TELLDIR_PROTOTYPE"'
diff --git a/hints/next_3.sh b/hints/next_3.sh
index 542a313a11..43340c03ad 100644
--- a/hints/next_3.sh
+++ b/hints/next_3.sh
@@ -99,8 +99,6 @@ ld='cc'
i_utime='undef'
groupstype='int'
direntrytype='struct direct'
-netdb_host_type='char *'
-netdb_hlen_type='int'
d_strcoll='undef'
d_uname='define'
#
diff --git a/hints/next_4.sh b/hints/next_4.sh
index d34400200b..b3887e612b 100644
--- a/hints/next_4.sh
+++ b/hints/next_4.sh
@@ -83,8 +83,6 @@ i_dbm='define'
i_utime='undef'
groupstype='int'
direntrytype='struct direct'
-netdb_host_type='const char *'
-netdb_hlen_type='int'
usemymalloc='y'
clocktype='int'
diff --git a/hints/os2.sh b/hints/os2.sh
index a012a7317a..7cda0bf89b 100644
--- a/hints/os2.sh
+++ b/hints/os2.sh
@@ -246,8 +246,8 @@ case "X$optimize" in
esac
if [ "X$usethreads" != "X" ]; then
- ccflags="-DUSE_THREADS -Zmt $ccflags"
- cppflags="-DUSE_THREADS -Zmt $cppflags"
+ ccflags="-Zmt $ccflags"
+ cppflags="-Zmt $cppflags" # Do we really need to set this?
aout_ccflags="-DUSE_THREADS $aout_ccflags"
aout_cppflags="-DUSE_THREADS $aout_cppflags"
aout_lddlflags="-Zmt $aout_lddlflags"
diff --git a/hints/solaris_2.sh b/hints/solaris_2.sh
index 6b24dd1ef2..55d0416388 100644
--- a/hints/solaris_2.sh
+++ b/hints/solaris_2.sh
@@ -224,8 +224,7 @@ fi
rm -f core
if [ "X$usethreads" != "X" ]; then
- ccflags="-D_REENTRANT -DUSE_THREADS $ccflags"
- cppflags="-D_REENTRANT -DUSE_THREADS $cppflags"
+ ccflags="-D_REENTRANT $ccflags"
# -lpthread needs to come before -lc but after other libraries such
# as -lgdbm and such like. We assume here that -lc is present in
# libswanted. If that fails to be true in future, then this can be
diff --git a/lib/AutoLoader.pm b/lib/AutoLoader.pm
index 2773a90f10..46e0a4be7a 100644
--- a/lib/AutoLoader.pm
+++ b/lib/AutoLoader.pm
@@ -73,7 +73,7 @@ sub import {
# 'auto/POSIX/autosplit.ix' (without the leading 'lib').
#
- (my $calldir = $callpkg) =~ s#::#/#;
+ (my $calldir = $callpkg) =~ s#::#/#g;
my $path = $INC{$calldir . '.pm'};
if (defined($path)) {
# Try absolute path name.
diff --git a/lib/Cwd.pm b/lib/Cwd.pm
index 19ff497759..652ee7e493 100644
--- a/lib/Cwd.pm
+++ b/lib/Cwd.pm
@@ -54,7 +54,7 @@ kept up to date if all packages which use chdir import it from Cwd.
use Carp;
-$VERSION = '2.00';
+$VERSION = '2.01';
require Exporter;
@ISA = qw(Exporter);
@@ -82,66 +82,9 @@ sub _backtick_pwd {
sub getcwd
{
- my($dotdots, $cwd, @pst, @cst, $dir, @tst);
-
- unless (@cst = stat('.'))
- {
- warn "stat(.): $!";
- return '';
- }
- $cwd = '';
- $dotdots = '';
- do
- {
- $dotdots .= '/' if $dotdots;
- $dotdots .= '..';
- @pst = @cst;
- unless (opendir(PARENT, $dotdots))
- {
- warn "opendir($dotdots): $!";
- return '';
- }
- unless (@cst = stat($dotdots))
- {
- warn "stat($dotdots): $!";
- closedir(PARENT);
- return '';
- }
- if ($pst[0] == $cst[0] && $pst[1] == $cst[1])
- {
- $dir = undef;
- }
- else
- {
- do
- {
- unless (defined ($dir = readdir(PARENT)))
- {
- warn "readdir($dotdots): $!";
- closedir(PARENT);
- return '';
- }
- unless (@tst = lstat("$dotdots/$dir"))
- {
- # warn "lstat($dotdots/$dir): $!";
- # Just because you can't lstat this directory
- # doesn't mean you'll never find the right one.
- # closedir(PARENT);
- # return '';
- }
- }
- while ($dir eq '.' || $dir eq '..' || $tst[0] != $pst[0] ||
- $tst[1] != $pst[1]);
- }
- $cwd = (defined $dir ? "$dir" : "" ) . "/$cwd" ;
- closedir(PARENT);
- } while (defined $dir);
- chop($cwd) unless $cwd eq '/'; # drop the trailing /
- $cwd;
+ abs_path('.');
}
-
-
# By John Bazik
#
# Usage: $cwd = &fastcwd;
@@ -249,7 +192,7 @@ sub chdir {
sub abs_path
{
- my $start = shift || '.';
+ my $start = @_ ? shift : '.';
my($dotdots, $cwd, @pst, @cst, $dir, @tst);
unless (@cst = stat( $start ))
@@ -276,7 +219,7 @@ sub abs_path
}
if ($pst[0] == $cst[0] && $pst[1] == $cst[1])
{
- $dir = '';
+ $dir = undef;
}
else
{
@@ -293,10 +236,10 @@ sub abs_path
while ($dir eq '.' || $dir eq '..' || $tst[0] != $pst[0] ||
$tst[1] != $pst[1]);
}
- $cwd = "$dir/$cwd";
+ $cwd = (defined $dir ? "$dir" : "" ) . "/$cwd" ;
closedir(PARENT);
- } while ($dir);
- chop($cwd); # drop the trailing /
+ } while (defined $dir);
+ chop($cwd) unless $cwd eq '/'; # drop the trailing /
$cwd;
}
diff --git a/lib/ExtUtils/MM_VMS.pm b/lib/ExtUtils/MM_VMS.pm
index dc3b4ceca6..954f6123d5 100644
--- a/lib/ExtUtils/MM_VMS.pm
+++ b/lib/ExtUtils/MM_VMS.pm
@@ -1422,7 +1422,21 @@ $(INST_STATIC) : $(OBJECT) $(MYEXTLIB)
push(@m,'
If F$Search("$(MMS$TARGET)").eqs."" Then Library/Object/Create $(MMS$TARGET)
+');
+ # if there was a library to copy, then we can't use MMS$SOURCE_LIST,
+ # 'cause it's a library and you can't stick them in other libraries.
+ # In that case, we use $OBJECT instead and hope for the best
+ if ($self->{MYEXTLIB}) {
+ push(@m,'
+ Library/Object/Replace $(MMS$TARGET) $(OBJECT)
+');
+ } else {
+ push(@m,'
Library/Object/Replace $(MMS$TARGET) $(MMS$SOURCE_LIST)
+');
+ }
+
+ push(@m, '
$(NOECHO) $(PERL) -e "open F,\'>>$(INST_ARCHAUTODIR)extralibs.ld\';print F qq{$(EXTRALIBS)\n};close F;"
');
push @m, $self->dir_target('$(INST_ARCHAUTODIR)');
diff --git a/lib/Term/ReadLine.pm b/lib/Term/ReadLine.pm
index b6923dd1e7..6b0b5e7f23 100644
--- a/lib/Term/ReadLine.pm
+++ b/lib/Term/ReadLine.pm
@@ -139,12 +139,23 @@ None
=head1 ENVIRONMENT
-The variable C<PERL_RL> governs which ReadLine clone is loaded. If the
-value is false, a dummy interface is used. If the value is true, it
-should be tail of the name of the package to use, such as C<Perl> or
-C<Gnu>.
+The envrironment variable C<PERL_RL> governs which ReadLine clone is
+loaded. If the value is false, a dummy interface is used. If the value
+is true, it should be tail of the name of the package to use, such as
+C<Perl> or C<Gnu>.
-If the variable is not set, the best available package is loaded.
+As a special case, if the value of this variable is space-separated,
+the tail might be used to disable the ornaments by setting the tail to
+be C<o=0> or C<ornaments=0>. The head should be as described above, say
+
+If the variable is not set, or if the head of space-separated list is
+empty, the best available package is loaded.
+
+ export "PERL_RL=Perl o=0" # Use Perl ReadLine without ornaments
+ export "PERL_RL= o=0" # Use best available ReadLine without ornaments
+
+(Note that processing of C<PERL_RL> for ornaments is in the discretion of the
+particular used C<Term::ReadLine::*> package).
=cut
@@ -205,7 +216,7 @@ sub new {
die "method new called with wrong number of arguments"
unless @_==2 or @_==4;
#local (*FIN, *FOUT);
- my ($FIN, $FOUT);
+ my ($FIN, $FOUT, $ret);
if (@_==2) {
($console, $consoleOUT) = findConsole;
@@ -215,15 +226,21 @@ sub new {
$sel = select(FOUT);
$| = 1; # for DB::OUT
select($sel);
- bless [\*FIN, \*FOUT];
+ $ret = bless [\*FIN, \*FOUT];
} else { # Filehandles supplied
$FIN = $_[2]; $FOUT = $_[3];
#OUT->autoflush(1); # Conflicts with debugger?
$sel = select($FOUT);
$| = 1; # for DB::OUT
select($sel);
- bless [$FIN, $FOUT];
+ $ret = bless [$FIN, $FOUT];
}
+ if ($ret->Features->{ornaments}
+ and not ($ENV{PERL_RL} and $ENV{PERL_RL} =~ /\bo\w*=0/)) {
+ local $Term::ReadLine::termcap_nowarn = 1;
+ $ret->ornaments(1);
+ }
+ return $ret;
}
sub newTTY {
@@ -245,7 +262,7 @@ sub Features { \%features }
package Term::ReadLine; # So late to allow the above code be defined?
-my $which = $ENV{PERL_RL};
+my ($which) = exists $ENV{PERL_RL} ? split /\s+/, $ENV{PERL_RL} : undef;
if ($which) {
if ($which =~ /\bgnu\b/i){
eval "use Term::ReadLine::Gnu;";
@@ -254,7 +271,7 @@ if ($which) {
} else {
eval "use Term::ReadLine::$which;";
}
-} elsif (defined $which) { # Defined but false
+} elsif (defined $which and $which ne '') { # Defined but false
# Do nothing fancy
} else {
eval "use Term::ReadLine::Gnu; 1" or eval "use Term::ReadLine::Perl; 1";
@@ -296,7 +313,11 @@ sub ornaments {
$rl_term_set = 'us,ue,md,me' if $rl_term_set == 1;
my @ts = split /,/, $rl_term_set, 4;
eval { LoadTermCap };
- warn("Cannot find termcap: $@\n"), return unless defined $terminal;
+ unless (defined $terminal) {
+ warn("Cannot find termcap: $@\n") unless $Term::ReadLine::termcap_nowarn;
+ $rl_term_set = ',,,';
+ return;
+ }
@rl_term_set = map {$_ ? $terminal->Tputs($_,1) || '' : ''} @ts;
return $rl_term_set;
}
diff --git a/lib/Test.pm b/lib/Test.pm
index 7e79da2bf4..b10d104ded 100644
--- a/lib/Test.pm
+++ b/lib/Test.pm
@@ -2,18 +2,19 @@ use strict;
package Test;
use Test::Harness 1.1601 ();
use Carp;
-use vars qw($VERSION @ISA @EXPORT $ntest %todo);
-$VERSION = '0.06';
+use vars qw($VERSION @ISA @EXPORT $ntest %todo %history $TestLevel);
+$VERSION = '0.08';
require Exporter;
@ISA=('Exporter');
@EXPORT= qw(&plan &ok &skip $ntest);
+$TestLevel = 0; # how many extra stack frames to skip
$|=1;
#$^W=1; ?
$ntest=1;
-# Use of this variable is strongly discouraged. It is set
-# exclusively for test coverage analyzers.
+# Use of this variable is strongly discouraged. It is set mainly to
+# help test coverage analyzers know which test is running.
$ENV{REGRESSION_TEST} = $0;
sub plan {
@@ -34,33 +35,81 @@ sub plan {
}
}
+sub to_value {
+ my ($v) = @_;
+ (ref $v or '') eq 'CODE' ? $v->() : $v;
+}
+
+# prototypes are not used for maximum flexibility
+
+# STDERR is NOT used for diagnostic output that should be fixed before
+# the module is released.
+
sub ok {
- my ($ok, $guess) = @_;
- carp "(this is ok $ntest)" if defined $guess && $guess != $ntest;
- $ok = $ok->() if (ref $ok or '') eq 'CODE';
- if ($ok) {
+ my ($pkg,$file,$line) = caller($TestLevel);
+ my $repetition = ++$history{"$file:$line"};
+ my $context = ("$file at line $line".
+ ($repetition > 1 ? " (\#$repetition)" : ''));
+ my $ok=0;
+
+ if (@_ == 0) {
+ print "not ok $ntest\n";
+ print "# test $context: DOESN'T TEST ANYTHING!\n";
+ } else {
+ my $result = to_value(shift);
+ my ($expected,$diag);
+ if (@_ == 0) {
+ $ok = $result;
+ } else {
+ $expected = to_value(shift);
+ $ok = $result eq $expected;
+ }
if ($todo{$ntest}) {
- print("ok $ntest # Wow!\n");
+ if ($ok) {
+ print "ok $ntest # Wow!\n";
+ } else {
+ $diag = to_value(shift) if @_;
+ if (!$diag) {
+ print "not ok $ntest # (failure expected)\n";
+ } else {
+ print "not ok $ntest # (failure expected: $diag)\n";
+ }
+ }
} else {
- print("ok $ntest # (failure expected)\n");
+ print "not " if !$ok;
+ print "ok $ntest\n";
+
+ if (!$ok) {
+ $diag = to_value(shift) if @_;
+ if (!defined $expected) {
+ if (!$diag) {
+ print STDERR "# Failed $context\n";
+ } else {
+ print STDERR "# Failed $context: $diag\n";
+ }
+ } else {
+ print STDERR "# Got: '$result' ($context)\n";
+ if (!$diag) {
+ print STDERR "# Expected: '$expected'\n";
+ } else {
+ print STDERR "# Expected: '$expected' ($diag)\n";
+ }
+ }
+ }
}
- } else {
- print("not ok $ntest\n");
}
++ $ntest;
$ok;
}
sub skip {
- my ($toskip, $ok, $guess) = @_;
- carp "(this is skip $ntest)" if defined $guess && $guess != $ntest;
- $toskip = $toskip->() if (ref $toskip or '') eq 'CODE';
- if ($toskip) {
+ if (to_value(shift)) {
print "ok $ntest # skip\n";
++ $ntest;
1;
} else {
- ok($ok);
+ local($TestLevel) += 1; #ignore this stack frame
+ ok(@_);
}
}
@@ -75,42 +124,54 @@ __END__
use strict;
use Test;
- BEGIN { plan tests => 5, todo => [3,4] }
+ BEGIN { plan tests => 12, todo => [3,4] }
+
+ ok(0); # failure
+ ok(1); # success
+
+ ok(0); # ok, expected failure (see todo list, above)
+ ok(1); # surprise success!
+
+ ok(0,1); # failure: '0' ne '1'
+ ok('broke','fixed'); # failure: 'broke' ne 'fixed'
+ ok('fixed','fixed'); # success: 'fixed' eq 'fixed'
- ok(0); #failure
- ok(1); #success
+ ok(sub { 1+1 }, 2); # success: '2' eq '2'
+ ok(sub { 1+1 }, 3); # failure: '2' ne '3'
+ ok(0, int(rand(2)); # (just kidding! :-)
- ok(0); #ok, expected failure (see todo above)
- ok(1); #surprise success!
+ my @list = (0,0);
+ ok(scalar(@list), 3, "\@list=".join(',',@list)); #extra diagnostics
- skip($feature_is_missing, sub {...}); #do platform specific test
+ skip($feature_is_missing, ...); #do platform specific test
=head1 DESCRIPTION
-Test::Harness expects to see particular output when it executes test
-scripts. This module tries to make conforming just a little bit
-easier (and less error prone).
+Test::Harness expects to see particular output when it executes tests.
+This module aims to make writing proper test scripts just a little bit
+easier (and less error prone :-).
-=head1 TEST CATEGORIES
+=head1 TEST TYPES
=over 4
=item * NORMAL TESTS
-These tests are expected to succeed. If they don't, something is
-wrong!
+These tests are expected to succeed. If they don't, something's
+screwed up!
=item * SKIPPED TESTS
-C<skip> should be used to skip tests for which a platform specific
-feature isn't available.
+Skip tests need a platform specific feature that might or might not be
+available. The first argument should evaluate to true if the required
+feature is NOT available. After the first argument, skip tests work
+exactly the same way as do normal tests.
=item * TODO TESTS
-TODO tests are designed for the purpose of maintaining an executable
-TODO list. These tests are expected NOT to succeed (otherwise the
-feature they test would be on the new feature list, not the TODO
-list).
+TODO tests are designed for maintaining an executable TODO list.
+These tests are expected NOT to succeed (otherwise the feature they
+test would be on the new feature list, not the TODO list).
Packages should NOT be released with successful TODO tests. As soon
as a TODO test starts working, it should be promoted to a normal test
diff --git a/lib/Tie/Handle.pm b/lib/Tie/Handle.pm
new file mode 100644
index 0000000000..c7550530b8
--- /dev/null
+++ b/lib/Tie/Handle.pm
@@ -0,0 +1,161 @@
+package Tie::Handle;
+
+=head1 NAME
+
+Tie::Handle - base class definitions for tied handles
+
+=head1 SYNOPSIS
+
+ package NewHandle;
+ require Tie::Handle;
+
+ @ISA = (Tie::Handle);
+
+ sub READ { ... } # Provide a needed method
+ sub TIEHANDLE { ... } # Overrides inherited method
+
+
+ package main;
+
+ tie *FH, 'NewHandle';
+
+=head1 DESCRIPTION
+
+This module provides some skeletal methods for handle-tying classes. See
+L<perltie> for a list of the functions required in tying a handle to a package.
+The basic B<Tie::Handle> package provides a C<new> method, as well as methods
+C<TIESCALAR>, C<FETCH> and C<STORE>. The C<new> method is provided as a means
+of grandfathering, for classes that forget to provide their own C<TIESCALAR>
+method.
+
+For developers wishing to write their own tied-handle classes, the methods
+are summarized below. The L<perltie> section not only documents these, but
+has sample code as well:
+
+=over
+
+=item TIEHANDLE classname, LIST
+
+The method invoked by the command C<tie *glob, classname>. Associates a new
+glob instance with the specified class. C<LIST> would represent additional
+arguments (along the lines of L<AnyDBM_File> and compatriots) needed to
+complete the association.
+
+=item WRITE this, scalar, length, offset
+
+Write I<length> bytes of data from I<scalar> starting at I<offset>.
+
+=item PRINT this, LIST
+
+Print the values in I<LIST>
+
+=item PRINTF this, format, LIST
+
+Print the values in I<LIST> using I<format>
+
+=item READ this, scalar, length, offset
+
+Read I<length> bytes of data into I<scalar> starting at I<offset>.
+
+=item READLINE this
+
+Read a single line
+
+=item GETC this
+
+Get a single character
+
+=item DESTROY this
+
+Free the storage associated with the tied handle referenced by I<this>.
+This is rarely needed, as Perl manages its memory quite well. But the
+option exists, should a class wish to perform specific actions upon the
+destruction of an instance.
+
+=back
+
+=head1 MORE INFORMATION
+
+The L<perltie> section contains an example of tying handles.
+
+=cut
+
+use Carp;
+
+sub new {
+ my $pkg = shift;
+ $pkg->TIEHANDLE(@_);
+}
+
+# "Grandfather" the new, a la Tie::Hash
+
+sub TIEHANDLE {
+ my $pkg = shift;
+ if (defined &{"{$pkg}::new"}) {
+ carp "WARNING: calling ${pkg}->new since ${pkg}->TIEHANDLE is missing"
+ if $^W;
+ $pkg->new(@_);
+ }
+ else {
+ croak "$pkg doesn't define a TIEHANDLE method";
+ }
+}
+
+sub PRINT {
+ my $self = shift;
+ if($self->can('WRITE') != \&WRITE) {
+ my $buf = join(defined $, ? $, : "",@_);
+ $buf .= $\ if defined $\;
+ $self->WRITE($buf,length($buf),0);
+ }
+ else {
+ croak ref($self)," doesn't define a PRINT method";
+ }
+}
+
+sub PRINTF {
+ my $self = shift;
+
+ if($self->can('WRITE') != \&WRITE) {
+ my $buf = sprintf(@_);
+ $self->WRITE($buf,length($buf),0);
+ }
+ else {
+ croak ref($self)," doesn't define a PRINTF method";
+ }
+}
+
+sub READLINE {
+ my $pkg = ref $_[0];
+ croak "$pkg doesn't define a READLINE method";
+}
+
+sub GETC {
+ my $self = shift;
+
+ if($self->can('READ') != \&READ) {
+ my $buf;
+ $self->READ($buf,1);
+ return $buf;
+ }
+ else {
+ croak ref($self)," doesn't define a GETC method";
+ }
+}
+
+sub READ {
+ my $pkg = ref $_[0];
+ croak "$pkg doesn't define a READ method";
+}
+
+sub WRITE {
+ my $pkg = ref $_[0];
+ croak "$pkg doesn't define a WRITE method";
+}
+
+sub CLOSE {
+ my $pkg = ref $_[0];
+ croak "$pkg doesn't define a CLOSE method";
+}
+
+1;
diff --git a/lib/perl5db.pl b/lib/perl5db.pl
index 9048ed2baf..a4a1b1aae6 100644
--- a/lib/perl5db.pl
+++ b/lib/perl5db.pl
@@ -390,9 +390,9 @@ sub DB {
if ($val ne $old_watch[$n]) {
$signal = 1;
print $OUT <<EOP;
-Watchpoint $n: $to_watch[$n] changed:
-old value: $old_watch[$n]
-new value: $val
+Watchpoint $n:\t$to_watch[$n] changed:
+ old value:\t$old_watch[$n]
+ new value:\t$val
EOP
$old_watch[$n] = $val;
}
@@ -409,6 +409,15 @@ EOP
if ($emacs) {
$position = "\032\032$filename:$line:0\n";
print $LINEINFO $position;
+ } elsif ($package eq 'DB::fake') {
+ print_help(<<EOP);
+Debugged program terminated. Use B<q> to quit or B<R> to restart,
+ use B<O> I<inhibit_exit> to avoid stopping after program termination,
+ B<h q>, B<h R> or B<h O> to get additional info.
+EOP
+ $package = 'main';
+ $usercontext = '($@, $!, $,, $/, $\, $^W) = @saved;' .
+ "package $package;"; # this won't let them modify, alas
} else {
$sub =~ s/\'/::/;
$prefix = $sub =~ /::/ ? "" : "${'package'}::";
@@ -1461,8 +1470,14 @@ sub resetterm { # We forked, so we need a different TTY
TTY($fork_TTY);
undef $fork_TTY;
} else {
- print $OUT "Forked, but do not know how to change a TTY.\n",
- "Define \$DB::fork_TTY or get_fork_TTY().\n";
+ print_help(<<EOP);
+I<#########> Forked, but do not know how to change a B<TTY>. I<#########>
+ Define B<\$DB::fork_TTY>
+ - or a function B<DB::get_fork_TTY()> which will set B<\$DB::fork_TTY>.
+ The value of B<\$DB::fork_TTY> should be the name of I<TTY> to use.
+ On I<UNIX>-like systems one can get the name of a I<TTY> for the given window
+ by typing B<tty>, and disconnect the I<shell> from I<TTY> by B<sleep 1000000>.
+EOP
}
}
@@ -1824,7 +1839,7 @@ B<R> Pure-man-restart of debugger, some of debugger state
and the following command-line options: I<-w>, I<-I>, I<-e>.
B<h> [I<db_command>] Get help [on a specific debugger command], enter B<|h> to page.
B<h h> Summary of debugger commands.
-B<q> or B<^D> Quit. Set \$DB::finished to 0 to debug global destruction.
+B<q> or B<^D> Quit. Set B<\$DB::finished = 0> to debug global destruction.
";
$summary = <<"END_SUM";
diff --git a/makedepend.SH b/makedepend.SH
index 7583543534..dceca0baee 100755
--- a/makedepend.SH
+++ b/makedepend.SH
@@ -105,7 +105,7 @@ for file in `$cat .clist`; do
*/*) finc="-I`echo $file | sed 's#/[^/]*$##`" ;;
*) finc= ;;
esac
- $echo "Finding dependencies for $filebase$obj_ext."
+ $echo "Finding dependencies for $filebase$_o."
( $echo "#line 1 \"$file\""; \
$sed -n <$file \
-e "/^${filebase}_init(/q" \
diff --git a/miniperlmain.c b/miniperlmain.c
index 190c7fb17b..5b075a52dd 100644
--- a/miniperlmain.c
+++ b/miniperlmain.c
@@ -14,14 +14,7 @@ static void xs_init _((void));
static PerlInterpreter *my_perl;
int
-#ifdef CAN_PROTOTYPE
main(int argc, char **argv, char **env)
-#else
-main(argc, argv, env)
-int argc;
-char **argv;
-char **env;
-#endif
{
int exitstatus;
diff --git a/op.c b/op.c
index c0b1124d30..0213d54e40 100644
--- a/op.c
+++ b/op.c
@@ -156,16 +156,7 @@ pad_allocmy(char *name)
}
STATIC PADOFFSET
-#ifndef CAN_PROTOTYPE
-pad_findlex(name, newoff, seq, startcv, cx_ix)
-char *name;
-PADOFFSET newoff;
-U32 seq;
-CV* startcv;
-I32 cx_ix;
-#else
pad_findlex(char *name, PADOFFSET newoff, U32 seq, CV* startcv, I32 cx_ix)
-#endif
{
dTHR;
CV *cv;
@@ -409,12 +400,7 @@ pad_alloc(I32 optype, U32 tmptype)
}
SV *
-#ifndef CAN_PROTOTYPE
-pad_sv(po)
-PADOFFSET po;
-#else
pad_sv(PADOFFSET po)
-#endif /* CAN_PROTOTYPE */
{
dTHR;
#ifdef USE_THREADS
@@ -430,12 +416,7 @@ pad_sv(PADOFFSET po)
}
void
-#ifndef CAN_PROTOTYPE
-pad_free(po)
-PADOFFSET po;
-#else
pad_free(PADOFFSET po)
-#endif /* CAN_PROTOTYPE */
{
dTHR;
if (!curpad)
@@ -458,12 +439,7 @@ pad_free(PADOFFSET po)
}
void
-#ifndef CAN_PROTOTYPE
-pad_swipe(po)
-PADOFFSET po;
-#else
pad_swipe(PADOFFSET po)
-#endif /* CAN_PROTOTYPE */
{
dTHR;
if (AvARRAY(comppad) != curpad)
@@ -2931,18 +2907,7 @@ newWHILEOP(I32 flags, I32 debuggable, LOOP *loop, I32 whileline, OP *expr, OP *b
}
OP *
-#ifndef CAN_PROTOTYPE
-newFOROP(flags,label,forline,sv,expr,block,cont)
-I32 flags;
-char *label;
-line_t forline;
-OP* sv;
-OP* expr;
-OP*block;
-OP*cont;
-#else
newFOROP(I32 flags,char *label,line_t forline,OP *sv,OP *expr,OP *block,OP *cont)
-#endif /* CAN_PROTOTYPE */
{
LOOP *loop;
OP *wop;
diff --git a/os2/diff.configure b/os2/diff.configure
index 9f42dc139f..7bdfa6f585 100644
--- a/os2/diff.configure
+++ b/os2/diff.configure
@@ -1,6 +1,6 @@
---- Configure.orig Fri Aug 1 23:12:26 1997
-+++ Configure Fri Aug 1 23:20:24 1997
-@@ -1489,7 +1489,7 @@
+--- Configure Wed Feb 25 16:52:55 1998
++++ Configure.os2 Wed Feb 25 16:52:58 1998
+@@ -1602,7 +1602,7 @@
*)
echo "I don't know where '$file' is, and my life depends on it." >&4
echo "Go find a public domain implementation or fix your PATH setting!" >&4
@@ -9,18 +9,7 @@
;;
esac
done
-@@ -1498,7 +1498,9 @@
- say=offhand
- for file in $trylist; do
- xxx=`./loc $file $file $pth`
-- eval $file=$xxx
-+ if test "X$file" != "X$xxx" ; then
-+ eval $file=$xxx
-+ fi
- eval _$file=$xxx
- case "$xxx" in
- /*)
-@@ -3198,7 +3200,7 @@
+@@ -3637,7 +3637,7 @@
exit(0);
}
EOM
@@ -29,20 +18,7 @@
gccversion=`./gccvers`
case "$gccversion" in
'') echo "You are not using GNU cc." ;;
-@@ -3401,6 +3403,12 @@
- *"-l$thislib "*);;
- *) dflt="$dflt -l$thislib";;
- esac
-+ elif xxx=`./loc $thislib.lib X $libpth`; $test -f "$xxx"; then
-+ echo "Found -l$thislib."
-+ case " $dflt " in
-+ *"-l$thislib "*);;
-+ *) dflt="$dflt -l$thislib";;
-+ esac
- else
- echo "No -l$thislib."
- fi
-@@ -3950,7 +3958,7 @@
+@@ -4434,7 +4434,7 @@
esac
;;
esac
@@ -51,219 +27,7 @@
case "$libs" in
'') ;;
*) for thislib in $libs; do
-@@ -3972,6 +3980,8 @@
- :
- elif try=`./loc $thislib X $libpth`; $test -f "$try"; then
- :
-+ elif try=`./loc $thislib$lib_ext X $libpth`; $test -f "$try"; then
-+ :
- elif try=`./loc Slib$thislib$lib_ext X $xlibpth`; $test -f "$try"; then
- :
- else
-@@ -4156,6 +4166,10 @@
- eval $xscan;\
- $contains '^fprintf$' libc.list >/dev/null 2>&1; then
- eval $xrun
-+elif com="$sed -n -e 's/^[-0-9a-f ]*_\(.*\)=.*/\1/p'";\
-+ eval $xscan;\
-+ $contains '^fprintf$' libc.list >/dev/null 2>&1; then
-+ eval $xrun
- else
- nm -p $* 2>/dev/null >libc.tmp
- $grep fprintf libc.tmp > libc.ptf
-@@ -4166,23 +4180,33 @@
- eval $xrun
- else
- echo " "
-- echo "nm didn't seem to work right. Trying ar instead..." >&4
-+ echo "nm didn't seem to work right. Trying $ar instead..." >&4
- com=''
-- if ar t $libc > libc.tmp; then
-- for thisname in $libnames; do
-- ar t $thisname >>libc.tmp
-+ if test "X$osname" = "Xos2"; then ar_opt=tv ; else ar_opt=t ;fi
-+ if $ar $ar_opt $libc > libc.tmp; then
-+ echo \; > libc.tmp
-+ for thisname in $libnames $libc; do
-+ $ar $ar_opt $thisname >>libc.tmp
-+ if test "X$osname" = "Xos2"; then
-+ # Revision 50 of EMX has bug in $ar:
-+ emximp -o tmp.imp $thisname \
-+ 2>/dev/null && \
-+ $sed -e 's/^\([_a-zA-Z0-9]*\) .*$/\1/p' \
-+ < tmp.imp >>libc.tmp
-+ $rm tmp.imp
-+ fi
- done
-- $sed -e 's/\.o$//' < libc.tmp > libc.list
-+ $sed -e 's/\.o$//' -e 's/^ \+//' < libc.tmp | grep -v "^IMPORT#" > libc.list
- echo "Ok." >&4
- else
-- echo "ar didn't seem to work right." >&4
-+ echo "$ar didn't seem to work right." >&4
- echo "Maybe this is a Cray...trying bld instead..." >&4
- if bld t $libc | $sed -e 's/.*\///' -e 's/\.o:.*$//' > libc.list
- then
- for thisname in $libnames; do
- bld t $libnames | \
- $sed -e 's/.*\///' -e 's/\.o:.*$//' >>libc.list
-- ar t $thisname >>libc.tmp
-+ $ar t $thisname >>libc.tmp
- done
- echo "Ok." >&4
- else
-@@ -5611,15 +5635,15 @@
- EOCP
- : check sys/file.h first, no particular reason here
- if $test `./findhdr sys/file.h` && \
-- $cc $cppflags -DI_SYS_FILE access.c -o access >/dev/null 2>&1 ; then
-+ $cc $ldflags $cppflags -DI_SYS_FILE access.c -o access >/dev/null 2>&1 ; then
- h_sysfile=true;
- echo "<sys/file.h> defines the *_OK access constants." >&4
- elif $test `./findhdr fcntl.h` && \
-- $cc $cppflags -DI_FCNTL access.c -o access >/dev/null 2>&1 ; then
-+ $cc $ldflags $cppflags -DI_FCNTL access.c -o access >/dev/null 2>&1 ; then
- h_fcntl=true;
- echo "<fcntl.h> defines the *_OK access constants." >&4
- elif $test `./findhdr unistd.h` && \
-- $cc $cppflags -DI_UNISTD access.c -o access >/dev/null 2>&1 ; then
-+ $cc $ldflags $cppflags -DI_UNISTD access.c -o access >/dev/null 2>&1 ; then
- echo "<unistd.h> defines the *_OK access constants." >&4
- else
- echo "I can't find the four *_OK access constants--I'll use mine." >&4
-@@ -5913,7 +5937,7 @@
- exit(result);
- }
- EOCP
--if $cc -o try $ccflags try.c >/dev/null 2>&1; then
-+if $cc -o try $ccflags try.c $ldflags >/dev/null 2>&1; then
- ./try
- yyy=$?
- else
-@@ -5994,7 +6018,7 @@
-
- }
- EOCP
--if $cc -o try $ccflags try.c >/dev/null 2>&1; then
-+if $cc -o try $ccflags try.c $ldflags >/dev/null 2>&1; then
- ./try
- castflags=$?
- else
-@@ -6033,7 +6057,7 @@
- exit((unsigned long)vsprintf(buf,"%s",args) > 10L);
- }
- EOF
-- if $cc $ccflags vprintf.c -o vprintf >/dev/null 2>&1 && ./vprintf; then
-+ if $cc $ccflags vprintf.c $ldflags -o vprintf >/dev/null 2>&1 && ./vprintf; then
- echo "Your vsprintf() returns (int)." >&4
- val2="$undef"
- else
-@@ -6381,7 +6405,7 @@
- EOCP
- : check sys/file.h first to get FREAD on Sun
- if $test `./findhdr sys/file.h` && \
-- $cc $ccflags "-DI_SYS_FILE" -o open3 $ldflags open3.c $libs >/dev/null 2>&1 ; then
-+ $cc $ldflags $ccflags "-DI_SYS_FILE" -o open3 $ldflags open3.c $libs >/dev/null 2>&1 ; then
- h_sysfile=true;
- echo "<sys/file.h> defines the O_* constants..." >&4
- if ./open3; then
-@@ -6392,7 +6416,7 @@
- val="$undef"
- fi
- elif $test `./findhdr fcntl.h` && \
-- $cc $ccflags "-DI_FCNTL" -o open3 $ldflags open3.c $libs >/dev/null 2>&1 ; then
-+ $cc $ldflags $ccflags "-DI_FCNTL" -o open3 $ldflags open3.c $libs >/dev/null 2>&1 ; then
- h_fcntl=true;
- echo "<fcntl.h> defines the O_* constants..." >&4
- if ./open3; then
-@@ -6898,7 +6922,7 @@
- y*|true)
- usemymalloc='y'
- mallocsrc='malloc.c'
-- mallocobj='malloc.o'
-+ mallocobj="malloc$obj_ext"
- d_mymalloc="$define"
- case "$libs" in
- *-lmalloc*)
-@@ -8156,7 +8180,7 @@
- printf("%d\n", (char *)&try.bar - (char *)&try.foo);
- }
- EOCP
-- if $cc $ccflags try.c -o try >/dev/null 2>&1; then
-+ if $cc $ccflags $ldflags try.c -o try >/dev/null 2>&1; then
- dflt=`./try`
- else
- dflt='8'
-@@ -8204,7 +8228,7 @@
- }
- EOCP
- xxx_prompt=y
-- if $cc $ccflags try.c -o try >/dev/null 2>&1 && ./try > /dev/null; then
-+ if $cc $ccflags $ldflags try.c -o try >/dev/null 2>&1 && ./try > /dev/null; then
- dflt=`./try`
- case "$dflt" in
- [1-4][1-4][1-4][1-4]|12345678|87654321)
-@@ -8711,18 +8735,18 @@
- $cc $ccflags -c bar1.c >/dev/null 2>&1
- $cc $ccflags -c bar2.c >/dev/null 2>&1
- $cc $ccflags -c foo.c >/dev/null 2>&1
--ar rc bar$lib_ext bar2.o bar1.o >/dev/null 2>&1
-+$ar rc bar$lib_ext bar2.o bar1.o >/dev/null 2>&1
- if $cc $ccflags $ldflags -o foobar foo.o bar$lib_ext $libs > /dev/null 2>&1 &&
- ./foobar >/dev/null 2>&1; then
-- echo "ar appears to generate random libraries itself."
-+ echo "$ar appears to generate random libraries itself."
- orderlib=false
- ranlib=":"
--elif ar ts bar$lib_ext >/dev/null 2>&1 &&
-+elif $ar ts bar$lib_ext >/dev/null 2>&1 &&
- $cc $ccflags $ldflags -o foobar foo.o bar$lib_ext $libs > /dev/null 2>&1 &&
- ./foobar >/dev/null 2>&1; then
-- echo "a table of contents needs to be added with 'ar ts'."
-+ echo "a table of contents needs to be added with '$ar ts'."
- orderlib=false
-- ranlib="ar ts"
-+ ranlib="$ar ts"
- else
- case "$ranlib" in
- :) ranlib='';;
-@@ -8794,7 +8818,7 @@
- '') $echo $n ".$c"
- if $cc $ccflags \
- $i_time $i_systime $i_systimek $sysselect $s_timeval $s_timezone \
-- try.c -o try >/dev/null 2>&1 ; then
-+ try.c -o try $ldflags >/dev/null 2>&1 ; then
- set X $i_time $i_systime $i_systimek $sysselect $s_timeval
- shift
- flags="$*"
-@@ -8863,7 +8887,7 @@
- #endif
- }
- EOCP
--if $cc $ccflags -DTRYBITS fd_set.c -o fd_set >fd_set.out 2>&1 ; then
-+if $cc $ccflags $ldflags -DTRYBITS fd_set.c -o fd_set >fd_set.out 2>&1 ; then
- d_fds_bits="$define"
- d_fd_set="$define"
- echo "Well, your system knows about the normal fd_set typedef..." >&4
-@@ -8880,7 +8904,7 @@
- $cat <<'EOM'
- Hmm, your compiler has some difficulty with fd_set. Checking further...
- EOM
-- if $cc $ccflags fd_set.c -o fd_set >fd_set.out 2>&1 ; then
-+ if $cc $ccflags $ldflags fd_set.c -o fd_set >fd_set.out 2>&1 ; then
- d_fds_bits="$undef"
- d_fd_set="$define"
- echo "Well, your system has some sort of fd_set available..." >&4
-@@ -9627,7 +9651,7 @@
- else
- echo "false"
- fi
--$rm -f varargs.o
-+$rm -f varargs$obj_ext
- EOP
- chmod +x varargs
-
-@@ -9954,7 +9978,7 @@
+@@ -10392,7 +10392,7 @@
echo " "
echo "Stripping down executable paths..." >&4
for file in $loclist $trylist; do
diff --git a/os2/os2.c b/os2/os2.c
index fe7f99bb7e..f24c3af5ce 100644
--- a/os2/os2.c
+++ b/os2/os2.c
@@ -620,8 +620,6 @@ char *mode;
PerlIO *res;
SV *sv;
- if (pipe(p) < 0)
- return Nullfp;
/* `this' is what we use in the parent, `that' in the child. */
this = (*mode == 'w');
that = !this;
@@ -629,6 +627,8 @@ char *mode;
taint_env();
taint_proper("Insecure %s%s", "EXEC");
}
+ if (pipe(p) < 0)
+ return Nullfp;
/* Now we need to spawn the child. */
newfd = dup(*mode == 'r'); /* Preserve std* */
if (p[that] != (*mode == 'r')) {
diff --git a/patchlevel.h b/patchlevel.h
index fceaa3f595..1fe5ee8e2a 100644
--- a/patchlevel.h
+++ b/patchlevel.h
@@ -1,5 +1,5 @@
#define PATCHLEVEL 4
-#define SUBVERSION 60
+#define SUBVERSION 61
/*
local_patches -- list of locally applied less-than-subversion patches.
diff --git a/perl.c b/perl.c
index f4a9526305..581e9056a1 100644
--- a/perl.c
+++ b/perl.c
@@ -85,30 +85,6 @@ static void validate_suid _((char *, char*));
static int fdscript = -1;
-#if defined(DEBUGGING) && defined(USE_THREADS) && defined(__linux__)
-#include <asm/sigcontext.h>
-STATIC void
-catch_sigsegv(int signo, struct sigcontext_struct sc)
-{
- PerlProc_signal(SIGSEGV, SIG_DFL);
- fprintf(stderr, "Segmentation fault dereferencing 0x%lx\n"
- "return_address = 0x%lx, eip = 0x%lx\n",
- sc.cr2, __builtin_return_address(0), sc.eip);
- fprintf(stderr, "thread = 0x%lx\n", (unsigned long)THR);
-}
-#endif
-
-#ifdef PERL_OBJECT
-CPerlObj* perl_alloc(IPerlMem* ipM, IPerlEnv* ipE, IPerlStdIO* ipStd,
- IPerlLIO* ipLIO, IPerlDir* ipD, IPerlSock* ipS, IPerlProc* ipP)
-{
- CPerlObj* pPerl = new(ipM) CPerlObj(ipM, ipE, ipStd, ipLIO, ipD, ipS, ipP);
- if(pPerl != NULL)
- pPerl->Init();
-
- return pPerl;
-}
-#else
PerlInterpreter *
perl_alloc(void)
{
@@ -163,7 +139,10 @@ perl_construct(register PerlInterpreter *sv_interp)
COND_INIT(&eval_cond);
MUTEX_INIT(&threads_mutex);
COND_INIT(&nthreads_cond);
-
+#ifdef EMULATE_ATOMIC_REFCOUNTS
+ MUTEX_INIT(&svref_mutex);
+#endif /* EMULATE_ATOMIC_REFCOUNTS */
+
thr = init_main_thread();
#endif /* USE_THREADS */
@@ -947,10 +926,6 @@ print \" \\@INC:\\n @INC\\n\";");
init_os_extras();
#endif
-#if defined(DEBUGGING) && defined(USE_THREADS) && defined(__linux__)
- DEBUG_L(PerlProc_signal(SIGSEGV, (void(*)(int))catch_sigsegv););
-#endif
-
init_predump_symbols();
if (!do_undump)
init_postdump_symbols(argc,argv,env);
@@ -1709,7 +1684,7 @@ moreswitches(char *s)
#endif
#ifdef DJGPP
printf("djgpp v2 port (jpl5003c) by Hirofumi Watanabe, 1996\n");
- printf("djgpp v2 port (perl5004) by Laszlo Molnar, 1997\n");
+ printf("djgpp v2 port (perl5004+) by Laszlo Molnar, 1997-1998\n");
#endif
#ifdef OS2
printf("\n\nOS/2 port Copyright (c) 1990, 1991, Raymond Chen, Kai Uwe Rommel\n"
@@ -1823,16 +1798,8 @@ init_main_stash(void)
sv_setpvn(GvSV(gv_fetchpv("/", TRUE, SVt_PV)), "\n", 1);
}
-#ifdef CAN_PROTOTYPE
STATIC void
open_script(char *scriptname, bool dosearch, SV *sv)
-#else
-STATIC void
-open_script(scriptname,dosearch,sv)
-char *scriptname;
-bool dosearch;
-SV *sv;
-#endif
{
dTHR;
char *xfound = Nullch;
@@ -2704,7 +2671,7 @@ init_perllib(void)
}
/* Use the ~-expanded versions of APPLLIB (undocumented),
- ARCHLIB PRIVLIB SITEARCH SITELIB and OLDARCHLIB
+ ARCHLIB PRIVLIB SITEARCH and SITELIB
*/
#ifdef APPLLIB_EXP
incpush(APPLLIB_EXP, FALSE);
@@ -2724,10 +2691,6 @@ init_perllib(void)
#ifdef SITELIB_EXP
incpush(SITELIB_EXP, FALSE);
#endif
-#ifdef OLDARCHLIB_EXP /* 5.00[01] compatibility */
- incpush(OLDARCHLIB_EXP, FALSE);
-#endif
-
if (!tainting)
incpush(".", FALSE);
}
diff --git a/perl.h b/perl.h
index 1858803c82..60cd79c3e2 100644
--- a/perl.h
+++ b/perl.h
@@ -145,10 +145,6 @@ register struct op *op asm(stringify(OP_IN_REGISTER));
# define DONT_DECLARE_STD 1
#endif
-#if defined(NeXT) && !defined(_POSIX_SOURCE)
-# define MISSING_PID_T
-#endif
-
#if defined(HASVOLATILE) || defined(STANDARD_C)
# ifdef __cplusplus
# define VOL // to temporarily suppress warnings
@@ -165,10 +161,6 @@ register struct op *op asm(stringify(OP_IN_REGISTER));
#define TAINT_ENV() if (tainting) { taint_env(); }
#define TAINT_PROPER(s) if (tainting) { taint_proper(no_security, s); }
-#ifdef MISSING_PID_T
-typedef int pid_t;
-#endif
-
/* XXX All process group stuff is handled in pp_sys.c. Should these
defines move there? If so, I could simplify this a lot. --AD 9/96.
*/
@@ -1136,6 +1128,8 @@ union any {
#include "hv.h"
#include "mg.h"
#include "scope.h"
+#include "bytecode.h"
+#include "byterun.h"
/* Current curly descriptor */
typedef struct curcur CURCUR;
diff --git a/perlvars.h b/perlvars.h
index 1faa80c0d1..b480537796 100644
--- a/perlvars.h
+++ b/perlvars.h
@@ -19,6 +19,7 @@ PERLVAR(Geval_owner, struct perl_thread *) /* Owner thread for doeval */
PERLVAR(Gnthreads, int) /* Number of threads currently */
PERLVAR(Gthreads_mutex, perl_mutex) /* Mutex for nthreads and thread list */
PERLVAR(Gnthreads_cond, perl_cond) /* Condition variable for nthreads */
+PERLVAR(Gsvref_mutex, perl_mutex) /* Mutex for SvREFCNT_{inc,dec} */
PERLVARI(Gthreadsv_names, char *, THREADSV_NAMES)
#ifdef FAKE_THREADS
PERLVAR(Gcurthr, struct perl_thread *) /* Currently executing (fake) thread */
diff --git a/pod/perldiag.pod b/pod/perldiag.pod
index 4ed7041cd1..5f2876bc73 100644
--- a/pod/perldiag.pod
+++ b/pod/perldiag.pod
@@ -638,6 +638,11 @@ call for another. It can't manufacture one out of whole cloth. In general
you should be calling it out of only an AUTOLOAD routine anyway. See
L<perlfunc/goto>.
+=item Can't goto subroutine from an eval-string
+
+(F) The "goto subroutine" call can't be used to jump out of an eval "string".
+(You can use it to jump out of an eval {BLOCK}, but you probably don't want to.)
+
=item Can't localize through a reference
(F) You said something like C<local $$ref>, which Perl can't currently
diff --git a/pod/perltie.pod b/pod/perltie.pod
index 79a749e68a..398c3a0d29 100644
--- a/pod/perltie.pod
+++ b/pod/perltie.pod
@@ -620,8 +620,8 @@ use the each() function to iterate over such. Example:
This is partially implemented now.
A class implementing a tied filehandle should define the following
-methods: TIEHANDLE, at least one of PRINT, PRINTF, READLINE, GETC, or READ,
-and possibly DESTROY.
+methods: TIEHANDLE, at least one of PRINT, PRINTF, WRITE, READLINE, GETC,
+READ, and possibly CLOSE and DESTROY.
It is especially useful when perl is embedded in some other program,
where output to STDOUT and STDERR may have to be redirected in some
@@ -641,6 +641,17 @@ hold some internal information.
sub TIEHANDLE { print "<shout>\n"; my $i; bless \$i, shift }
+=item WRITE this, LIST
+
+This method will be called when the handle is written to via the
+C<syswrite> function.
+
+ sub WRITE {
+ $r = shift;
+ my($buf,$len,$offset) = @_;
+ print "WRITE called, \$buf=$buf, \$len=$len, \$offset=$offset";
+ }
+
=item PRINT this, LIST
This method will be triggered every time the tied handle is printed to
@@ -663,7 +674,7 @@ passed to the printf function.
print sprintf($fmt, @_)."\n";
}
-=item READ this LIST
+=item READ this, LIST
This method will be called when the handle is read from via the C<read>
or C<sysread> functions.
@@ -687,6 +698,13 @@ This method will be called when the C<getc> function is called.
sub GETC { print "Don't GETC, Get Perl"; return "a"; }
+=item CLOSE this
+
+This method will be called when the handle is closed via the C<close>
+function.
+
+ sub CLOSE { print "CLOSE called.\n" }
+
=item DESTROY this
As with the other types of ties, this method will be called when the
diff --git a/pod/perlvar.pod b/pod/perlvar.pod
index 3ab11ef2ae..221947b508 100644
--- a/pod/perlvar.pod
+++ b/pod/perlvar.pod
@@ -453,11 +453,8 @@ system error. This is more specific information about the last
system error than that provided by C<$!>. This is particularly
important when C<$!> is set to B<EVMSERR>.
-Under OS/2, C<$^E> is set based on the value returned by the OS/2
-call C<_syserrno()> only when a call into the OS/2 API generates
-an error. In this case, C<$!> is set to a special value to
-indicate that C<$^E> should be checked. Otherwise, C<$^E> is
-just the same as C<$!>.
+Under OS/2, C<$^E> is set to the error code of the last call to
+OS/2 API either via CRT, or directly from perl.
Under Win32, C<$^E> always returns the last error information
reported by the Win32 call C<GetLastError()> which describes
diff --git a/pp.c b/pp.c
index c78c845ce1..aaa058b5bb 100644
--- a/pp.c
+++ b/pp.c
@@ -107,12 +107,16 @@ static bool srand_called = FALSE;
/* variations on pp_null */
-#ifdef DONT_DECLARE_STD
#ifdef I_UNISTD
#include <unistd.h>
#endif
-#else
-extern pid_t getpid (void);
+
+/* XXX I can't imagine anyone who doesn't have this actually _needs_
+ it, since pid_t is an integral type.
+ --AD 2/20/1998
+*/
+#ifdef NEED_GETPID_PROTO
+extern Pid_t getpid (void);
#endif
PP(pp_stub)
diff --git a/pp.h b/pp.h
index 3df86632a9..3167591312 100644
--- a/pp.h
+++ b/pp.h
@@ -14,15 +14,11 @@
#define ARGS
#define dARGS
#endif /* USE_THREADS */
-#ifdef CAN_PROTOTYPE
#ifdef PERL_OBJECT
-#define PP(s) OP* CPerlObj::s _((ARGSproto))
+#define PP(s) OP * CPerlObj::s(ARGSproto)
#else
#define PP(s) OP * s(ARGSproto)
#endif
-#else /* CAN_PROTOTYPE */
-#define PP(s) OP* s(ARGS) dARGS
-#endif /* CAN_PROTOTYPE */
#define SP sp
#define MARK mark
diff --git a/pp_ctl.c b/pp_ctl.c
index 54a4f1451f..12d24b710d 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -1721,8 +1721,11 @@ PP(pp_goto)
if (cxix < cxstack_ix)
dounwind(cxix);
TOPBLOCK(cx);
+ if (cx->cx_type == CXt_EVAL && cx->blk_eval.old_op_type == OP_ENTEREVAL)
+ DIE("Can't goto subroutine from an eval-string");
mark = stack_sp;
- if (cx->blk_sub.hasargs) { /* put @_ back onto stack */
+ if (cx->cx_type == CXt_SUB &&
+ cx->blk_sub.hasargs) { /* put @_ back onto stack */
AV* av = cx->blk_sub.argarray;
items = AvFILLp(av) + 1;
@@ -1737,7 +1740,8 @@ PP(pp_goto)
AvREAL_off(av);
av_clear(av);
}
- if (!(CvDEPTH(cx->blk_sub.cv) = cx->blk_sub.olddepth))
+ if (cx->cx_type == CXt_SUB &&
+ !(CvDEPTH(cx->blk_sub.cv) = cx->blk_sub.olddepth))
SvREFCNT_dec(cx->blk_sub.cv);
oldsave = scopestack[scopestack_ix - 1];
LEAVE_SCOPE(oldsave);
@@ -1767,6 +1771,12 @@ PP(pp_goto)
else {
AV* padlist = CvPADLIST(cv);
SV** svp = AvARRAY(padlist);
+ if (cx->cx_type == CXt_EVAL) {
+ in_eval = cx->blk_eval.old_in_eval;
+ eval_root = cx->blk_eval.old_eval_root;
+ cx->cx_type = CXt_SUB;
+ cx->blk_sub.hasargs = 0;
+ }
cx->blk_sub.cv = cv;
cx->blk_sub.olddepth = CvDEPTH(cv);
CvDEPTH(cv)++;
diff --git a/pp_sys.c b/pp_sys.c
index 3f30b63200..1913e156a7 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -356,11 +356,23 @@ PP(pp_close)
{
djSP;
GV *gv;
+ MAGIC *mg;
if (MAXARG == 0)
gv = defoutgv;
else
gv = (GV*)POPs;
+
+ if (SvRMAGICAL(gv) && (mg = mg_find((SV*)gv, 'q'))) {
+ PUSHMARK(SP);
+ XPUSHs(mg->mg_obj);
+ PUTBACK;
+ ENTER;
+ perl_call_method("CLOSE", G_SCALAR);
+ LEAVE;
+ SPAGAIN;
+ RETURN;
+ }
EXTEND(SP, 1);
PUSHs(boolSV(do_close(gv, TRUE)));
RETURN;
@@ -1319,8 +1331,25 @@ PP(pp_send)
char *buffer;
int length;
STRLEN blen;
+ MAGIC *mg;
gv = (GV*)*++MARK;
+ if (op->op_type == OP_SYSWRITE &&
+ SvRMAGICAL(gv) && (mg = mg_find((SV*)gv, 'q')))
+ {
+ SV *sv;
+
+ PUSHMARK(MARK-1);
+ *MARK = mg->mg_obj;
+ ENTER;
+ perl_call_method("WRITE", G_SCALAR);
+ LEAVE;
+ SPAGAIN;
+ sv = POPs;
+ SP = ORIGMARK;
+ PUSHs(sv);
+ RETURN;
+ }
if (!gv)
goto say_undef;
bufsv = *++MARK;
@@ -2915,9 +2944,9 @@ PP(pp_telldir)
{
djSP; dTARGET;
#if defined(HAS_TELLDIR) || defined(telldir)
-#if !defined(telldir) && !defined(HAS_TELLDIR_PROTOTYPE) && !defined(DONT_DECLARE_STD)
+# ifdef NEED_TELLDIR_PROTO /* XXX does _anyone_ need this? --AD 2/20/1998 */
long telldir _((DIR *));
-#endif
+# endif
GV *gv = (GV*)POPs;
register IO *io = GvIOn(gv);
diff --git a/regcomp.c b/regcomp.c
index fc6b131256..ae2b02ee75 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -319,7 +319,7 @@ study_chunk(regnode **scanp, I32 *deltap, regnode *last, scan_data_t *data, U32
scan = next;
if (data_fake.flags & (SF_HAS_PAR|SF_IN_PAR))
pars++;
- if (data_fake.flags & SF_HAS_EVAL)
+ if (data && (data_fake.flags & SF_HAS_EVAL))
data->flags |= SF_HAS_EVAL;
if (code == SUSPEND)
break;
@@ -565,7 +565,7 @@ study_chunk(regnode **scanp, I32 *deltap, regnode *last, scan_data_t *data, U32
data->longest = &(data->longest_float);
}
}
- if (fl & SF_HAS_EVAL)
+ if (data && (fl & SF_HAS_EVAL))
data->flags |= SF_HAS_EVAL;
optimize_curly_tail:
#ifdef REGALIGN
@@ -614,7 +614,7 @@ study_chunk(regnode **scanp, I32 *deltap, regnode *last, scan_data_t *data, U32
}
if (data && data_fake.flags & (SF_HAS_PAR|SF_IN_PAR))
pars++;
- if (data_fake.flags & SF_HAS_EVAL)
+ if (data && (data_fake.flags & SF_HAS_EVAL))
data->flags |= SF_HAS_EVAL;
} else if (OP(scan) == OPEN) {
pars++;
@@ -2025,12 +2025,7 @@ nextchar(void)
- reg_node - emit a node
*/
STATIC regnode * /* Location. */
-#ifdef CAN_PROTOTYPE
reg_node(U8 op)
-#else
-reg_node(op)
-U8 op;
-#endif
{
register regnode *ret;
register regnode *ptr;
@@ -2058,13 +2053,7 @@ U8 op;
- reganode - emit a node with an argument
*/
STATIC regnode * /* Location. */
-#ifdef CAN_PROTOTYPE
reganode(U8 op, U32 arg)
-#else
-reganode(op, arg)
-U8 op;
-U32 arg;
-#endif
{
register regnode *ret;
register regnode *ptr;
@@ -2091,15 +2080,8 @@ U32 arg;
/*
- regc - emit (if appropriate) a byte of code
*/
-#ifdef CAN_PROTOTYPE
STATIC void
regc(U8 b, char* s)
-#else
-static void
-regc(b, s)
-U8 b;
-char *s;
-#endif
{
if (!SIZE_ONLY)
*s = b;
@@ -2110,15 +2092,8 @@ char *s;
*
* Means relocating the operand.
*/
-#ifdef CAN_PROTOTYPE
STATIC void
reginsert(U8 op, regnode *opnd)
-#else
-static void
-reginsert(op, opnd)
-U8 op;
-regnode *opnd;
-#endif
{
register regnode *src;
register regnode *dst;
diff --git a/sv.c b/sv.c
index a31f41dcb1..ea6f6c4dbe 100644
--- a/sv.c
+++ b/sv.c
@@ -2295,7 +2295,7 @@ sv_usepvn(register SV *sv, register char *ptr, register STRLEN len)
void
sv_usepvn_mg(register SV *sv, register char *ptr, register STRLEN len)
{
- sv_usepvn_mg(sv,ptr,len);
+ sv_usepvn(sv,ptr,len);
SvSETMAGIC(sv);
}
@@ -2401,7 +2401,7 @@ sv_catpv(register SV *sv, register char *ptr)
void
sv_catpv_mg(register SV *sv, register char *ptr)
{
- sv_catpv_mg(sv,ptr);
+ sv_catpv(sv,ptr);
SvSETMAGIC(sv);
}
@@ -2876,13 +2876,15 @@ SV *
sv_newref(SV *sv)
{
if (sv)
- SvREFCNT(sv)++;
+ ATOMIC_INC(SvREFCNT(sv));
return sv;
}
void
sv_free(SV *sv)
{
+ int refcount_is_zero;
+
if (!sv)
return;
if (SvREADONLY(sv)) {
@@ -2897,7 +2899,8 @@ sv_free(SV *sv)
warn("Attempt to free unreferenced scalar");
return;
}
- if (--SvREFCNT(sv) > 0)
+ ATOMIC_DEC_AND_TEST(refcount_is_zero, SvREFCNT(sv));
+ if (!refcount_is_zero)
return;
#ifdef DEBUGGING
if (SvTEMP(sv)) {
diff --git a/sv.h b/sv.h
index 4dfa2c2559..2799cd530d 100644
--- a/sv.h
+++ b/sv.h
@@ -72,13 +72,46 @@ struct io {
#define SvFLAGS(sv) (sv)->sv_flags
#define SvREFCNT(sv) (sv)->sv_refcnt
+#ifdef USE_THREADS
+
+# ifndef EMULATE_ATOMIC_REFCOUNTS
+# include "atomic.h"
+# endif
+
+# ifdef EMULATE_ATOMIC_REFCOUNTS
+# define ATOMIC_INC(count) STMT_START { \
+ MUTEX_LOCK(&svref_mutex); \
+ ++count; \
+ MUTEX_UNLOCK(&svref_mutex); \
+ } STMT_END
+# define ATOMIC_DEC_AND_TEST(res,count) STMT_START { \
+ MUTEX_LOCK(&svref_mutex); \
+ res = (--count == 0); \
+ MUTEX_UNLOCK(&svref_mutex); \
+ } STMT_END
+# else
+# define ATOMIC_INC(count) atomic_inc(&count)
+# define ATOMIC_DEC_AND_TEST(res,count) (res = atomic_dec_and_test(&count))
+# endif /* EMULATE_ATOMIC_REFCOUNTS */
+#else
+# define ATOMIC_INC(count) (++count)
+# define ATOMIC_DEC_AND_TEST(res, count) (res = (--count == 0))
+#endif /* USE_THREADS */
+
#ifdef __GNUC__
-# define SvREFCNT_inc(sv) ({SV* nsv=(SV*)(sv); if(nsv) ++SvREFCNT(nsv); nsv;})
+# define SvREFCNT_inc(sv) \
+ ({ \
+ SV *nsv = (SV*)(sv); \
+ if (nsv) \
+ ATOMIC_INC(SvREFCNT(nsv)); \
+ nsv; \
+ })
#else
# if defined(CRIPPLED_CC) || defined(USE_THREADS)
# define SvREFCNT_inc(sv) sv_newref((SV*)sv)
# else
-# define SvREFCNT_inc(sv) ((Sv=(SV*)(sv)), (Sv && ++SvREFCNT(Sv)), (SV*)Sv)
+# define SvREFCNT_inc(sv) \
+ ((Sv=(SV*)(sv)), (Sv && ATOMIC_INC(SvREFCNT(Sv))), (SV*)Sv)
# endif
#endif
diff --git a/t/lib/anydbm.t b/t/lib/anydbm.t
index ce3003e5b7..3ab609cecc 100755
--- a/t/lib/anydbm.t
+++ b/t/lib/anydbm.t
@@ -12,15 +12,15 @@ use Fcntl;
print "1..12\n";
-unlink <Op.dbmx*>;
+unlink <Op_dbmx.*>;
umask(0);
-print (tie(%h,AnyDBM_File,'Op.dbmx', O_RDWR|O_CREAT, 0640)
+print (tie(%h,AnyDBM_File,'Op_dbmx', O_RDWR|O_CREAT, 0640)
? "ok 1\n" : "not ok 1\n");
-$Dfile = "Op.dbmx.pag";
+$Dfile = "Op_dbmx.pag";
if (! -e $Dfile) {
- ($Dfile) = <Op.dbmx*>;
+ ($Dfile) = <Op_dbmx.*>;
}
if ($^O eq 'amigaos' || $^O eq 'os2' || $^O eq 'MSWin32' || $^O eq 'dos') {
print "ok 2 # Skipped: different file permission semantics\n";
@@ -55,7 +55,7 @@ $h{'goner2'} = 'snork';
delete $h{'goner2'};
untie(%h);
-print (tie(%h,AnyDBM_File,'Op.dbmx', O_RDWR, 0640) ? "ok 4\n" : "not ok 4\n");
+print (tie(%h,AnyDBM_File,'Op_dbmx', O_RDWR, 0640) ? "ok 4\n" : "not ok 4\n");
$h{'j'} = 'J';
$h{'k'} = 'K';
@@ -118,4 +118,8 @@ print ($h{'foo'} eq '' ? "ok 11\n" : "not ok 11\n");
print ($h{''} eq 'bar' ? "ok 12\n" : "not ok 12\n");
untie %h;
-unlink 'Op.dbmx.dir', $Dfile;
+if ($^O eq 'VMS') {
+ unlink 'Op_dbmx.sdbm_dir', $Dfile;
+} else {
+ unlink 'Op_dbmx.dir', $Dfile;
+}
diff --git a/t/lib/sdbm.t b/t/lib/sdbm.t
index c2952ecf68..591fe14c60 100755
--- a/t/lib/sdbm.t
+++ b/t/lib/sdbm.t
@@ -6,7 +6,7 @@ BEGIN {
chdir 't' if -d 't';
@INC = '../lib';
require Config; import Config;
- if ($Config{'extensions'} !~ /\bSDBM_File\b/) {
+ if (($Config{'extensions'} !~ /\bSDBM_File\b/) && ($^O ne 'VMS')){
print "1..0\n";
exit 0;
}
@@ -17,15 +17,15 @@ use Fcntl;
print "1..18\n";
-unlink <Op.dbmx*>;
+unlink <Op_dbmx.*>;
umask(0);
-print (tie(%h,SDBM_File,'Op.dbmx', O_RDWR|O_CREAT, 0640)
+print (tie(%h,SDBM_File,'Op_dbmx', O_RDWR|O_CREAT, 0640)
? "ok 1\n" : "not ok 1\n");
-$Dfile = "Op.dbmx.pag";
+$Dfile = "Op_dbmx.pag";
if (! -e $Dfile) {
- ($Dfile) = <Op.dbmx*>;
+ ($Dfile) = <Op_dbmx.*>;
}
if ($^O eq 'amigaos' || $^O eq 'os2' || $^O eq 'MSWin32' || $^O eq 'dos') {
print "ok 2 # Skipped: different file permission semantics\n";
@@ -60,7 +60,7 @@ $h{'goner2'} = 'snork';
delete $h{'goner2'};
untie(%h);
-print (tie(%h,SDBM_File,'Op.dbmx', O_RDWR, 0640) ? "ok 4\n" : "not ok 4\n");
+print (tie(%h,SDBM_File,'Op_dbmx', O_RDWR, 0640) ? "ok 4\n" : "not ok 4\n");
$h{'j'} = 'J';
$h{'k'} = 'K';
@@ -123,7 +123,12 @@ print ($h{'foo'} eq '' ? "ok 11\n" : "not ok 11\n");
print ($h{''} eq 'bar' ? "ok 12\n" : "not ok 12\n");
untie %h;
-unlink 'Op.dbmx.dir', $Dfile;
+if ($^O eq 'VMS') {
+ unlink 'Op_dbmx.sdbm_dir', $Dfile;
+} else {
+ unlink 'Op_dbmx.dir', $Dfile;
+}
+
sub ok
{
@@ -187,7 +192,7 @@ EOM
my %h ;
my $X ;
eval '
- $X = tie(%h, "SubDB","dbhash.tmp", O_RDWR|O_CREAT, 0640 );
+ $X = tie(%h, "SubDB","dbhash_tmp", O_RDWR|O_CREAT, 0640 );
' ;
main::ok(14, $@ eq "") ;
@@ -202,6 +207,6 @@ EOM
undef $X;
untie(%h);
- unlink "SubDB.pm", <dbhash.tmp*> ;
+ unlink "SubDB.pm", <dbhash_tmp.*> ;
}
diff --git a/t/lib/thread.t b/t/lib/thread.t
index 9810ae48d9..b8e1b387ba 100644
--- a/t/lib/thread.t
+++ b/t/lib/thread.t
@@ -4,7 +4,7 @@ BEGIN {
chdir 't' if -d 't';
@INC = '../lib';
require Config; import Config;
- if ($Config{'ccflags'} !~ /USE_THREADS\b/) {
+ if (! $Config{'usethreads'}) {
print "1..0\n";
exit 0;
}
diff --git a/t/op/nothread.t b/t/op/nothread.t
index 7d42d276c8..a0d444d90b 100644
--- a/t/op/nothread.t
+++ b/t/op/nothread.t
@@ -9,7 +9,7 @@ BEGIN
@INC = "../lib";
require Config;
import Config;
- if ($Config{'ccflags'} =~ /USE_THREADS\b/)
+ if ($Config{'usethreads'})
{
print "1..0\n";
exit 0;
diff --git a/t/op/tiehandle.t b/t/op/tiehandle.t
new file mode 100755
index 0000000000..e3d24723a9
--- /dev/null
+++ b/t/op/tiehandle.t
@@ -0,0 +1,137 @@
+#!./perl
+
+BEGIN {
+ chdir 't' if -d 't';
+ @INC = '../lib';
+}
+
+my @expect;
+my $data = "";
+my @data = ();
+my $test = 1;
+
+sub ok { print "not " unless shift; print "ok ",$test++,"\n"; }
+
+package Implement;
+
+BEGIN { *ok = \*main::ok }
+
+sub compare {
+ return unless @expect;
+ return ok(0) unless(@_ == @expect);
+
+ my $i;
+ for($i = 0 ; $i < @_ ; $i++) {
+ next if $_[$i] eq $expect[$i];
+ return ok(0);
+ }
+
+ ok(1);
+}
+
+sub TIEHANDLE {
+ compare(TIEHANDLE => @_);
+ my ($class,@val) = @_;
+ return bless \@val,$class;
+}
+
+sub PRINT {
+ compare(PRINT => @_);
+ 1;
+}
+
+sub PRINTF {
+ compare(PRINTF => @_);
+ 2;
+}
+
+sub READLINE {
+ compare(READLINE => @_);
+ wantarray ? @data : shift @data;
+}
+
+sub GETC {
+ compare(GETC => @_);
+ substr($data,0,1);
+}
+
+sub READ {
+ compare(READ => @_);
+ substr($_[1],$_[3] || 0) = substr($data,0,$_[2]);
+ 3;
+}
+
+sub WRITE {
+ compare(WRITE => @_);
+ $data = substr($_[1],$_[3] || 0, $_[2]);
+ 4;
+}
+
+sub CLOSE {
+ compare(CLOSE => @_);
+
+ 5;
+}
+
+package main;
+
+use Symbol;
+
+print "1..23\n";
+
+my $fh = gensym;
+
+@expect = (TIEHANDLE => 'Implement');
+my $ob = tie *$fh,'Implement';
+ok(ref($ob) eq 'Implement');
+ok(tied(*$fh) == $ob);
+
+@expect = (PRINT => $ob,"some","text");
+$r = print $fh @expect[2,3];
+ok($r == 1);
+
+@expect = (PRINTF => $ob,"%s","text");
+$r = printf $fh @expect[2,3];
+ok($r == 2);
+
+$text = (@data = ("the line\n"))[0];
+@expect = (READLINE => $ob);
+$ln = <$fh>;
+ok($ln eq $text);
+
+@expect = ();
+@in = @data = qw(a line at a time);
+@line = <$fh>;
+@expect = @in;
+Implement::compare(@line);
+
+@expect = (GETC => $ob);
+$data = "abc";
+$ch = getc $fh;
+ok($ch eq "a");
+
+$buf = "xyz";
+@expect = (READ => $ob, $buf, 3);
+$data = "abc";
+$r = read $fh,$buf,3;
+ok($r == 3);
+ok($buf eq "abc");
+
+
+$buf = "xyzasd";
+@expect = (READ => $ob, $buf, 3,3);
+$data = "abc";
+$r = sysread $fh,$buf,3,3;
+ok($r == 3);
+ok($buf eq "xyzabc");
+
+$buf = "qwerty";
+@expect = (WRITE => $ob, $buf, 4,1);
+$data = "";
+$r = syswrite $fh,$buf,4,1;
+ok($r == 4);
+ok($data eq "wert");
+
+@expect = (CLOSE => $ob);
+$r = close $fh;
+ok($r == 5);
diff --git a/thread.h b/thread.h
index 66176a8dfc..2c6e192a7f 100644
--- a/thread.h
+++ b/thread.h
@@ -4,6 +4,7 @@
# include <win32thread.h>
#else
+#ifndef DJGPP
/* POSIXish threads */
#ifdef OLD_PTHREADS_API
# define pthread_mutexattr_init(a) pthread_mutexattr_create(a)
@@ -22,6 +23,7 @@
# define pthread_condattr_default NULL
#endif /* OLD_PTHREADS_API */
#endif
+#endif
#ifdef PTHREADS_CREATED_JOINABLE
# define ATTR_JOINABLE PTHREAD_CREATE_JOINABLE
diff --git a/toke.c b/toke.c
index 348e254b0f..a3486951b8 100644
--- a/toke.c
+++ b/toke.c
@@ -468,15 +468,7 @@ uni(I32 f, char *s)
#define LOP(f,x) return lop(f,x,s)
STATIC I32
-lop
-#ifdef CAN_PROTOTYPE
- (I32 f, expectation x, char *s)
-#else
- (f,x,s)
-I32 f;
-expectation x;
-char *s;
-#endif /* CAN_PROTOTYPE */
+lop(I32 f, expectation x, char *s)
{
dTHR;
yylval.ival = f;
diff --git a/util.c b/util.c
index f8adc8f5d0..9980461456 100644
--- a/util.c
+++ b/util.c
@@ -1707,12 +1707,7 @@ char *args;
#ifdef MYSWAP
#if BYTEORDER != 0x4321
short
-#ifndef CAN_PROTOTYPE
-my_swap(s)
-short s;
-#else
my_swap(short s)
-#endif
{
#if (BYTEORDER & 1) == 0
short result;
@@ -1725,12 +1720,7 @@ my_swap(short s)
}
long
-#ifndef CAN_PROTOTYPE
-my_htonl(l)
-register long l;
-#else
my_htonl(long l)
-#endif
{
union {
long result;
@@ -1759,12 +1749,7 @@ my_htonl(long l)
}
long
-#ifndef CAN_PROTOTYPE
-my_ntohl(l)
-register long l;
-#else
my_ntohl(long l)
-#endif
{
union {
long l;
@@ -1870,14 +1855,14 @@ my_popen(char *cmd, char *mode)
return my_syspopen(cmd,mode);
}
#endif
- if (PerlProc_pipe(p) < 0)
- return Nullfp;
This = (*mode == 'w');
that = !This;
if (doexec && tainting) {
taint_env();
taint_proper("Insecure %s%s", "EXEC");
}
+ if (PerlProc_pipe(p) < 0)
+ return Nullfp;
while ((pid = (doexec?vfork():fork())) < 0) {
if (errno != EAGAIN) {
PerlLIO_close(p[This]);
diff --git a/vms/descrip.mms b/vms/descrip.mms
index adbcb1cc75..5f055091b0 100644
--- a/vms/descrip.mms
+++ b/vms/descrip.mms
@@ -74,7 +74,7 @@ OBJVAL = $(MMS$TARGET_NAME)$(O)
.endif
# Updated by fndvers.com -- do not edit by hand
-PERL_VERSION = 5_00456#
+PERL_VERSION = 5_00460#
.ifdef DECC_SOCKETS
SOCKET=1
@@ -345,7 +345,7 @@ all : base extras x2p archcorefiles preplibrary perlpods
.endif
base : miniperl perl
@ $(NOOP)
-extras : Fcntl IO Opcode attrs $(POSIX) $(THREAD) libmods utils podxform
+extras : Fcntl IO Opcode attrs $(POSIX) $(THREAD) SDBM_File libmods utils podxform
@ $(NOOP)
libmods : $(LIBPREREQ)
@ $(NOOP)
@@ -556,6 +556,26 @@ THREAD : [.lib]THREAD.pm [.lib.auto.THREAD]THREAD$(E)
[.ext.THREAD]Descrip.MMS : [.ext.THREAD]Makefile.PL $(LIBPREREQ) $(DBG)perlshr$(E)
$(MINIPERL) "-I[--.lib]" -e "chdir('[.ext.THREAD]') or die $!; do 'Makefile.PL'; print ${@} if ${@};" "INST_LIB=[--.lib]" "INST_ARCHLIB=[--.lib]"
+SDBM_File : [.lib]SDBM_File.pm [.lib.auto.SDBM_File]SDBM_File$(E)
+ @ $(NOOP)
+
+[.lib]SDBM_File.pm : [.ext.SDBM_File]Descrip.MMS
+ @ If F$Search("[.lib]auto.dir").eqs."" Then Create/Directory [.lib.auto]
+ @ If F$Search("[.lib.auto]sdbm.dir").eqs."" Then Create/Directory [.lib.auto.sdbm]
+ @ Set Default [.ext.SDBM_File]
+ $(MMS)
+ @ Set Default [--]
+
+[.lib.auto.SDBM_File]SDBM_File$(E) : [.ext.SDBM_File]Descrip.MMS
+ @ Set Default [.ext.SDBM_File]
+ $(MMS)
+ @ Set Default [--]
+
+# Add "-I[--.lib]" t $(MINIPERL) so we use this copy of lib after C<chdir>
+# ${@} necessary to distract different versions of MM[SK]/make
+[.ext.SDBM_File]Descrip.MMS : [.ext.SDBM_File]Makefile.PL $(LIBPREREQ) $(DBG)perlshr$(E)
+ $(MINIPERL) "-I[--.lib]" -e "chdir('[.ext.SDBM_File]') or die $!; do 'Makefile.PL'; print ${@} if ${@};" "INST_LIB=[--.lib]" "INST_ARCHLIB=[--.lib]"
+
IO : [.lib]IO.pm [.lib.IO]File.pm [.lib.IO]Handle.pm [.lib.IO]Pipe.pm [.lib.IO]Seekable.pm [.lib.IO]Socket.pm [.lib.auto.IO]IO$(E)
@ $(NOOP)
@@ -1172,6 +1192,9 @@ clean : tidy
- $(MMS) clean
Set Default [--]
.endif
+ Set Default [.ext.SDBM_File]
+ - $(MMS) clean
+ Set Default [--]
- If F$Search("*.Opt").nes."" Then Delete/NoConfirm/Log *.Opt;*/Exclude=PerlShr_*.Opt
- If F$Search("[...]*$(O);*") .nes."" Then Delete/NoConfirm/Log [...]*$(O);*
- If F$Search("Config.H").nes."" Then Delete/NoConfirm/Log Config.H;*
@@ -1215,6 +1238,9 @@ realclean : clean
- $(MMS) realclean
Set Default [--]
.endif
+ Set Default [.ext.SDBM_File]
+ - $(MMS) realclean
+ Set Default [--]
- If F$Search("*$(OLB)").nes."" Then Delete/NoConfirm/Log *$(OLB);*
- If F$Search("*.Opt").nes."" Then Delete/NoConfirm/Log *.Opt;*
- $(MINIPERL) -e "use File::Path; rmtree(['lib/auto','lib/VMS','lib/$(ARCH)'],1,0);"
diff --git a/vms/perlvms.pod b/vms/perlvms.pod
index c599e5834c..4aa68008d5 100644
--- a/vms/perlvms.pod
+++ b/vms/perlvms.pod
@@ -329,7 +329,12 @@ undefined behavior (rarely, we hope):
getgrnam, setgrent, endgrent, ioctl, link, lstat,
msgctl, msgget, msgsend, msgrcv, readlink, semctl,
semget, semop, setpgrp, setpriority, shmctl, shmget,
- shmread, shmwrite, socketpair, symlink, syscall, truncate
+ shmread, shmwrite, socketpair, symlink, syscall
+
+The following functions are available on Perls compiled with Dec C 5.2 or
+greater and running VMS 7.0 or greater
+
+ truncate
The following functions may or may not be implemented,
depending on what type of socket support you've built into
@@ -749,12 +754,23 @@ it's equivalent to calling fflush() and fsync() from C.
=back
+=head1 Standard modules with VMS-specific differences
+
+=head2 SDBM_File
+
+SDBM_File works peroperly on VMS. It has, however, one minor
+difference. The database directory file created has a L<.sdbm_dir>
+extension rather than a L<.dir> extension. L<.dir> files are VMS filesystem
+directory files, and using them for other purposes could cause unacceptable
+problems.
+
=head1 Revision date
-This document was last updated on 28-Feb-1996, for Perl 5,
-patchlevel 2.
+This document was last updated on 26-Feb-1998, for Perl 5,
+patchlevel 5.
=head1 AUTHOR
-Charles Bailey bailey@genetics.upenn.edu
+Charles Bailey bailey@cor.newman.upenn.edu
+Last revision by Dan Sugalski sugalskd@ous.edu
diff --git a/vms/test.com b/vms/test.com
index 201b5f57d6..7786a17e1b 100644
--- a/vms/test.com
+++ b/vms/test.com
@@ -91,10 +91,9 @@ use Config;
@compexcl=('cpp.t');
@ioexcl=('argv.t','dup.t','fs.t','inplace.t','pipe.t');
-@libexcl=('anydbm.t','db-btree.t','db-hash.t','db-recno.t',
+@libexcl=('db-btree.t','db-hash.t','db-recno.t',
'gdbm.t','io_dup.t', 'io_pipe.t', 'io_sel.t', 'io_sock.t',
- 'ndbm.t','odbm.t','open2.t','open3.t','posix.t',
- 'sdbm.t');
+ 'ndbm.t','odbm.t','open2.t','open3.t','posix.t');
# Note: POSIX is not part of basic build, but can be built
# separately if you're using DECC
diff --git a/win32/Makefile b/win32/Makefile
index 5da435915d..9431745331 100644
--- a/win32/Makefile
+++ b/win32/Makefile
@@ -14,7 +14,7 @@ INST_TOP=$(INST_DRV)\perl5004.5x
#
# uncomment to enable threads-capabilities
-#USE_THREADS=-DUSE_THREADS
+#USE_THREADS=define
#
# uncomment next line if you are using Visual C++ 2.x
@@ -39,6 +39,13 @@ INST_TOP=$(INST_DRV)\perl5004.5x
#CRYPT_LIB=des_fcrypt.lib
#
+# set this if you wish to use perl's malloc
+# WARNING: Turning this on/off WILL break binary compatibility with extensions
+# you may have compiled with/without it. Be prepared to recompile all extensions
+# if you change the default.
+PERL_MALLOC *= define
+
+#
# set the install locations of the compiler include/libraries
#CCHOME = f:\msvc20
CCHOME = $(MSVCDIR)
@@ -59,19 +66,26 @@ D_CRYPT=define
CRYPT_FLAG=-DHAVE_DES_FCRYPT
!ENDIF
-BUILDOPT = $(USE_THREADS)
-#BUILDOPT = $(USE_THREADS) -DMULTIPLICITY
-#BUILDOPT = $(USE_THREADS) -DPERL_GLOBAL_STRUCT -DMULTIPLICITY
+!IF "$(PERL_MALLOC)" == ""
+PERL_MALLOC = undef
+!ENDIF
+
+#BUILDOPT = -DMULTIPLICITY
+#BUILDOPT = -DPERL_GLOBAL_STRUCT -DMULTIPLICITY
# -DUSE_PERLIO -D__STDC__=1 -DUSE_SFIO -DI_SFIO -I\sfio97\include
+!IF "$(USE_THREADS)" == ""
+USE_THREADS = undef
+!ENDIF
+
!IF "$(PROCESSOR_ARCHITECTURE)" == ""
PROCESSOR_ARCHITECTURE = x86
!ENDIF
-!IF "$(USE_THREADS)" == ""
-ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)
-!ELSE
+!IF "$(USE_THREADS)" == "define"
ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-thread
+!ELSE
+ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)
!ENDIF
ARCHDIR = ..\lib\$(ARCHNAME)
@@ -142,7 +156,7 @@ DMYMALLOC = define
!IF "$(OBJECTDEF)" == "-DPERL_OBJECT"
MINI_SRC =
!ELSE
-MINI_SRC = ..\perlio.c ..\malloc.c
+MINI_SRC = ..\perlio.c
!ENDIF
LINK_FLAGS = -nologo $(LINK_DBG) -machine:$(PROCESSOR_ARCHITECTURE)
OBJOUT_FLAG = -Fo
@@ -214,8 +228,13 @@ NULL=
CRYPT_OBJ=$(CRYPT_SRC:.c=.obj)
!ENDIF
+!IF "$(PERL_MALLOC)" == "define"
+MALLOC_SRC = ..\malloc.c
+MALLOC_OBJ = ..\malloc$(o)
+!ENDIF
+
!IF "$(MINI_SRC)" != ""
-MINI_OBJ=..\perlio$(o) ..\malloc$(o)
+MINI_OBJ=..\perlio$(o)
!ENDIF
#
@@ -224,6 +243,7 @@ MINI_OBJ=..\perlio$(o) ..\malloc$(o)
XSUBPP=..\$(MINIPERLEXE) -I..\..\lib ..\$(EXTUTILSDIR)\xsubpp -C++ -prototypes
CORE_C= ..\av.c \
+ ..\byterun.c \
..\deb.c \
..\doio.c \
..\doop.c \
@@ -248,10 +268,12 @@ CORE_C= ..\av.c \
..\toke.c \
..\universal.c \
..\util.c \
- $(MINI_SRC) \
+ $(MALLOC_SRC) \
+ $(MINI_SRC) \
$(CRYPT_SRC)
CORE_OBJ= ..\av$(o) \
+ ..\byterun$(o) \
..\deb$(o) \
..\doio$(o) \
..\doop$(o) \
@@ -276,7 +298,8 @@ CORE_OBJ= ..\av$(o) \
..\toke$(o) \
..\universal$(o)\
..\util$(o) \
- $(MINI_OBJ) \
+ $(MALLOC_OBJ) \
+ $(MINI_OBJ) \
$(CRYPT_OBJ)
WIN32_C = perllib.c \
@@ -311,6 +334,8 @@ X2P_OBJ = ..\x2p\a2p$(o) \
..\x2p\walk$(o)
CORE_H = ..\av.h \
+ ..\byterun.h \
+ ..\bytecode.h \
..\cop.h \
..\cv.h \
..\dosish.h \
@@ -385,6 +410,24 @@ POD2MAN=$(PODDIR)\pod2man
POD2LATEX=$(PODDIR)\pod2latex
POD2TEXT=$(PODDIR)\pod2text
+CFG_VARS= "INST_DRV=$(INST_DRV)" \
+ "INST_TOP=$(INST_TOP)" \
+ "archname=$(ARCHNAME)" \
+ "cc=$(CC)" \
+ "ccflags=$(OPTIMIZE) $(DEFINES)" \
+ "cf_email=$(EMAIL)" \
+ "d_crypt=$(D_CRYPT)" \
+ "d_mymalloc=$(PERL_MALLOC)" \
+ "libs=$(LIBFILES)" \
+ "incpath=$(CCINCDIR)" \
+ "libpth=$(CCLIBDIR)" \
+ "libc=$(LIBC)" \
+ "static_ext=$(STATIC_EXT)" \
+ "dynamic_ext=$(DYNAMIC_EXT)" \
+ "usethreads=$(USE_THREADS)" \
+ "LINK_FLAGS=$(LINK_FLAGS)" \
+ "optimize=$(OPTIMIZE)"
+
#
# Top targets
#
@@ -413,25 +456,7 @@ config.w32 : $(CFGSH_TMPL)
copy $(CFGH_TMPL) config.h
..\config.sh : config.w32 $(MINIPERL) config_sh.PL
- $(MINIPERLEXE) -I..\lib config_sh.PL \
- "INST_DRV=$(INST_DRV)" \
- "INST_TOP=$(INST_TOP)" \
- "archname=$(ARCHNAME)" \
- "cc=$(CC)" \
- "ccflags=$(OPTIMIZE) $(DEFINES) $(OBJECT)"\
- "cf_email=$(EMAIL)" \
- "d_crypt=$(D_CRYPT)" \
- "libs=$(LIBFILES)" \
- "incpath=$(CCINCDIR)" \
- "libpth=$(CCLIBDIR)" \
- "libc=$(LIBC)" \
- "static_ext=$(STATIC_EXT)" \
- "dynamic_ext=$(DYNAMIC_EXT)" \
- "LINK_FLAGS=$(LINK_FLAGS)" \
- "optimize=$(OPTIMIZE)" \
- "libperl=$(PERLIMPLIB)" \
- "d_mymalloc=$(DMYMALLOC)" \
- config.w32 > ..\config.sh
+ $(MINIPERL) -I..\lib config_sh.PL $(CFG_VARS) config.w32 > ..\config.sh
$(CONFIGPM) : $(MINIPERL) ..\config.sh config_h.PL ..\minimod.pl
cd .. && miniperl configpm
diff --git a/win32/bin/search.pl b/win32/bin/search.pl
index b63f7353af..ad74001be5 100644
--- a/win32/bin/search.pl
+++ b/win32/bin/search.pl
@@ -71,6 +71,7 @@ sub init
{
## initialize variables that might be reset by command-line args
$DOREP=0; ## set true by -dorep (redo multi-hardlink files)
+ $DOREP=1 if $^O eq 'MSWin32';
$DO_SORT=0; ## set by -sort (sort files in a dir before checking)
$FIND_ONLY=0; ## set by -find (don't search files)
$LIST_ONLY=0; ## set true by -l (list filenames only)
@@ -867,7 +868,7 @@ sub dodir
}
## skip things that are empty
- unless (-s _) {
+ unless (-s _ || -d _) {
warn qq/skip (empty): $file\n/ if $WHY;
next;
}
@@ -894,7 +895,7 @@ sub dodir
}
## _never_ redo a directory
- if (defined $dir_done{$id}) {
+ if (defined $dir_done{$id} and $^O ne 'MSWin32') {
warn qq/skip (did as "$dir_done{$id}"): $file\n/ if $WHY;
next;
}
diff --git a/win32/config.bc b/win32/config.bc
index 5c6fb264e9..de7a337a33 100644
--- a/win32/config.bc
+++ b/win32/config.bc
@@ -23,7 +23,6 @@ prefix='~INST_DRV~'
privlibexp='~INST_TOP~\lib'
sharpbang='#!'
shsharp='true'
-sig_name='ZERO HUP INT QUIT ILL TRAP ABRT EMT FPE KILL BUS SEGV SYS PIPE ALRM TERM USR1 USR2 CHLD PWR WINCH URG IO STOP TSTP CONT TTIN TTOU VTALRM PROF XCPU XFSZ WAITING LWP FREEZE THAW RTMIN NUM37 NUM38 NUM39 NUM40 NUM41 NUM42 RTMAX IOT CLD POLL'
so='dll'
startsh='#!/bin/sh'
static_ext='DynaLoader'
@@ -435,6 +434,7 @@ perladmin=''
perlpath='~INST_TOP~\bin\perl.exe'
pg=''
phostname='hostname'
+pidtype='int'
plibpth=''
pmake=''
pr=''
@@ -457,7 +457,9 @@ shar=''
shmattype='void *'
shortsize='2'
shrpdir='none'
-sig_num='0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 6 18 22'
+sig_name='ZERO INT ILL FPE SEGV TERM USR1 USR2 USR3 BREAK ABRT'
+sig_name_init='"ZERO", "INT", "ILL", "FPE", "SEGV", "TERM", "USR1", "USR2", "USR3", "BREAK", "ABRT", 0'
+sig_num='0, 2, 4, 8, 11, 15, 16, 17, 20, 21, 22, 0'
signal_t='void'
sitearch='~INST_TOP~\lib\site\~archname~'
sitearchexp='~INST_TOP~\lib\site\~archname~'
@@ -501,6 +503,7 @@ usenm='false'
useperlio='undef'
useposix='true'
usesafe='true'
+usethreads='undef'
usevfork='false'
usrinc='/usr/include'
uuname=''
diff --git a/win32/config.gc b/win32/config.gc
index e0617be2ab..310586f432 100644
--- a/win32/config.gc
+++ b/win32/config.gc
@@ -23,7 +23,6 @@ prefix='~INST_DRV~'
privlibexp='~INST_TOP~\lib'
sharpbang='#!'
shsharp='true'
-sig_name='ZERO HUP INT QUIT ILL TRAP ABRT EMT FPE KILL BUS SEGV SYS PIPE ALRM TERM USR1 USR2 CHLD PWR WINCH URG IO STOP TSTP CONT TTIN TTOU VTALRM PROF XCPU XFSZ WAITING LWP FREEZE THAW RTMIN NUM37 NUM38 NUM39 NUM40 NUM41 NUM42 RTMAX IOT CLD POLL'
so='dll'
startsh='#!/bin/sh'
static_ext='DynaLoader'
@@ -435,6 +434,7 @@ perladmin=''
perlpath='~INST_TOP~\bin\perl.exe'
pg=''
phostname='hostname'
+pidtype='int'
plibpth=''
pmake=''
pr=''
@@ -457,7 +457,9 @@ shar=''
shmattype='void *'
shortsize='2'
shrpdir='none'
-sig_num='0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 6 18 22'
+sig_name='ZERO INT ILL FPE SEGV TERM BREAK ABRT'
+sig_name_init='"ZERO", "INT", "ILL", "FPE", "SEGV", "TERM", "BREAK", "ABRT", 0'
+sig_num='0, 2, 4, 8, 11, 15, 21, 22, 0'
signal_t='void'
sitearch='~INST_TOP~\lib\site\~archname~'
sitearchexp='~INST_TOP~\lib\site\~archname~'
@@ -501,6 +503,7 @@ usenm='false'
useperlio='undef'
useposix='true'
usesafe='true'
+usethreads='undef'
usevfork='false'
usrinc='/usr/include'
uuname=''
diff --git a/win32/config.vc b/win32/config.vc
index a7abb31854..486794d248 100644
--- a/win32/config.vc
+++ b/win32/config.vc
@@ -23,7 +23,6 @@ prefix='~INST_DRV~'
privlibexp='~INST_TOP~\lib'
sharpbang='#!'
shsharp='true'
-sig_name='ZERO HUP INT QUIT ILL TRAP ABRT EMT FPE KILL BUS SEGV SYS PIPE ALRM TERM USR1 USR2 CHLD PWR WINCH URG IO STOP TSTP CONT TTIN TTOU VTALRM PROF XCPU XFSZ WAITING LWP FREEZE THAW RTMIN NUM37 NUM38 NUM39 NUM40 NUM41 NUM42 RTMAX IOT CLD POLL'
so='dll'
startsh='#!/bin/sh'
static_ext='DynaLoader'
@@ -435,6 +434,7 @@ perladmin=''
perlpath='~INST_TOP~\bin\perl.exe'
pg=''
phostname='hostname'
+pidtype='int'
plibpth=''
pmake=''
pr=''
@@ -457,7 +457,9 @@ shar=''
shmattype='void *'
shortsize='2'
shrpdir='none'
-sig_num='0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 6 18 22'
+sig_name='ZERO INT ILL FPE SEGV TERM BREAK ABRT'
+sig_name_init='"ZERO", "INT", "ILL", "FPE", "SEGV", "TERM", "BREAK", "ABRT", 0'
+sig_num='0, 2, 4, 8, 11, 15, 21, 22, 0'
signal_t='void'
sitearch='~INST_TOP~\lib\site\~archname~'
sitearchexp='~INST_TOP~\lib\site\~archname~'
@@ -501,6 +503,7 @@ usenm='false'
useperlio='undef'
useposix='true'
usesafe='true'
+usethreads='undef'
usevfork='false'
usrinc='/usr/include'
uuname=''
diff --git a/win32/config_H.bc b/win32/config_H.bc
index b64d604d22..b8f52a020c 100644
--- a/win32/config_H.bc
+++ b/win32/config_H.bc
@@ -7,47 +7,24 @@
* that running config_h.SH again will wipe out any changes you've made.
* For a more permanent change edit config.sh and rerun config_h.SH.
*
- * $Id: Config_h.U,v 3.0.1.4 1995/09/25 09:10:49 ram Exp $
+ * $Id: Config_h.U,v 3.0.1.5 1997/02/28 14:57:43 ram Exp $
*/
-/* Configuration time: undef
- * Configured by: nick
- * Target system:
+/*
+ * Package name : perl5
+ * Source directory : undef
+ * Configuration time: undef
+ * Configured by : gsar
+ * Target system :
*/
#ifndef _config_h_
#define _config_h_
-/* MEM_ALIGNBYTES:
- * This symbol contains the number of bytes required to align a
- * double. Usual values are 2, 4 and 8.
- * On NeXT starting with 3.2, you can build "Fat" Multiple Architecture
- * Binaries (MAB) for targets with varying alignment. This only matters
- * for perl, where the config.h can be generated and installed on one
- * system, and used by a different architecture to build an extension.
- * The default is eight, for safety.
- */
-#ifndef NeXT
-#define MEM_ALIGNBYTES 8 /**/
-#else /* NeXT */
-#ifdef __m68k__
-#define MEM_ALIGNBYTES 2
-#else
-#ifdef __i386__
-#define MEM_ALIGNBYTES 4
-#else /* __hppa__, __sparc__ and default for unknown architectures */
-#define MEM_ALIGNBYTES 8
-#endif /* __i386__ */
-#endif /* __m68k__ */
-#endif /* NeXT */
-
-/* ARCHNAME:
- * This symbol holds a string representing the architecture name.
- * It may be used to construct an architecture-dependant pathname
- * where library files may be held under a private library, for
- * instance.
+/* LOC_SED:
+ * This symbol holds the complete pathname to the sed program.
*/
-#define ARCHNAME "MSWin32-x86" /**/
+#define LOC_SED "" /**/
/* BIN:
* This symbol holds the path of the bin directory where the package will
@@ -57,38 +34,8 @@
* This symbol is the filename expanded version of the BIN symbol, for
* programs that do not want to deal with that at run-time.
*/
-#define BIN "c:\\perl\\bin" /**/
-#define BIN_EXP "c:\\perl\\bin" /**/
-
-/* CAT2:
- * This macro catenates 2 tokens together.
- */
-/* STRINGIFY:
- * This macro surrounds its token with double quotes.
- */
-#if 42 == 1
-#define CAT2(a,b)a/**/b
-#define CAT3(a,b,c)a/**/b/**/c
-#define CAT4(a,b,c,d)a/**/b/**/c/**/d
-#define CAT5(a,b,c,d,e)a/**/b/**/c/**/d/**/e
-#define STRINGIFY(a)"a"
- /* If you can get stringification with catify, tell me how! */
-#endif
-#if 42 == 42
-#define CAT2(a,b)a ## b
-#define CAT3(a,b,c)a ## b ## c
-#define CAT4(a,b,c,d)a ## b ## c ## d
-#define CAT5(a,b,c,d,e)a ## b ## c ## d ## e
-#define StGiFy(a)# a
-#define STRINGIFY(a)StGiFy(a)
-#define SCAT2(a,b)StGiFy(a) StGiFy(b)
-#define SCAT3(a,b,c)StGiFy(a) StGiFy(b) StGiFy(c)
-#define SCAT4(a,b,c,d)StGiFy(a) StGiFy(b) StGiFy(c) StGiFy(d)
-#define SCAT5(a,b,c,d,e)StGiFy(a) StGiFy(b) StGiFy(c) StGiFy(d) StGiFy(e)
-#endif
-#ifndef CAT2
-#include "Bletch: How does this C preprocessor catenate tokens?"
-#endif
+#define BIN "c:\\perl5004.5x\\bin" /**/
+#define BIN_EXP "c:\\perl5004.5x\\bin" /**/
/* CPPSTDIN:
* This symbol contains the first part of the string which will invoke
@@ -138,27 +85,6 @@
*/
/*#define HAS_BZERO /**/
-/* CASTI32:
- * This symbol is defined if the C compiler can cast negative
- * or large floating point numbers to 32-bit ints.
- */
-#define CASTI32 /**/
-
-/* CASTNEGFLOAT:
- * This symbol is defined if the C compiler can cast negative
- * numbers to unsigned longs, ints and shorts.
- */
-/* CASTFLAGS:
- * This symbol contains flags that say what 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
- */
-#define CASTNEGFLOAT /**/
-#define CASTFLAGS 0 /**/
-
/* HAS_CHOWN:
* This symbol, if defined, indicates that the chown routine is
* available.
@@ -177,12 +103,6 @@
*/
#define HAS_CHSIZE /**/
-/* VOID_CLOSEDIR:
- * This symbol, if defined, indicates that the closedir() routine
- * does not return a value.
- */
-/*#define VOID_CLOSEDIR /**/
-
/* HASCONST:
* This symbol, if defined, indicates that this C compiler knows about
* the const type. There is no need to actually test for that symbol
@@ -227,6 +147,26 @@
*/
#define HAS_DLERROR /**/
+/* SETUID_SCRIPTS_ARE_SECURE_NOW:
+ * This symbol, if defined, indicates that the bug that prevents
+ * setuid scripts from being secure is not present in this kernel.
+ */
+/* DOSUID:
+ * This symbol, if defined, indicates that the C program should
+ * check the script that it is executing for setuid/setgid bits, and
+ * attempt to emulate setuid/setgid on systems that have disabled
+ * setuid #! scripts because the kernel can't do it securely.
+ * It is up to the package designer to make sure that this emulation
+ * is done securely. Among other things, it should do an fstat on
+ * the script it just opened to make sure it really is a setuid/setgid
+ * script, it should make sure the arguments passed correspond exactly
+ * to the argument on the #! line, and it should not trust any
+ * subprocesses to which it must pass the filename rather than the
+ * file descriptor of the script to be executed.
+ */
+/*#define SETUID_SCRIPTS_ARE_SECURE_NOW /**/
+/*#define DOSUID /**/
+
/* HAS_DUP2:
* This symbol, if defined, indicates that the dup2 routine is
* available to duplicate file descriptors.
@@ -297,13 +237,7 @@
* available to get the list of process groups. If unavailable, multiple
* groups are probably not supported.
*/
-/* HAS_SETGROUPS:
- * This symbol, if defined, indicates that the setgroups() routine is
- * available to set the list of process groups. If unavailable, multiple
- * groups are probably not supported.
- */
/*#define HAS_GETGROUPS /**/
-/*#define HAS_SETGROUPS /**/
/* HAS_GETHOSTENT:
* This symbol, if defined, indicates that the gethostent routine is
@@ -311,81 +245,6 @@
*/
/*#define HAS_GETHOSTENT /**/
-/* HAS_GETHOSTBYADDR:
- * This symbol, if defined, indicates that the gethostbyaddr routine is
- * available to lookup hosts by their IP addresses.
- */
-#define HAS_GETHOSTBYADDR /**/
-
-/* Netdb_host_t:
- * This symbol holds the type used for the 1st argument
- * to gethostbyaddr().
- */
-#define Netdb_host_t char *
-
-/* Netdb_hlen_t:
- * This symbol holds the type used for the 2nd argument
- * to gethostbyaddr().
- */
-#define Netdb_hlen_t int
-
-/* HAS_GETHOSTBYNAME:
- * This symbol, if defined, indicates that the gethostbyname routine is
- * available to lookup hosts by their DNS names.
- */
-#define HAS_GETHOSTBYNAME /**/
-
-/* Netdb_name_t:
- * This symbol holds the type used for the 1st argument
- * to gethostbyname(), the 1st argument to getnetbyname(),
- * the 1st argument to getprotobyname(), the 1st argument to
- * getservbyname(), the 2nd argument to getservbyname(),
- * and the 2nd argument to getservbyport().
- */
-#define Netdb_name_t char *
-
-/* HAS_GETNETBYADDR:
- * This symbol, if defined, indicates that the getnetbyaddr routine is
- * available to lookup networks by their IP addresses.
- */
-/*#define HAS_GETNETBYADDR /**/
-
-/* Netdb_net_t:
- * This symbol holds the type used for the 1st argument
- * to getnetbyaddr().
- */
-#define Netdb_net_t long
-
-/* HAS_GETNETBYNAME:
- * This symbol, if defined, indicates that the getnetbyname routine is
- * available to lookup networks by their names.
- */
-/*#define HAS_GETNETBYNAME /**/
-
-/* HAS_GETPROTOBYNAME:
- * This symbol, if defined, indicates that the getprotobyname routine is
- * available to lookup protocols by their names.
- */
-#define HAS_GETPROTOBYNAME /**/
-
-/* HAS_GETPROTOBYNUMBER:
- * This symbol, if defined, indicates that the getprotobynumber routine is
- * available to lookup protocols by their numbers.
- */
-#define HAS_GETPROTOBYNUMBER /**/
-
-/* HAS_GETSERVBYNAME:
- * This symbol, if defined, indicates that the getservbyname routine is
- * available to lookup services by their names.
- */
-#define HAS_GETSERVBYNAME /**/
-
-/* HAS_GETSERVBYPORT:
- * This symbol, if defined, indicates that the getservbyport routine is
- * available to lookup services by their ports.
- */
-#define HAS_GETSERVBYPORT /**/
-
/* HAS_UNAME:
* This symbol, if defined, indicates that the C program may use the
* uname() routine to derive the host name. See also HAS_GETHOSTNAME
@@ -399,6 +258,24 @@
*/
#define HAS_GETLOGIN /**/
+/* HAS_GETPGID:
+ * This symbol, if defined, indicates to the C program that
+ * the getpgid(pid) function is available to get the
+ * process group id.
+ */
+/*#define HAS_GETPGID /**/
+
+/* HAS_GETPGRP:
+ * This symbol, if defined, indicates that the getpgrp routine is
+ * available to get the current process group.
+ */
+/* USE_BSD_GETPGRP:
+ * This symbol, if defined, indicates that getpgrp needs one
+ * arguments whereas USG one needs none.
+ */
+/*#define HAS_GETPGRP /**/
+/*#define USE_BSD_GETPGRP /**/
+
/* HAS_GETPGRP2:
* This symbol, if defined, indicates that the getpgrp2() (as in DG/UX)
* routine is available to get the current process group.
@@ -442,11 +319,12 @@
#define HAS_NTOHL /**/
#define HAS_NTOHS /**/
-/* HAS_ISASCII:
- * This manifest constant lets the C program know that isascii
- * is available.
+/* HAS_INET_ATON:
+ * This symbol, if defined, indicates to the C program that the
+ * inet_aton() function is available to parse IP address "dotted-quad"
+ * strings.
*/
-#define HAS_ISASCII /**/
+/*#define HAS_INET_ATON /**/
/* HAS_KILLPG:
* This symbol, if defined, indicates that the killpg routine is available
@@ -556,12 +434,6 @@
*/
/*#define HAS_NICE /**/
-/* HAS_OPEN3:
- * This manifest constant lets the C program know that the three
- * argument form of open(2) is available.
- */
-/*#define HAS_OPEN3 /**/
-
/* HAS_PATHCONF:
* This symbol, if defined, indicates that pathconf() is available
* to determine file-system related limits and options associated
@@ -589,16 +461,11 @@
/* HAS_POLL:
* This symbol, if defined, indicates that the poll routine is
- * available to poll active file descriptors.
+ * available to poll active file descriptors. You may safely
+ * include <poll.h> when this symbol is defined.
*/
/*#define HAS_POLL /**/
-/* HAS_PTHREAD_YIELD:
- * This symbol, if defined, indicates that the pthread_yield routine is
- * available to yield the execution of the current thread.
- */
-#undef HAS_PTHREAD_YIELD
-
/* HAS_READDIR:
* This symbol, if defined, indicates that the readdir routine is
* available to read directory entries. You may have to include
@@ -606,12 +473,6 @@
*/
#define HAS_READDIR /**/
-/* HAS_SCHED_YIELD:
- * This symbol, if defined, indicates that the sched_yield
- * routine is available to yield the execution of the current thread.
- */
-#undef HAS_SCHED_YIELD
-
/* HAS_SEEKDIR:
* This symbol, if defined, indicates that the seekdir routine is
* available. You may have to include <dirent.h>. See I_DIRENT.
@@ -650,29 +511,6 @@
*/
#define HAS_RMDIR /**/
-/* HAS_SAFE_BCOPY:
- * This symbol, if defined, indicates that the bcopy routine is available
- * to copy potentially overlapping memory blocks. Otherwise you should
- * probably use memmove() or memcpy(). If neither is defined, roll your
- * own version.
- */
-/*#define HAS_SAFE_BCOPY /**/
-
-/* HAS_SAFE_MEMCPY:
- * This symbol, if defined, indicates that the memcpy routine is available
- * to copy potentially overlapping memory blocks. Otherwise you should
- * probably use memmove() or memcpy(). If neither is defined, roll your
- * own version.
- */
-/*#define HAS_SAFE_MEMCPY /**/
-
-/* HAS_SANE_MEMCMP:
- * This symbol, if defined, indicates that the memcmp routine is available
- * and can be used to compare relative magnitudes of chars with their high
- * bits set. If it is not defined, roll your own version.
- */
-#define HAS_SANE_MEMCMP /**/
-
/* HAS_SELECT:
* This symbol, if defined, indicates that the select routine is
* available to select active file descriptors. If the timeout field
@@ -711,6 +549,24 @@
*/
#define HAS_SETLOCALE /**/
+/* HAS_SETPGID:
+ * This symbol, if defined, indicates that the setpgid(pid, gpid)
+ * routine is available to set process group ID.
+ */
+/*#define HAS_SETPGID /**/
+
+/* HAS_SETPGRP:
+ * This symbol, if defined, indicates that the setpgrp routine is
+ * available to set the current process group.
+ */
+/* USE_BSD_SETPGRP:
+ * This symbol, if defined, indicates that setpgrp needs two
+ * arguments whereas USG one needs none. See also HAS_SETPGID
+ * for a POSIX interface.
+ */
+/*#define HAS_SETPGRP /**/
+/*#define USE_BSD_SETPGRP /**/
+
/* HAS_SETPGRP2:
* This symbol, if defined, indicates that the setpgrp2() (as in DG/UX)
* routine is available to set the current process group.
@@ -787,12 +643,6 @@
#define Shmat_t void * /**/
/*#define HAS_SHMAT_PROTOTYPE /**/
-/* HAS_SIGACTION:
- * This symbol, if defined, indicates that Vr4's sigaction() routine
- * is available.
- */
-/*#define HAS_SIGACTION /**/
-
/* HAS_SOCKET:
* This symbol, if defined, indicates that the BSD socket interface is
* supported.
@@ -810,65 +660,6 @@
*/
/*#define USE_STAT_BLOCKS /**/
-/* USE_STDIO_PTR:
- * This symbol is defined if the _ptr and _cnt fields (or similar)
- * of the stdio FILE structure can be used to access the stdio buffer
- * for a file handle. If this is defined, then the FILE_ptr(fp)
- * and FILE_cnt(fp) macros will also be defined and should be used
- * to access these fields.
- */
-/* FILE_ptr:
- * This macro is used to access the _ptr field (or equivalent) of the
- * FILE structure pointed to by its argument. This macro will always be
- * defined if USE_STDIO_PTR is defined.
- */
-/* STDIO_PTR_LVALUE:
- * This symbol is defined if the FILE_ptr macro can be used as an
- * lvalue.
- */
-/* FILE_cnt:
- * This macro is used to access the _cnt field (or equivalent) of the
- * FILE structure pointed to by its argument. This macro will always be
- * defined if USE_STDIO_PTR is defined.
- */
-/* STDIO_CNT_LVALUE:
- * This symbol is defined if the FILE_cnt macro can be used as an
- * lvalue.
- */
-#define USE_STDIO_PTR /**/
-#ifdef USE_STDIO_PTR
-#define FILE_ptr(fp) ((fp)->curp)
-#define STDIO_PTR_LVALUE /**/
-#define FILE_cnt(fp) ((fp)->level)
-#define STDIO_CNT_LVALUE /**/
-#endif
-
-/* USE_STDIO_BASE:
- * This symbol is defined if the _base field (or similar) of the
- * stdio FILE structure can be used to access the stdio buffer for
- * a file handle. If this is defined, then the FILE_base(fp) macro
- * will also be defined and should be used to access this field.
- * Also, the FILE_bufsiz(fp) macro will be defined and should be used
- * to determine the number of bytes in the buffer. USE_STDIO_BASE
- * will never be defined unless USE_STDIO_PTR is.
- */
-/* FILE_base:
- * This macro is used to access the _base field (or equivalent) of the
- * FILE structure pointed to by its argument. This macro will always be
- * defined if USE_STDIO_BASE is defined.
- */
-/* FILE_bufsiz:
- * This macro is used to determine the number of bytes in the I/O
- * buffer pointed to by _base field (or equivalent) of the FILE
- * structure pointed to its argument. This macro will always be defined
- * if USE_STDIO_BASE is defined.
- */
-#define USE_STDIO_BASE /**/
-#ifdef USE_STDIO_BASE
-#define FILE_base(fp) ((fp)->buffer)
-#define FILE_bufsiz(fp) ((fp)->level + (fp)->curp - (fp)->buffer)
-#endif
-
/* HAS_STRCHR:
* This symbol is defined to indicate that the strchr()/strrchr()
* functions are available for string searching. If not, try the
@@ -1010,14 +801,6 @@
*/
/*#define HAS_VFORK /**/
-/* Signal_t:
- * This symbol's value is either "void" or "int", corresponding to the
- * appropriate return type of a signal handler. Thus, you can declare
- * a signal handler using "Signal_t (*handler)()", and define the
- * handler using "Signal_t handler(sig)".
- */
-#define Signal_t void /* Signal handler's return type */
-
/* HASVOLATILE:
* This symbol, if defined, indicates that this C compiler knows about
* the volatile declaration.
@@ -1027,20 +810,6 @@
#define volatile
#endif
-/* HAS_VPRINTF:
- * This symbol, if defined, indicates that the vprintf routine is available
- * to printf with a pointer to an argument list. If unavailable, you
- * may need to write your own, probably in terms of _doprnt().
- */
-/* USE_CHAR_VSPRINTF:
- * This symbol is defined if this system has vsprintf() returning type
- * (char*). The trend seems to be to declare it as "int vsprintf()". It
- * is up to the package author to declare vsprintf correctly based on the
- * symbol.
- */
-#define HAS_VPRINTF /**/
-/*#define USE_CHAR_VSPRINTF /**/
-
/* HAS_WAIT4:
* This symbol, if defined, indicates that wait4() exists.
*/
@@ -1080,30 +849,16 @@
*/
#define Gid_t gid_t /* Type for getgid(), etc... */
-/* Groups_t:
- * This symbol holds the type used for the second argument to
- * [gs]etgroups(). Usually, this is the same of gidtype, but
- * sometimes it isn't. It can be int, ushort, uid_t, etc...
- * It may be necessary to include <sys/types.h> to get any
- * typedef'ed information. This is only required if you have
- * getgroups() or setgroups().
- */
-#if defined(HAS_GETGROUPS) || defined(HAS_SETGROUPS)
-#define Groups_t gid_t /* Type for 2nd arg to [gs]etgroups() */
-#endif
-
-/* DB_Prefix_t:
- * This symbol 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 u_int32_t.
+/* I_DBM:
+ * This symbol, if defined, indicates that <dbm.h> exists and should
+ * be included.
*/
-/* DB_Hash_t:
- * This symbol 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.
+/* I_RPCSVC_DBM:
+ * This symbol, if defined, indicates that <rpcsvc/dbm.h> exists and
+ * should be included.
*/
-#define DB_Hash_t int /**/
-#define DB_Prefix_t int /**/
+/*#define I_DBM /**/
+#define I_RPCSVC_DBM /**/
/* I_DIRENT:
* This symbol, if defined, indicates to the C program that it should
@@ -1156,6 +911,12 @@
*/
#define I_LIMITS /**/
+/* I_LOCALE:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <locale.h>.
+ */
+#define I_LOCALE /**/
+
/* I_MATH:
* This symbol, if defined, indicates to the C program that it should
* include <math.h>.
@@ -1186,12 +947,6 @@
*/
/*#define I_NETINET_IN /**/
-/* I_NETDB:
- * This symbol, if defined, indicates that <netdb.h> exists and
- * should be included.
- */
-/*#define I_NETDB /**/
-
/* I_PWD:
* This symbol, if defined, indicates to the C program that it should
* include <pwd.h>.
@@ -1228,6 +983,12 @@
/*#define PWEXPIRE /**/
/*#define PWCOMMENT /**/
+/* I_SFIO:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <sfio.h>.
+ */
+/*#define I_SFIO /**/
+
/* I_STDDEF:
* This symbol, if defined, indicates that <stddef.h> exists and should
* be included.
@@ -1288,6 +1049,12 @@
*/
/*#define I_SYS_SELECT /**/
+/* I_SYS_STAT:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <sys/stat.h>.
+ */
+#define I_SYS_STAT /**/
+
/* I_SYS_TIMES:
* This symbol, if defined, indicates to the C program that it should
* include <sys/times.h>.
@@ -1332,22 +1099,6 @@
/*#define I_TERMIOS /**/
/*#define I_SGTTY /**/
-/* I_TIME:
- * This symbol, if defined, indicates to the C program that it should
- * include <time.h>.
- */
-/* I_SYS_TIME:
- * This symbol, if defined, indicates to the C program that it should
- * include <sys/time.h>.
- */
-/* I_SYS_TIME_KERNEL:
- * This symbol, if defined, indicates to the C program that it should
- * include <sys/time.h> with KERNEL defined.
- */
-#define I_TIME /**/
-/*#define I_SYS_TIME /**/
-/*#define I_SYS_TIME_KERNEL /**/
-
/* I_UNISTD:
* This symbol, if defined, indicates to the C program that it should
* include <unistd.h>.
@@ -1360,6 +1111,14 @@
*/
#define I_UTIME /**/
+/* I_VALUES:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <values.h> to get definition of symbols like MINFLOAT or
+ * MAXLONG, i.e. machine dependant limitations. Probably, you
+ * should use <limits.h> instead, if it is available.
+ */
+/*#define I_VALUES /**/
+
/* I_STDARG:
* This symbol, if defined, indicates that <stdarg.h> exists and should
* be included.
@@ -1377,22 +1136,6 @@
*/
/*#define I_VFORK /**/
-/* INTSIZE:
- * This symbol contains the value of sizeof(int) so that the C
- * preprocessor can make decisions based on it.
- */
-/* LONGSIZE:
- * This symbol contains the value of sizeof(long) so that the C
- * preprocessor can make decisions based on it.
- */
-/* SHORTSIZE:
- * This symbol contains the value of sizeof(short) so that the C
- * preprocessor can make decisions based on it.
- */
-#define INTSIZE 4 /**/
-#define LONGSIZE 4 /**/
-#define SHORTSIZE 2 /**/
-
/* Off_t:
* This symbol holds the type used to declare offsets in the kernel.
* It can be int, long, off_t, etc... It may be necessary to include
@@ -1400,6 +1143,21 @@
*/
#define Off_t off_t /* <offset> type */
+/* Free_t:
+ * This variable contains the return type of free(). It is usually
+ * void, but occasionally int.
+ */
+/* Malloc_t:
+ * This symbol is the type of pointer returned by malloc and realloc.
+ */
+#define Malloc_t void * /**/
+#define Free_t void /**/
+
+/* MYMALLOC:
+ * This symbol, if defined, indicates that we're using our own malloc.
+ */
+#define MYMALLOC /**/
+
/* Mode_t:
* This symbol holds the type used to declare file modes
* for systems calls. It is usually mode_t, but may be
@@ -1408,32 +1166,12 @@
*/
#define Mode_t mode_t /* file mode parameter for system calls */
-/* VAL_O_NONBLOCK:
- * This symbol is to be used during open() or fcntl(F_SETFL) to turn on
- * non-blocking I/O for the file descriptor. Note that there is no way
- * back, i.e. you cannot turn it blocking again this way. If you wish to
- * alternatively switch between blocking and non-blocking, use the
- * ioctl(FIOSNBIO) call instead, but that is not supported by all devices.
- */
-/* VAL_EAGAIN:
- * This symbol holds the errno error code set by read() when no data was
- * present on the non-blocking file descriptor.
- */
-/* RD_NODATA:
- * This symbol holds the return code from read() when no data is present
- * on the non-blocking file descriptor. Be careful! If EOF_NONBLOCK is
- * not defined, then you can't distinguish between no data and EOF by
- * issuing a read(). You'll have to find another way to tell for sure!
- */
-/* EOF_NONBLOCK:
- * This symbol, if defined, indicates to the C program that a read() on
- * a non-blocking file descriptor will return 0 on EOF, and not the value
- * held in RD_NODATA (-1 usually, in that case!).
+/* Pid_t:
+ * This symbol holds the type used to declare process ids in the kernel.
+ * It can be int, uint, pid_t, etc... It may be necessary to include
+ * <sys/types.h> to get any typedef'ed information.
*/
-#define VAL_O_NONBLOCK O_NONBLOCK
-#define VAL_EAGAIN EAGAIN
-#define RD_NODATA -1
-#define EOF_NONBLOCK
+#define Pid_t int /* PID type */
/* CAN_PROTOTYPE:
* If defined, this macro indicates that the C compiler can handle
@@ -1453,19 +1191,14 @@
#define _(args) ()
#endif
-/* RANDBITS:
- * This symbol contains the number of bits of random number the rand()
- * function produces. Usual values are 15, 16, and 31.
- */
-#define RANDBITS 15 /**/
-
-/* Select_fd_set_t:
- * This symbol 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(), of course.
+/* SH_PATH:
+ * This symbol contains the full pathname to the shell used on this
+ * 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.
*/
-#define Select_fd_set_t Perl_fd_set * /**/
+#define SH_PATH "cmd /x /c" /**/
/* Size_t:
* This symbol holds the type used to declare length parameters
@@ -1475,16 +1208,6 @@
*/
#define Size_t size_t /* length paramater for string functions */
-/* SSize_t:
- * This symbol holds the type used by functions that return
- * a count of bytes or an error condition. It must be a signed type.
- * It is usually ssize_t, but may be long or int, etc.
- * It may be necessary to include <sys/types.h> or <unistd.h>
- * to get any typedef'ed information.
- * We will pick a type such that sizeof(SSize_t) == sizeof(Size_t).
- */
-#define SSize_t int /* signed count of bytes */
-
/* STDCHAR:
* This symbol is defined to be the type of char used in stdio.h.
* It has the values "unsigned char" or "char".
@@ -1498,39 +1221,41 @@
*/
#define Uid_t uid_t /* UID type */
-/* LOC_SED:
- * This symbol holds the complete pathname to the sed program.
- */
-#define LOC_SED "" /**/
-
-/* OSNAME:
- * This symbol contains the name of the operating system, as determined
- * by Configure. You shouldn't rely on it too much; the specific
- * feature tests from Configure are generally more reliable.
- */
-#define OSNAME "MSWin32" /**/
-
-/* ARCHLIB:
- * This variable, if defined, holds the name of the directory in
- * which the user wants to put architecture-dependent public
- * library files for perl5. It is most often a local directory
- * such as /usr/local/lib. Programs using this variable must be
- * prepared to deal with filename expansion. If ARCHLIB is the
- * same as PRIVLIB, it is not defined, since presumably the
- * program already searches PRIVLIB.
- */
-/* ARCHLIB_EXP:
- * This symbol contains the ~name expanded version of ARCHLIB, to be used
- * in programs that are not prepared to deal with ~ expansion at run-time.
+/* VOIDFLAGS:
+ * This symbol indicates how much support of the void type is given by this
+ * compiler. What various bits mean:
+ *
+ * 1 = supports declaration of void
+ * 2 = supports arrays of pointers to functions returning void
+ * 4 = supports comparisons between pointers to void functions and
+ * addresses of void functions
+ * 8 = suports declaration of generic void pointers
+ *
+ * The package designer should define VOIDUSED to indicate the requirements
+ * of the package. This can be done either by #defining VOIDUSED before
+ * including config.h, or by defining defvoidused in Myinit.U. If the
+ * latter approach is taken, only those flags will be tested. If the
+ * level of void support necessary is not present, defines void to int.
*/
-#define ARCHLIB "c:\\perl\\lib\\MSWin32-x86" /**/
-#define ARCHLIB_EXP (win32_perllib_path(ARCHNAME,NULL)) /**/
+#ifndef VOIDUSED
+#define VOIDUSED 15
+#endif
+#define VOIDFLAGS 15
+#if (VOIDFLAGS & VOIDUSED) != VOIDUSED
+#define void int /* is void to be avoided? */
+#define M_VOID /* Xenix strikes again */
+#endif
-/* BINCOMPAT3:
- * This symbol, if defined, indicates that Perl 5.004 should be
- * binary-compatible with Perl 5.003.
+/* MEM_ALIGNBYTES:
+ * This symbol contains the number of bytes required to align a
+ * double. Usual values are 2, 4 and 8.
+ * On NeXT starting with 3.2, you can build "Fat" Multiple Architecture
+ * Binaries (MAB) for targets with varying alignment. This only matters
+ * for perl, where the config.h can be generated and installed on one
+ * system, and used by a different architecture to build an extension.
+ * The default is eight, for safety.
*/
-/*#define BINCOMPAT3 /**/
+#define MEM_ALIGNBYTES 8 /**/
/* BYTEORDER:
* This symbol holds the hexadecimal constant defined in byteorder,
@@ -1555,39 +1280,32 @@
#endif /* ENDIAN CHECK */
#endif /* NeXT */
-/* CSH:
- * This symbol, if defined, indicates that the C-shell exists.
- * If defined, contains the full pathname of csh.
+/* CASTI32:
+ * This symbol is defined if the C compiler can cast negative
+ * or large floating point numbers to 32-bit ints.
*/
-/*#define CSH "" /**/
+#define CASTI32 /**/
-/* DLSYM_NEEDS_UNDERSCORE:
- * This symbol, if defined, indicates that we need to prepend an
- * underscore to the symbol name before calling dlsym(). This only
- * makes sense if you *have* dlsym, which we will presume is the
- * case if you're using dl_dlopen.xs.
+/* CASTNEGFLOAT:
+ * This symbol is defined if the C compiler can cast negative
+ * numbers to unsigned longs, ints and shorts.
*/
-/*#define DLSYM_NEEDS_UNDERSCORE /**/
-
-/* SETUID_SCRIPTS_ARE_SECURE_NOW:
- * This symbol, if defined, indicates that the bug that prevents
- * setuid scripts from being secure is not present in this kernel.
+/* CASTFLAGS:
+ * This symbol contains flags that say what 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
*/
-/* DOSUID:
- * This symbol, if defined, indicates that the C program should
- * check the script that it is executing for setuid/setgid bits, and
- * attempt to emulate setuid/setgid on systems that have disabled
- * setuid #! scripts because the kernel can't do it securely.
- * It is up to the package designer to make sure that this emulation
- * is done securely. Among other things, it should do an fstat on
- * the script it just opened to make sure it really is a setuid/setgid
- * script, it should make sure the arguments passed correspond exactly
- * to the argument on the #! line, and it should not trust any
- * subprocesses to which it must pass the filename rather than the
- * file descriptor of the script to be executed.
+#define CASTNEGFLOAT /**/
+#define CASTFLAGS 0 /**/
+
+/* VOID_CLOSEDIR:
+ * This symbol, if defined, indicates that the closedir() routine
+ * does not return a value.
*/
-/*#define SETUID_SCRIPTS_ARE_SECURE_NOW /**/
-/*#define DOSUID /**/
+/*#define VOID_CLOSEDIR /**/
/* Gconvert:
* This preprocessor macro is defined to convert a floating point
@@ -1606,68 +1324,51 @@
*/
#define Gconvert(x,n,t,b) gcvt((x),(n),(b))
-/* HAS_GETPGID:
+/* HAS_GNULIBC:
* This symbol, if defined, indicates to the C program that
- * the getpgid(pid) function is available to get the
- * process group id.
- */
-/*#define HAS_GETPGID /**/
-
-/* HAS_GETPGRP:
- * This symbol, if defined, indicates that the getpgrp routine is
- * available to get the current process group.
+ * the GNU C library is being used.
*/
-/* USE_BSD_GETPGRP:
- * This symbol, if defined, indicates that getpgrp needs one
- * arguments whereas USG one needs none.
+/*#define HAS_GNULIBC /**/
+/* HAS_ISASCII:
+ * This manifest constant lets the C program know that isascii
+ * is available.
*/
-/*#define HAS_GETPGRP /**/
-/*#define USE_BSD_GETPGRP /**/
+#define HAS_ISASCII /**/
-/* HAS_INET_ATON:
- * This symbol, if defined, indicates to the C program that the
- * inet_aton() function is available to parse IP address "dotted-quad"
- * strings.
+/* HAS_OPEN3:
+ * This manifest constant lets the C program know that the three
+ * argument form of open(2) is available.
*/
-/*#define HAS_INET_ATON /**/
+/*#define HAS_OPEN3 /**/
-/* HAS_SETPGID:
- * This symbol, if defined, indicates to the C program that
- * the setpgid(pid, gpid) function is available to set the
- * process group id.
+/* HAS_SAFE_BCOPY:
+ * This symbol, if defined, indicates that the bcopy routine is available
+ * to copy potentially overlapping memory blocks. Otherwise you should
+ * probably use memmove() or memcpy(). If neither is defined, roll your
+ * own version.
*/
-/*#define HAS_SETPGID /**/
+/*#define HAS_SAFE_BCOPY /**/
-/* HAS_SETPGRP:
- * This symbol, if defined, indicates that the setpgrp routine is
- * available to set the current process group.
- */
-/* USE_BSD_SETPGRP:
- * This symbol, if defined, indicates that setpgrp needs two
- * arguments whereas USG one needs none. See also HAS_SETPGID
- * for a POSIX interface.
- */
-/* USE_BSDPGRP:
- * This symbol, if defined, indicates that the BSD notion of process
- * group is to be used. For instance, you have to say setpgrp(pid, pgrp)
- * instead of the USG setpgrp(). This should be obsolete since
- * there are systems which have BSD-ish setpgrp but USG-ish getpgrp.
+/* HAS_SAFE_MEMCPY:
+ * This symbol, if defined, indicates that the memcpy routine is available
+ * to copy potentially overlapping memory blocks. Otherwise you should
+ * probably use memmove() or memcpy(). If neither is defined, roll your
+ * own version.
*/
-/*#define HAS_SETPGRP /**/
-/*#define USE_BSD_SETPGRP /**/
-/*#define USE_BSDPGRP /**/
+/*#define HAS_SAFE_MEMCPY /**/
-/* USE_SFIO:
- * This symbol, if defined, indicates that sfio should
- * be used.
+/* HAS_SANE_MEMCMP:
+ * This symbol, if defined, indicates that the memcmp routine is available
+ * and can be used to compare relative magnitudes of chars with their high
+ * bits set. If it is not defined, roll your own version.
*/
-/*#define USE_SFIO /**/
+#define HAS_SANE_MEMCMP /**/
-/* PTHREADS_CREATED_JOINABLE:
- * This symbol, if defined, indicates that pthreads are created
- * in the joinable (aka undetached) state.
+/* HAS_SIGACTION:
+ * This symbol, if defined, indicates that Vr4's sigaction() routine
+ * is available.
*/
-/*#define PTHREADS_CREATED_JOINABLE /**/
+/*#define HAS_SIGACTION /**/
/* Sigjmp_buf:
* This is the buffer type to be used with Sigsetjmp and Siglongjmp.
@@ -1693,80 +1394,236 @@
#define Siglongjmp(buf,retval) longjmp((buf),(retval))
#endif
-/* USE_DYNAMIC_LOADING:
- * This symbol, if defined, indicates that dynamic loading of
- * some sort is available.
+/* USE_STDIO_PTR:
+ * This symbol is defined if the _ptr and _cnt fields (or similar)
+ * of the stdio FILE structure can be used to access the stdio buffer
+ * for a file handle. If this is defined, then the FILE_ptr(fp)
+ * and FILE_cnt(fp) macros will also be defined and should be used
+ * to access these fields.
*/
-#define USE_DYNAMIC_LOADING /**/
+/* FILE_ptr:
+ * This macro is used to access the _ptr field (or equivalent) of the
+ * FILE structure pointed to by its argument. This macro will always be
+ * defined if USE_STDIO_PTR is defined.
+ */
+/* STDIO_PTR_LVALUE:
+ * This symbol is defined if the FILE_ptr macro can be used as an
+ * lvalue.
+ */
+/* FILE_cnt:
+ * This macro is used to access the _cnt field (or equivalent) of the
+ * FILE structure pointed to by its argument. This macro will always be
+ * defined if USE_STDIO_PTR is defined.
+ */
+/* STDIO_CNT_LVALUE:
+ * This symbol is defined if the FILE_cnt macro can be used as an
+ * lvalue.
+ */
+#define USE_STDIO_PTR /**/
+#ifdef USE_STDIO_PTR
+#define FILE_ptr(fp) ((fp)->curp)
+#define STDIO_PTR_LVALUE /**/
+#define FILE_cnt(fp) ((fp)->level)
+#define STDIO_CNT_LVALUE /**/
+#endif
-/* I_DBM:
- * This symbol, if defined, indicates that <dbm.h> exists and should
- * be included.
+/* USE_STDIO_BASE:
+ * This symbol is defined if the _base field (or similar) of the
+ * stdio FILE structure can be used to access the stdio buffer for
+ * a file handle. If this is defined, then the FILE_base(fp) macro
+ * will also be defined and should be used to access this field.
+ * Also, the FILE_bufsiz(fp) macro will be defined and should be used
+ * to determine the number of bytes in the buffer. USE_STDIO_BASE
+ * will never be defined unless USE_STDIO_PTR is.
*/
-/* I_RPCSVC_DBM:
- * This symbol, if defined, indicates that <rpcsvc/dbm.h> exists and
- * should be included.
+/* FILE_base:
+ * This macro is used to access the _base field (or equivalent) of the
+ * FILE structure pointed to by its argument. This macro will always be
+ * defined if USE_STDIO_BASE is defined.
*/
-/*#define I_DBM /**/
-#define I_RPCSVC_DBM /**/
+/* FILE_bufsiz:
+ * This macro is used to determine the number of bytes in the I/O
+ * buffer pointed to by _base field (or equivalent) of the FILE
+ * structure pointed to its argument. This macro will always be defined
+ * if USE_STDIO_BASE is defined.
+ */
+#define USE_STDIO_BASE /**/
+#ifdef USE_STDIO_BASE
+#define FILE_base(fp) ((fp)->buffer)
+#define FILE_bufsiz(fp) ((fp)->level + (fp)->curp - (fp)->buffer)
+#endif
-/* I_LOCALE:
- * This symbol, if defined, indicates to the C program that it should
- * include <locale.h>.
+/* HAS_VPRINTF:
+ * This symbol, if defined, indicates that the vprintf routine is available
+ * to printf with a pointer to an argument list. If unavailable, you
+ * may need to write your own, probably in terms of _doprnt().
*/
-#define I_LOCALE /**/
+/* USE_CHAR_VSPRINTF:
+ * This symbol is defined if this system has vsprintf() returning type
+ * (char*). The trend seems to be to declare it as "int vsprintf()". It
+ * is up to the package author to declare vsprintf correctly based on the
+ * symbol.
+ */
+#define HAS_VPRINTF /**/
+/*#define USE_CHAR_VSPRINTF /**/
-/* I_SFIO:
+/* I_TIME:
* This symbol, if defined, indicates to the C program that it should
- * include <sfio.h>.
+ * include <time.h>.
*/
-/*#define I_SFIO /**/
-
-/* I_SYS_STAT:
+/* I_SYS_TIME:
* This symbol, if defined, indicates to the C program that it should
- * include <sys/stat.h>.
+ * include <sys/time.h>.
*/
-#define I_SYS_STAT /**/
-
-/* I_VALUES:
+/* I_SYS_TIME_KERNEL:
* This symbol, if defined, indicates to the C program that it should
- * include <values.h> to get definition of symbols like MINFLOAT or
- * MAXLONG, i.e. machine dependant limitations. Probably, you
- * should use <limits.h> instead, if it is available.
+ * include <sys/time.h> with KERNEL defined.
*/
-/*#define I_VALUES /**/
+#define I_TIME /**/
+/*#define I_SYS_TIME /**/
+/*#define I_SYS_TIME_KERNEL /**/
-/* Free_t:
- * This variable contains the return type of free(). It is usually
- * void, but occasionally int.
+/* INTSIZE:
+ * This symbol contains the value of sizeof(int) so that the C
+ * preprocessor can make decisions based on it.
*/
-/* Malloc_t:
- * This symbol is the type of pointer returned by malloc and realloc.
+/* LONGSIZE:
+ * This symbol contains the value of sizeof(long) so that the C
+ * preprocessor can make decisions based on it.
*/
-#define Malloc_t void * /**/
-#define Free_t void /**/
+/* SHORTSIZE:
+ * This symbol contains the value of sizeof(short) so that the C
+ * preprocessor can make decisions based on it.
+ */
+#define INTSIZE 4 /**/
+#define LONGSIZE 4 /**/
+#define SHORTSIZE 2 /**/
-/* MYMALLOC:
- * This symbol, if defined, indicates that we're using our own malloc.
+/* VAL_O_NONBLOCK:
+ * This symbol is to be used during open() or fcntl(F_SETFL) to turn on
+ * non-blocking I/O for the file descriptor. Note that there is no way
+ * back, i.e. you cannot turn it blocking again this way. If you wish to
+ * alternatively switch between blocking and non-blocking, use the
+ * ioctl(FIOSNBIO) call instead, but that is not supported by all devices.
*/
-#ifndef PERL_OBJECT
-#define MYMALLOC /**/
-#endif
+/* VAL_EAGAIN:
+ * This symbol holds the errno error code set by read() when no data was
+ * present on the non-blocking file descriptor.
+ */
+/* RD_NODATA:
+ * This symbol holds the return code from read() when no data is present
+ * on the non-blocking file descriptor. Be careful! If EOF_NONBLOCK is
+ * not defined, then you can't distinguish between no data and EOF by
+ * issuing a read(). You'll have to find another way to tell for sure!
+ */
+/* EOF_NONBLOCK:
+ * This symbol, if defined, indicates to the C program that a read() on
+ * a non-blocking file descriptor will return 0 on EOF, and not the value
+ * held in RD_NODATA (-1 usually, in that case!).
+ */
+#define VAL_O_NONBLOCK O_NONBLOCK
+#define VAL_EAGAIN EAGAIN
+#define RD_NODATA -1
+#define EOF_NONBLOCK
+
+/* RANDBITS:
+ * This symbol contains the number of bits of random number the rand()
+ * function produces. Usual values are 15, 16, and 31.
+ */
+#define RANDBITS 15 /**/
+
+/* SSize_t:
+ * This symbol holds the type used by functions that return
+ * a count of bytes or an error condition. It must be a signed type.
+ * It is usually ssize_t, but may be long or int, etc.
+ * It may be necessary to include <sys/types.h> or <unistd.h>
+ * to get any typedef'ed information.
+ * We will pick a type such that sizeof(SSize_t) == sizeof(Size_t).
+ */
+#define SSize_t int /* signed count of bytes */
-/* OLDARCHLIB:
+/* OSNAME:
+ * This symbol contains the name of the operating system, as determined
+ * by Configure. You shouldn't rely on it too much; the specific
+ * feature tests from Configure are generally more reliable.
+ */
+#define OSNAME "MSWin32" /**/
+
+/* ARCHLIB:
* This variable, if defined, holds the name of the directory in
- * which the user has perl5.000 or perl5.001 architecture-dependent
- * public library files for perl5. For the most part, these
- * files will work with 5.002 (and later), but that is not
- * guaranteed.
+ * which the user wants to put architecture-dependent public
+ * library files for perl5. It is most often a local directory
+ * such as /usr/local/lib. Programs using this variable must be
+ * prepared to deal with filename expansion. If ARCHLIB is the
+ * same as PRIVLIB, it is not defined, since presumably the
+ * program already searches PRIVLIB.
+ */
+/* ARCHLIB_EXP:
+ * This symbol contains the ~name expanded version of ARCHLIB, to be used
+ * in programs that are not prepared to deal with ~ expansion at run-time.
+ */
+#define ARCHLIB "c:\\perl5004.5x\\lib\\MSWin32-x86" /**/
+#define ARCHLIB_EXP (win32_perllib_path(ARCHNAME,NULL)) /**/
+
+/* CAT2:
+ * This macro catenates 2 tokens together.
+ */
+/* STRINGIFY:
+ * This macro surrounds its token with double quotes.
+ */
+#if 42 == 1
+#define CAT2(a,b)a/**/b
+#define STRINGIFY(a)"a"
+ /* If you can get stringification with catify, tell me how! */
+#endif
+#if 42 == 42
+#define CAT2(a,b)a ## b
+#define StGiFy(a)# a
+#define STRINGIFY(a)StGiFy(a)
+#endif
+#if 42 != 1 && 42 != 42
+#include "Bletch: How does this C preprocessor catenate tokens?"
+#endif
+
+/* CSH:
+ * This symbol, if defined, indicates that the C-shell exists.
+ * If defined, contains the full pathname of csh.
*/
-/* OLDARCHLIB_EXP:
- * This symbol contains the ~name expanded version of OLDARCHLIB, to be
- * used in programs that are not prepared to deal with ~ expansion at
- * run-time.
+/*#define CSH "" /**/
+
+/* HAS_SETGROUPS:
+ * This symbol, if defined, indicates that the setgroups() routine is
+ * available to set the list of process groups. If unavailable, multiple
+ * groups are probably not supported.
*/
-/*#define OLDARCHLIB "" /**/
-/*#define OLDARCHLIB_EXP "" /**/
+/*#define HAS_SETGROUPS /**/
+
+/* Signal_t:
+ * This symbol's value is either "void" or "int", corresponding to the
+ * appropriate return type of a signal handler. Thus, you can declare
+ * a signal handler using "Signal_t (*handler)()", and define the
+ * handler using "Signal_t handler(sig)".
+ */
+#define Signal_t void /* Signal handler's return type */
+
+/* Groups_t:
+ * This symbol holds the type used for the second argument to
+ * getgroups() and setgropus(). Usually, this is the same as
+ * gidtype (gid_t) , but sometimes it isn't.
+ * It can be int, ushort, uid_t, etc...
+ * It may be necessary to include <sys/types.h> to get any
+ * typedef'ed information. This is only required if you have
+ * getgroups() or setgropus()..
+ */
+#if defined(HAS_GETGROUPS) || defined(HAS_SETGROUPS)
+#define Groups_t gid_t /* Type for 2nd arg to [sg]etgroups() */
+#endif
+
+/* I_NETDB:
+ * This symbol, if defined, indicates that <netdb.h> exists and
+ * should be included.
+ */
+/*#define I_NETDB /**/
/* PRIVLIB:
* This symbol contains the name of the private library for this package.
@@ -1778,18 +1635,9 @@
* This symbol contains the ~name expanded version of PRIVLIB, to be used
* in programs that are not prepared to deal with ~ expansion at run-time.
*/
-#define PRIVLIB "c:\\perl\\lib" /**/
+#define PRIVLIB "c:\\perl5004.5x\\lib" /**/
#define PRIVLIB_EXP (win32_perllib_path(NULL)) /**/
-/* SH_PATH:
- * This symbol contains the full pathname to the shell used on this
- * 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.
- */
-#define SH_PATH "cmd /x /c" /**/
-
/* SIG_NAME:
* This symbol contains a list of signal names in order of
* signal number. This is intended
@@ -1818,8 +1666,8 @@
* The last element is 0, corresponding to the 0 at the end of
* the sig_name list.
*/
-#define SIG_NAME "ZERO","HUP","INT","QUIT","ILL","TRAP","ABRT","EMT","FPE","KILL","BUS","SEGV","SYS","PIPE","ALRM","TERM","USR1","USR2","CHLD","PWR","WINCH","URG","IO","STOP","TSTP","CONT","TTIN","TTOU","VTALRM","PROF","XCPU","XFSZ","WAITING","LWP","FREEZE","THAW","RTMIN","NUM37","NUM38","NUM39","NUM40","NUM41","NUM42","RTMAX","IOT","CLD","POLL",0 /**/
-#define SIG_NUM 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,6,18,22,0 /**/
+#define SIG_NAME "ZERO", "INT", "ILL", "FPE", "SEGV", "TERM", "USR1", "USR2", "USR3", "BREAK", "ABRT", 0 /**/
+#define SIG_NUM 0, 2, 4, 8, 11, 15, 16, 17, 20, 21, 22, 0 /**/
/* SITEARCH:
* This symbol contains the name of the private library for this package.
@@ -1834,7 +1682,7 @@
* This symbol contains the ~name expanded version of SITEARCH, to be used
* in programs that are not prepared to deal with ~ expansion at run-time.
*/
-#define SITEARCH "c:\\perl\\lib\\site\\MSWin32-x86" /**/
+#define SITEARCH "c:\\perl5004.5x\\lib\\site\\MSWin32-x86" /**/
#define SITEARCH_EXP (win32_perllib_path("site",ARCHNAME,NULL)) /**/
/* SITELIB:
@@ -1850,9 +1698,42 @@
* This symbol contains the ~name expanded version of SITELIB, to be used
* in programs that are not prepared to deal with ~ expansion at run-time.
*/
-#define SITELIB "c:\\perl\\lib\\site" /**/
+#define SITELIB "c:\\perl5004.5x\\lib\\site" /**/
#define SITELIB_EXP (win32_perllib_path("site",NULL)) /**/
+/* DLSYM_NEEDS_UNDERSCORE:
+ * This symbol, if defined, indicates that we need to prepend an
+ * underscore to the symbol name before calling dlsym(). This only
+ * makes sense if you *have* dlsym, which we will presume is the
+ * case if you're using dl_dlopen.xs.
+ */
+/*#define DLSYM_NEEDS_UNDERSCORE /**/
+
+/* USE_SFIO:
+ * This symbol, if defined, indicates that sfio should
+ * be used.
+ */
+/*#define USE_SFIO /**/
+
+/* USE_DYNAMIC_LOADING:
+ * This symbol, if defined, indicates that dynamic loading of
+ * some sort is available.
+ */
+#define USE_DYNAMIC_LOADING /**/
+
+/* DB_Prefix_t:
+ * This symbol 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 u_int32_t.
+ */
+/* DB_Hash_t:
+ * This symbol 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.
+ */
+#define DB_Hash_t int /**/
+#define DB_Prefix_t int /**/
+
/* STARTPERL:
* This variable contains the string to put in front of a perl
* script to make sure (one hopes) that it runs with perl and not
@@ -1867,30 +1748,61 @@
*/
/*#define USE_PERLIO /**/
-/* VOIDFLAGS:
- * This symbol indicates how much support of the void type is given by this
- * compiler. What various bits mean:
- *
- * 1 = supports declaration of void
- * 2 = supports arrays of pointers to functions returning void
- * 4 = supports comparisons between pointers to void functions and
- * addresses of void functions
- * 8 = suports declaration of generic void pointers
- *
- * The package designer should define VOIDUSED to indicate the requirements
- * of the package. This can be done either by #defining VOIDUSED before
- * including config.h, or by defining defvoidused in Myinit.U. If the
- * latter approach is taken, only those flags will be tested. If the
- * level of void support necessary is not present, defines void to int.
+/* Netdb_host_t:
+ * This symbol holds the type used for the 1st argument
+ * to gethostbyaddr().
*/
-#ifndef VOIDUSED
-#define VOIDUSED 15
-#endif
-#define VOIDFLAGS 15
-#if (VOIDFLAGS & VOIDUSED) != VOIDUSED
-#define void int /* is void to be avoided? */
-#define M_VOID /* Xenix strikes again */
-#endif
+/* Netdb_hlen_t:
+ * This symbol holds the type used for the 2nd argument
+ * to gethostbyaddr().
+ */
+/* Netdb_name_t:
+ * This symbol holds the type used for the argument to
+ * gethostbyname().
+ */
+/* Netdb_net_t:
+ * This symbol holds the type used for the 1st argument to
+ * getnetbyaddr().
+ */
+#define Netdb_host_t char * /**/
+#define Netdb_hlen_t int /**/
+#define Netdb_name_t char * /**/
+#define Netdb_net_t long /**/
+
+/* Select_fd_set_t:
+ * This symbol 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(), of course.
+ */
+#define Select_fd_set_t Perl_fd_set * /**/
+
+/* ARCHNAME:
+ * This symbol holds a string representing the architecture name.
+ * It may be used to construct an architecture-dependant pathname
+ * where library files may be held under a private library, for
+ * instance.
+ */
+#define ARCHNAME "MSWin32-x86" /**/
+
+/* HAS_PTHREAD_YIELD:
+ * This symbol, if defined, indicates that the pthread_yield
+ * routine is available to yield the execution of the current
+ * thread.
+ */
+/*#define HAS_PTHREAD_YIELD /**/
+
+/* PTHREADS_CREATED_JOINABLE:
+ * This symbol, if defined, indicates that pthreads are created
+ * in the joinable (aka undetached) state.
+ */
+/*#define PTHREADS_CREATED_JOINABLE /**/
+
+/* USE_THREADS:
+ * This symbol, if defined, indicates that Perl should
+ * be built to use threads.
+ */
+/*#define USE_THREADS /**/
#endif
#include <win32.h>
diff --git a/win32/config_H.gc b/win32/config_H.gc
index c652897dd4..e5f3d27a93 100644
--- a/win32/config_H.gc
+++ b/win32/config_H.gc
@@ -7,47 +7,24 @@
* that running config_h.SH again will wipe out any changes you've made.
* For a more permanent change edit config.sh and rerun config_h.SH.
*
- * $Id: Config_h.U,v 3.0.1.4 1995/09/25 09:10:49 ram Exp $
+ * $Id: Config_h.U,v 3.0.1.5 1997/02/28 14:57:43 ram Exp $
*/
-/* Configuration time: undef
- * Configured by: nick
- * Target system:
+/*
+ * Package name : perl5
+ * Source directory : undef
+ * Configuration time: undef
+ * Configured by : gsar
+ * Target system :
*/
#ifndef _config_h_
#define _config_h_
-/* MEM_ALIGNBYTES:
- * This symbol contains the number of bytes required to align a
- * double. Usual values are 2, 4 and 8.
- * On NeXT starting with 3.2, you can build "Fat" Multiple Architecture
- * Binaries (MAB) for targets with varying alignment. This only matters
- * for perl, where the config.h can be generated and installed on one
- * system, and used by a different architecture to build an extension.
- * The default is eight, for safety.
- */
-#ifndef NeXT
-#define MEM_ALIGNBYTES 8 /**/
-#else /* NeXT */
-#ifdef __m68k__
-#define MEM_ALIGNBYTES 2
-#else
-#ifdef __i386__
-#define MEM_ALIGNBYTES 4
-#else /* __hppa__, __sparc__ and default for unknown architectures */
-#define MEM_ALIGNBYTES 8
-#endif /* __i386__ */
-#endif /* __m68k__ */
-#endif /* NeXT */
-
-/* ARCHNAME:
- * This symbol holds a string representing the architecture name.
- * It may be used to construct an architecture-dependant pathname
- * where library files may be held under a private library, for
- * instance.
+/* LOC_SED:
+ * This symbol holds the complete pathname to the sed program.
*/
-#define ARCHNAME "MSWin32-x86" /**/
+#define LOC_SED "" /**/
/* BIN:
* This symbol holds the path of the bin directory where the package will
@@ -57,38 +34,8 @@
* This symbol is the filename expanded version of the BIN symbol, for
* programs that do not want to deal with that at run-time.
*/
-#define BIN "c:\\perl\\bin" /**/
-#define BIN_EXP "c:\\perl\\bin" /**/
-
-/* CAT2:
- * This macro catenates 2 tokens together.
- */
-/* STRINGIFY:
- * This macro surrounds its token with double quotes.
- */
-#if 42 == 1
-#define CAT2(a,b)a/**/b
-#define CAT3(a,b,c)a/**/b/**/c
-#define CAT4(a,b,c,d)a/**/b/**/c/**/d
-#define CAT5(a,b,c,d,e)a/**/b/**/c/**/d/**/e
-#define STRINGIFY(a)"a"
- /* If you can get stringification with catify, tell me how! */
-#endif
-#if 42 == 42
-#define CAT2(a,b)a ## b
-#define CAT3(a,b,c)a ## b ## c
-#define CAT4(a,b,c,d)a ## b ## c ## d
-#define CAT5(a,b,c,d,e)a ## b ## c ## d ## e
-#define StGiFy(a)# a
-#define STRINGIFY(a)StGiFy(a)
-#define SCAT2(a,b)StGiFy(a) StGiFy(b)
-#define SCAT3(a,b,c)StGiFy(a) StGiFy(b) StGiFy(c)
-#define SCAT4(a,b,c,d)StGiFy(a) StGiFy(b) StGiFy(c) StGiFy(d)
-#define SCAT5(a,b,c,d,e)StGiFy(a) StGiFy(b) StGiFy(c) StGiFy(d) StGiFy(e)
-#endif
-#ifndef CAT2
-#include "Bletch: How does this C preprocessor catenate tokens?"
-#endif
+#define BIN "c:\\perl5004.5x\\bin" /**/
+#define BIN_EXP "c:\\perl5004.5x\\bin" /**/
/* CPPSTDIN:
* This symbol contains the first part of the string which will invoke
@@ -102,8 +49,8 @@
* output. This symbol will have the value "-" if CPPSTDIN needs a minus
* to specify standard input, otherwise the value is "".
*/
-#define CPPSTDIN "cl -E"
-#define CPPMINUS ""
+#define CPPSTDIN "gcc -E"
+#define CPPMINUS "-"
/* HAS_ALARM:
* This symbol, if defined, indicates that the alarm routine is
@@ -138,27 +85,6 @@
*/
/*#define HAS_BZERO /**/
-/* CASTI32:
- * This symbol is defined if the C compiler can cast negative
- * or large floating point numbers to 32-bit ints.
- */
-#define CASTI32 /**/
-
-/* CASTNEGFLOAT:
- * This symbol is defined if the C compiler can cast negative
- * numbers to unsigned longs, ints and shorts.
- */
-/* CASTFLAGS:
- * This symbol contains flags that say what 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
- */
-#define CASTNEGFLOAT /**/
-#define CASTFLAGS 0 /**/
-
/* HAS_CHOWN:
* This symbol, if defined, indicates that the chown routine is
* available.
@@ -177,12 +103,6 @@
*/
#define HAS_CHSIZE /**/
-/* VOID_CLOSEDIR:
- * This symbol, if defined, indicates that the closedir() routine
- * does not return a value.
- */
-/*#define VOID_CLOSEDIR /**/
-
/* HASCONST:
* This symbol, if defined, indicates that this C compiler knows about
* the const type. There is no need to actually test for that symbol
@@ -227,6 +147,26 @@
*/
#define HAS_DLERROR /**/
+/* SETUID_SCRIPTS_ARE_SECURE_NOW:
+ * This symbol, if defined, indicates that the bug that prevents
+ * setuid scripts from being secure is not present in this kernel.
+ */
+/* DOSUID:
+ * This symbol, if defined, indicates that the C program should
+ * check the script that it is executing for setuid/setgid bits, and
+ * attempt to emulate setuid/setgid on systems that have disabled
+ * setuid #! scripts because the kernel can't do it securely.
+ * It is up to the package designer to make sure that this emulation
+ * is done securely. Among other things, it should do an fstat on
+ * the script it just opened to make sure it really is a setuid/setgid
+ * script, it should make sure the arguments passed correspond exactly
+ * to the argument on the #! line, and it should not trust any
+ * subprocesses to which it must pass the filename rather than the
+ * file descriptor of the script to be executed.
+ */
+/*#define SETUID_SCRIPTS_ARE_SECURE_NOW /**/
+/*#define DOSUID /**/
+
/* HAS_DUP2:
* This symbol, if defined, indicates that the dup2 routine is
* available to duplicate file descriptors.
@@ -297,13 +237,7 @@
* available to get the list of process groups. If unavailable, multiple
* groups are probably not supported.
*/
-/* HAS_SETGROUPS:
- * This symbol, if defined, indicates that the setgroups() routine is
- * available to set the list of process groups. If unavailable, multiple
- * groups are probably not supported.
- */
/*#define HAS_GETGROUPS /**/
-/*#define HAS_SETGROUPS /**/
/* HAS_GETHOSTENT:
* This symbol, if defined, indicates that the gethostent routine is
@@ -311,81 +245,6 @@
*/
/*#define HAS_GETHOSTENT /**/
-/* HAS_GETHOSTBYADDR:
- * This symbol, if defined, indicates that the gethostbyaddr routine is
- * available to lookup hosts by their IP addresses.
- */
-#define HAS_GETHOSTBYADDR /**/
-
-/* Netdb_host_t:
- * This symbol holds the type used for the 1st argument
- * to gethostbyaddr().
- */
-#define Netdb_host_t char *
-
-/* Netdb_hlen_t:
- * This symbol holds the type used for the 2nd argument
- * to gethostbyaddr().
- */
-#define Netdb_hlen_t int
-
-/* HAS_GETHOSTBYNAME:
- * This symbol, if defined, indicates that the gethostbyname routine is
- * available to lookup hosts by their DNS names.
- */
-#define HAS_GETHOSTBYNAME /**/
-
-/* Netdb_name_t:
- * This symbol holds the type used for the 1st argument
- * to gethostbyname(), the 1st argument to getnetbyname(),
- * the 1st argument to getprotobyname(), the 1st argument to
- * getservbyname(), the 2nd argument to getservbyname(),
- * and the 2nd argument to getservbyport().
- */
-#define Netdb_name_t char *
-
-/* HAS_GETNETBYADDR:
- * This symbol, if defined, indicates that the getnetbyaddr routine is
- * available to lookup networks by their IP addresses.
- */
-/*#define HAS_GETNETBYADDR /**/
-
-/* Netdb_net_t:
- * This symbol holds the type used for the 1st argument
- * to getnetbyaddr().
- */
-#define Netdb_net_t long
-
-/* HAS_GETNETBYNAME:
- * This symbol, if defined, indicates that the getnetbyname routine is
- * available to lookup networks by their names.
- */
-/*#define HAS_GETNETBYNAME /**/
-
-/* HAS_GETPROTOBYNAME:
- * This symbol, if defined, indicates that the getprotobyname routine is
- * available to lookup protocols by their names.
- */
-#define HAS_GETPROTOBYNAME /**/
-
-/* HAS_GETPROTOBYNUMBER:
- * This symbol, if defined, indicates that the getprotobynumber routine is
- * available to lookup protocols by their numbers.
- */
-#define HAS_GETPROTOBYNUMBER /**/
-
-/* HAS_GETSERVBYNAME:
- * This symbol, if defined, indicates that the getservbyname routine is
- * available to lookup services by their names.
- */
-#define HAS_GETSERVBYNAME /**/
-
-/* HAS_GETSERVBYPORT:
- * This symbol, if defined, indicates that the getservbyport routine is
- * available to lookup services by their ports.
- */
-#define HAS_GETSERVBYPORT /**/
-
/* HAS_UNAME:
* This symbol, if defined, indicates that the C program may use the
* uname() routine to derive the host name. See also HAS_GETHOSTNAME
@@ -399,6 +258,24 @@
*/
#define HAS_GETLOGIN /**/
+/* HAS_GETPGID:
+ * This symbol, if defined, indicates to the C program that
+ * the getpgid(pid) function is available to get the
+ * process group id.
+ */
+/*#define HAS_GETPGID /**/
+
+/* HAS_GETPGRP:
+ * This symbol, if defined, indicates that the getpgrp routine is
+ * available to get the current process group.
+ */
+/* USE_BSD_GETPGRP:
+ * This symbol, if defined, indicates that getpgrp needs one
+ * arguments whereas USG one needs none.
+ */
+/*#define HAS_GETPGRP /**/
+/*#define USE_BSD_GETPGRP /**/
+
/* HAS_GETPGRP2:
* This symbol, if defined, indicates that the getpgrp2() (as in DG/UX)
* routine is available to get the current process group.
@@ -442,11 +319,12 @@
#define HAS_NTOHL /**/
#define HAS_NTOHS /**/
-/* HAS_ISASCII:
- * This manifest constant lets the C program know that isascii
- * is available.
+/* HAS_INET_ATON:
+ * This symbol, if defined, indicates to the C program that the
+ * inet_aton() function is available to parse IP address "dotted-quad"
+ * strings.
*/
-#define HAS_ISASCII /**/
+/*#define HAS_INET_ATON /**/
/* HAS_KILLPG:
* This symbol, if defined, indicates that the killpg routine is available
@@ -556,12 +434,6 @@
*/
/*#define HAS_NICE /**/
-/* HAS_OPEN3:
- * This manifest constant lets the C program know that the three
- * argument form of open(2) is available.
- */
-/*#define HAS_OPEN3 /**/
-
/* HAS_PATHCONF:
* This symbol, if defined, indicates that pathconf() is available
* to determine file-system related limits and options associated
@@ -589,16 +461,11 @@
/* HAS_POLL:
* This symbol, if defined, indicates that the poll routine is
- * available to poll active file descriptors.
+ * available to poll active file descriptors. You may safely
+ * include <poll.h> when this symbol is defined.
*/
/*#define HAS_POLL /**/
-/* HAS_PTHREAD_YIELD:
- * This symbol, if defined, indicates that the pthread_yield routine is
- * available to yield the execution of the current thread.
- */
-#undef HAS_PTHREAD_YIELD
-
/* HAS_READDIR:
* This symbol, if defined, indicates that the readdir routine is
* available to read directory entries. You may have to include
@@ -606,12 +473,6 @@
*/
#define HAS_READDIR /**/
-/* HAS_SCHED_YIELD:
- * This symbol, if defined, indicates that the sched_yield
- * routine is available to yield the execution of the current thread.
- */
-#undef HAS_SCHED_YIELD
-
/* HAS_SEEKDIR:
* This symbol, if defined, indicates that the seekdir routine is
* available. You may have to include <dirent.h>. See I_DIRENT.
@@ -650,29 +511,6 @@
*/
#define HAS_RMDIR /**/
-/* HAS_SAFE_BCOPY:
- * This symbol, if defined, indicates that the bcopy routine is available
- * to copy potentially overlapping memory blocks. Otherwise you should
- * probably use memmove() or memcpy(). If neither is defined, roll your
- * own version.
- */
-/*#define HAS_SAFE_BCOPY /**/
-
-/* HAS_SAFE_MEMCPY:
- * This symbol, if defined, indicates that the memcpy routine is available
- * to copy potentially overlapping memory blocks. Otherwise you should
- * probably use memmove() or memcpy(). If neither is defined, roll your
- * own version.
- */
-/*#define HAS_SAFE_MEMCPY /**/
-
-/* HAS_SANE_MEMCMP:
- * This symbol, if defined, indicates that the memcmp routine is available
- * and can be used to compare relative magnitudes of chars with their high
- * bits set. If it is not defined, roll your own version.
- */
-#define HAS_SANE_MEMCMP /**/
-
/* HAS_SELECT:
* This symbol, if defined, indicates that the select routine is
* available to select active file descriptors. If the timeout field
@@ -711,6 +549,24 @@
*/
#define HAS_SETLOCALE /**/
+/* HAS_SETPGID:
+ * This symbol, if defined, indicates that the setpgid(pid, gpid)
+ * routine is available to set process group ID.
+ */
+/*#define HAS_SETPGID /**/
+
+/* HAS_SETPGRP:
+ * This symbol, if defined, indicates that the setpgrp routine is
+ * available to set the current process group.
+ */
+/* USE_BSD_SETPGRP:
+ * This symbol, if defined, indicates that setpgrp needs two
+ * arguments whereas USG one needs none. See also HAS_SETPGID
+ * for a POSIX interface.
+ */
+/*#define HAS_SETPGRP /**/
+/*#define USE_BSD_SETPGRP /**/
+
/* HAS_SETPGRP2:
* This symbol, if defined, indicates that the setpgrp2() (as in DG/UX)
* routine is available to set the current process group.
@@ -787,12 +643,6 @@
#define Shmat_t void * /**/
/*#define HAS_SHMAT_PROTOTYPE /**/
-/* HAS_SIGACTION:
- * This symbol, if defined, indicates that Vr4's sigaction() routine
- * is available.
- */
-/*#define HAS_SIGACTION /**/
-
/* HAS_SOCKET:
* This symbol, if defined, indicates that the BSD socket interface is
* supported.
@@ -810,65 +660,6 @@
*/
/*#define USE_STAT_BLOCKS /**/
-/* USE_STDIO_PTR:
- * This symbol is defined if the _ptr and _cnt fields (or similar)
- * of the stdio FILE structure can be used to access the stdio buffer
- * for a file handle. If this is defined, then the FILE_ptr(fp)
- * and FILE_cnt(fp) macros will also be defined and should be used
- * to access these fields.
- */
-/* FILE_ptr:
- * This macro is used to access the _ptr field (or equivalent) of the
- * FILE structure pointed to by its argument. This macro will always be
- * defined if USE_STDIO_PTR is defined.
- */
-/* STDIO_PTR_LVALUE:
- * This symbol is defined if the FILE_ptr macro can be used as an
- * lvalue.
- */
-/* FILE_cnt:
- * This macro is used to access the _cnt field (or equivalent) of the
- * FILE structure pointed to by its argument. This macro will always be
- * defined if USE_STDIO_PTR is defined.
- */
-/* STDIO_CNT_LVALUE:
- * This symbol is defined if the FILE_cnt macro can be used as an
- * lvalue.
- */
-/* #define USE_STDIO_PTR /**/
-#ifdef USE_STDIO_PTR
-#define FILE_ptr(fp) ((fp)->_ptr)
-#define STDIO_PTR_LVALUE /**/
-#define FILE_cnt(fp) ((fp)->_cnt)
-#define STDIO_CNT_LVALUE /**/
-#endif
-
-/* USE_STDIO_BASE:
- * This symbol is defined if the _base field (or similar) of the
- * stdio FILE structure can be used to access the stdio buffer for
- * a file handle. If this is defined, then the FILE_base(fp) macro
- * will also be defined and should be used to access this field.
- * Also, the FILE_bufsiz(fp) macro will be defined and should be used
- * to determine the number of bytes in the buffer. USE_STDIO_BASE
- * will never be defined unless USE_STDIO_PTR is.
- */
-/* FILE_base:
- * This macro is used to access the _base field (or equivalent) of the
- * FILE structure pointed to by its argument. This macro will always be
- * defined if USE_STDIO_BASE is defined.
- */
-/* FILE_bufsiz:
- * This macro is used to determine the number of bytes in the I/O
- * buffer pointed to by _base field (or equivalent) of the FILE
- * structure pointed to its argument. This macro will always be defined
- * if USE_STDIO_BASE is defined.
- */
-/* #define USE_STDIO_BASE /**/
-#ifdef USE_STDIO_BASE
-#define FILE_base(fp) ((fp)->_base)
-#define FILE_bufsiz(fp) ((fp)->_cnt + (fp)->_ptr - (fp)->_base)
-#endif
-
/* HAS_STRCHR:
* This symbol is defined to indicate that the strchr()/strrchr()
* functions are available for string searching. If not, try the
@@ -1010,14 +801,6 @@
*/
/*#define HAS_VFORK /**/
-/* Signal_t:
- * This symbol's value is either "void" or "int", corresponding to the
- * appropriate return type of a signal handler. Thus, you can declare
- * a signal handler using "Signal_t (*handler)()", and define the
- * handler using "Signal_t handler(sig)".
- */
-#define Signal_t void /* Signal handler's return type */
-
/* HASVOLATILE:
* This symbol, if defined, indicates that this C compiler knows about
* the volatile declaration.
@@ -1027,20 +810,6 @@
#define volatile
#endif
-/* HAS_VPRINTF:
- * This symbol, if defined, indicates that the vprintf routine is available
- * to printf with a pointer to an argument list. If unavailable, you
- * may need to write your own, probably in terms of _doprnt().
- */
-/* USE_CHAR_VSPRINTF:
- * This symbol is defined if this system has vsprintf() returning type
- * (char*). The trend seems to be to declare it as "int vsprintf()". It
- * is up to the package author to declare vsprintf correctly based on the
- * symbol.
- */
-#define HAS_VPRINTF /**/
-/*#define USE_CHAR_VSPRINTF /**/
-
/* HAS_WAIT4:
* This symbol, if defined, indicates that wait4() exists.
*/
@@ -1080,30 +849,16 @@
*/
#define Gid_t gid_t /* Type for getgid(), etc... */
-/* Groups_t:
- * This symbol holds the type used for the second argument to
- * [gs]etgroups(). Usually, this is the same of gidtype, but
- * sometimes it isn't. It can be int, ushort, uid_t, etc...
- * It may be necessary to include <sys/types.h> to get any
- * typedef'ed information. This is only required if you have
- * getgroups() or setgroups().
- */
-#if defined(HAS_GETGROUPS) || defined(HAS_SETGROUPS)
-#define Groups_t gid_t /* Type for 2nd arg to [gs]etgroups() */
-#endif
-
-/* DB_Prefix_t:
- * This symbol 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 u_int32_t.
+/* I_DBM:
+ * This symbol, if defined, indicates that <dbm.h> exists and should
+ * be included.
*/
-/* DB_Hash_t:
- * This symbol 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.
+/* I_RPCSVC_DBM:
+ * This symbol, if defined, indicates that <rpcsvc/dbm.h> exists and
+ * should be included.
*/
-#define DB_Hash_t int /**/
-#define DB_Prefix_t int /**/
+/*#define I_DBM /**/
+#define I_RPCSVC_DBM /**/
/* I_DIRENT:
* This symbol, if defined, indicates to the C program that it should
@@ -1156,6 +911,12 @@
*/
#define I_LIMITS /**/
+/* I_LOCALE:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <locale.h>.
+ */
+#define I_LOCALE /**/
+
/* I_MATH:
* This symbol, if defined, indicates to the C program that it should
* include <math.h>.
@@ -1186,12 +947,6 @@
*/
/*#define I_NETINET_IN /**/
-/* I_NETDB:
- * This symbol, if defined, indicates that <netdb.h> exists and
- * should be included.
- */
-/*#define I_NETDB /**/
-
/* I_PWD:
* This symbol, if defined, indicates to the C program that it should
* include <pwd.h>.
@@ -1228,6 +983,12 @@
/*#define PWEXPIRE /**/
/*#define PWCOMMENT /**/
+/* I_SFIO:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <sfio.h>.
+ */
+/*#define I_SFIO /**/
+
/* I_STDDEF:
* This symbol, if defined, indicates that <stddef.h> exists and should
* be included.
@@ -1288,6 +1049,12 @@
*/
/*#define I_SYS_SELECT /**/
+/* I_SYS_STAT:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <sys/stat.h>.
+ */
+#define I_SYS_STAT /**/
+
/* I_SYS_TIMES:
* This symbol, if defined, indicates to the C program that it should
* include <sys/times.h>.
@@ -1332,22 +1099,6 @@
/*#define I_TERMIOS /**/
/*#define I_SGTTY /**/
-/* I_TIME:
- * This symbol, if defined, indicates to the C program that it should
- * include <time.h>.
- */
-/* I_SYS_TIME:
- * This symbol, if defined, indicates to the C program that it should
- * include <sys/time.h>.
- */
-/* I_SYS_TIME_KERNEL:
- * This symbol, if defined, indicates to the C program that it should
- * include <sys/time.h> with KERNEL defined.
- */
-#define I_TIME /**/
-/*#define I_SYS_TIME /**/
-/*#define I_SYS_TIME_KERNEL /**/
-
/* I_UNISTD:
* This symbol, if defined, indicates to the C program that it should
* include <unistd.h>.
@@ -1360,6 +1111,14 @@
*/
#define I_UTIME /**/
+/* I_VALUES:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <values.h> to get definition of symbols like MINFLOAT or
+ * MAXLONG, i.e. machine dependant limitations. Probably, you
+ * should use <limits.h> instead, if it is available.
+ */
+/*#define I_VALUES /**/
+
/* I_STDARG:
* This symbol, if defined, indicates that <stdarg.h> exists and should
* be included.
@@ -1377,22 +1136,6 @@
*/
/*#define I_VFORK /**/
-/* INTSIZE:
- * This symbol contains the value of sizeof(int) so that the C
- * preprocessor can make decisions based on it.
- */
-/* LONGSIZE:
- * This symbol contains the value of sizeof(long) so that the C
- * preprocessor can make decisions based on it.
- */
-/* SHORTSIZE:
- * This symbol contains the value of sizeof(short) so that the C
- * preprocessor can make decisions based on it.
- */
-#define INTSIZE 4 /**/
-#define LONGSIZE 4 /**/
-#define SHORTSIZE 2 /**/
-
/* Off_t:
* This symbol holds the type used to declare offsets in the kernel.
* It can be int, long, off_t, etc... It may be necessary to include
@@ -1400,6 +1143,21 @@
*/
#define Off_t off_t /* <offset> type */
+/* Free_t:
+ * This variable contains the return type of free(). It is usually
+ * void, but occasionally int.
+ */
+/* Malloc_t:
+ * This symbol is the type of pointer returned by malloc and realloc.
+ */
+#define Malloc_t void * /**/
+#define Free_t void /**/
+
+/* MYMALLOC:
+ * This symbol, if defined, indicates that we're using our own malloc.
+ */
+#define MYMALLOC /**/
+
/* Mode_t:
* This symbol holds the type used to declare file modes
* for systems calls. It is usually mode_t, but may be
@@ -1408,32 +1166,12 @@
*/
#define Mode_t mode_t /* file mode parameter for system calls */
-/* VAL_O_NONBLOCK:
- * This symbol is to be used during open() or fcntl(F_SETFL) to turn on
- * non-blocking I/O for the file descriptor. Note that there is no way
- * back, i.e. you cannot turn it blocking again this way. If you wish to
- * alternatively switch between blocking and non-blocking, use the
- * ioctl(FIOSNBIO) call instead, but that is not supported by all devices.
- */
-/* VAL_EAGAIN:
- * This symbol holds the errno error code set by read() when no data was
- * present on the non-blocking file descriptor.
- */
-/* RD_NODATA:
- * This symbol holds the return code from read() when no data is present
- * on the non-blocking file descriptor. Be careful! If EOF_NONBLOCK is
- * not defined, then you can't distinguish between no data and EOF by
- * issuing a read(). You'll have to find another way to tell for sure!
- */
-/* EOF_NONBLOCK:
- * This symbol, if defined, indicates to the C program that a read() on
- * a non-blocking file descriptor will return 0 on EOF, and not the value
- * held in RD_NODATA (-1 usually, in that case!).
+/* Pid_t:
+ * This symbol holds the type used to declare process ids in the kernel.
+ * It can be int, uint, pid_t, etc... It may be necessary to include
+ * <sys/types.h> to get any typedef'ed information.
*/
-#define VAL_O_NONBLOCK O_NONBLOCK
-#define VAL_EAGAIN EAGAIN
-#define RD_NODATA -1
-#define EOF_NONBLOCK
+#define Pid_t int /* PID type */
/* CAN_PROTOTYPE:
* If defined, this macro indicates that the C compiler can handle
@@ -1453,19 +1191,14 @@
#define _(args) ()
#endif
-/* RANDBITS:
- * This symbol contains the number of bits of random number the rand()
- * function produces. Usual values are 15, 16, and 31.
- */
-#define RANDBITS 15 /**/
-
-/* Select_fd_set_t:
- * This symbol 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(), of course.
+/* SH_PATH:
+ * This symbol contains the full pathname to the shell used on this
+ * 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.
*/
-#define Select_fd_set_t Perl_fd_set * /**/
+#define SH_PATH "cmd /x /c" /**/
/* Size_t:
* This symbol holds the type used to declare length parameters
@@ -1475,16 +1208,6 @@
*/
#define Size_t size_t /* length paramater for string functions */
-/* SSize_t:
- * This symbol holds the type used by functions that return
- * a count of bytes or an error condition. It must be a signed type.
- * It is usually ssize_t, but may be long or int, etc.
- * It may be necessary to include <sys/types.h> or <unistd.h>
- * to get any typedef'ed information.
- * We will pick a type such that sizeof(SSize_t) == sizeof(Size_t).
- */
-#define SSize_t int /* signed count of bytes */
-
/* STDCHAR:
* This symbol is defined to be the type of char used in stdio.h.
* It has the values "unsigned char" or "char".
@@ -1498,39 +1221,41 @@
*/
#define Uid_t uid_t /* UID type */
-/* LOC_SED:
- * This symbol holds the complete pathname to the sed program.
- */
-#define LOC_SED "" /**/
-
-/* OSNAME:
- * This symbol contains the name of the operating system, as determined
- * by Configure. You shouldn't rely on it too much; the specific
- * feature tests from Configure are generally more reliable.
- */
-#define OSNAME "MSWin32" /**/
-
-/* ARCHLIB:
- * This variable, if defined, holds the name of the directory in
- * which the user wants to put architecture-dependent public
- * library files for perl5. It is most often a local directory
- * such as /usr/local/lib. Programs using this variable must be
- * prepared to deal with filename expansion. If ARCHLIB is the
- * same as PRIVLIB, it is not defined, since presumably the
- * program already searches PRIVLIB.
- */
-/* ARCHLIB_EXP:
- * This symbol contains the ~name expanded version of ARCHLIB, to be used
- * in programs that are not prepared to deal with ~ expansion at run-time.
+/* VOIDFLAGS:
+ * This symbol indicates how much support of the void type is given by this
+ * compiler. What various bits mean:
+ *
+ * 1 = supports declaration of void
+ * 2 = supports arrays of pointers to functions returning void
+ * 4 = supports comparisons between pointers to void functions and
+ * addresses of void functions
+ * 8 = suports declaration of generic void pointers
+ *
+ * The package designer should define VOIDUSED to indicate the requirements
+ * of the package. This can be done either by #defining VOIDUSED before
+ * including config.h, or by defining defvoidused in Myinit.U. If the
+ * latter approach is taken, only those flags will be tested. If the
+ * level of void support necessary is not present, defines void to int.
*/
-#define ARCHLIB "c:\\perl\\lib\\MSWin32-x86" /**/
-#define ARCHLIB_EXP (win32_perllib_path(ARCHNAME,NULL)) /**/
+#ifndef VOIDUSED
+#define VOIDUSED 15
+#endif
+#define VOIDFLAGS 15
+#if (VOIDFLAGS & VOIDUSED) != VOIDUSED
+#define void int /* is void to be avoided? */
+#define M_VOID /* Xenix strikes again */
+#endif
-/* BINCOMPAT3:
- * This symbol, if defined, indicates that Perl 5.004 should be
- * binary-compatible with Perl 5.003.
+/* MEM_ALIGNBYTES:
+ * This symbol contains the number of bytes required to align a
+ * double. Usual values are 2, 4 and 8.
+ * On NeXT starting with 3.2, you can build "Fat" Multiple Architecture
+ * Binaries (MAB) for targets with varying alignment. This only matters
+ * for perl, where the config.h can be generated and installed on one
+ * system, and used by a different architecture to build an extension.
+ * The default is eight, for safety.
*/
-/*#define BINCOMPAT3 /**/
+#define MEM_ALIGNBYTES 8 /**/
/* BYTEORDER:
* This symbol holds the hexadecimal constant defined in byteorder,
@@ -1555,39 +1280,32 @@
#endif /* ENDIAN CHECK */
#endif /* NeXT */
-/* CSH:
- * This symbol, if defined, indicates that the C-shell exists.
- * If defined, contains the full pathname of csh.
+/* CASTI32:
+ * This symbol is defined if the C compiler can cast negative
+ * or large floating point numbers to 32-bit ints.
*/
-/*#define CSH "" /**/
+#define CASTI32 /**/
-/* DLSYM_NEEDS_UNDERSCORE:
- * This symbol, if defined, indicates that we need to prepend an
- * underscore to the symbol name before calling dlsym(). This only
- * makes sense if you *have* dlsym, which we will presume is the
- * case if you're using dl_dlopen.xs.
+/* CASTNEGFLOAT:
+ * This symbol is defined if the C compiler can cast negative
+ * numbers to unsigned longs, ints and shorts.
*/
-/*#define DLSYM_NEEDS_UNDERSCORE /**/
-
-/* SETUID_SCRIPTS_ARE_SECURE_NOW:
- * This symbol, if defined, indicates that the bug that prevents
- * setuid scripts from being secure is not present in this kernel.
+/* CASTFLAGS:
+ * This symbol contains flags that say what 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
*/
-/* DOSUID:
- * This symbol, if defined, indicates that the C program should
- * check the script that it is executing for setuid/setgid bits, and
- * attempt to emulate setuid/setgid on systems that have disabled
- * setuid #! scripts because the kernel can't do it securely.
- * It is up to the package designer to make sure that this emulation
- * is done securely. Among other things, it should do an fstat on
- * the script it just opened to make sure it really is a setuid/setgid
- * script, it should make sure the arguments passed correspond exactly
- * to the argument on the #! line, and it should not trust any
- * subprocesses to which it must pass the filename rather than the
- * file descriptor of the script to be executed.
+#define CASTNEGFLOAT /**/
+#define CASTFLAGS 0 /**/
+
+/* VOID_CLOSEDIR:
+ * This symbol, if defined, indicates that the closedir() routine
+ * does not return a value.
*/
-/*#define SETUID_SCRIPTS_ARE_SECURE_NOW /**/
-/*#define DOSUID /**/
+/*#define VOID_CLOSEDIR /**/
/* Gconvert:
* This preprocessor macro is defined to convert a floating point
@@ -1606,68 +1324,51 @@
*/
#define Gconvert(x,n,t,b) sprintf((b),"%.*g",(n),(x))
-/* HAS_GETPGID:
+/* HAS_GNULIBC:
* This symbol, if defined, indicates to the C program that
- * the getpgid(pid) function is available to get the
- * process group id.
- */
-/*#define HAS_GETPGID /**/
-
-/* HAS_GETPGRP:
- * This symbol, if defined, indicates that the getpgrp routine is
- * available to get the current process group.
+ * the GNU C library is being used.
*/
-/* USE_BSD_GETPGRP:
- * This symbol, if defined, indicates that getpgrp needs one
- * arguments whereas USG one needs none.
+/*#define HAS_GNULIBC /**/
+/* HAS_ISASCII:
+ * This manifest constant lets the C program know that isascii
+ * is available.
*/
-/*#define HAS_GETPGRP /**/
-/*#define USE_BSD_GETPGRP /**/
+#define HAS_ISASCII /**/
-/* HAS_INET_ATON:
- * This symbol, if defined, indicates to the C program that the
- * inet_aton() function is available to parse IP address "dotted-quad"
- * strings.
+/* HAS_OPEN3:
+ * This manifest constant lets the C program know that the three
+ * argument form of open(2) is available.
*/
-/*#define HAS_INET_ATON /**/
+/*#define HAS_OPEN3 /**/
-/* HAS_SETPGID:
- * This symbol, if defined, indicates to the C program that
- * the setpgid(pid, gpid) function is available to set the
- * process group id.
+/* HAS_SAFE_BCOPY:
+ * This symbol, if defined, indicates that the bcopy routine is available
+ * to copy potentially overlapping memory blocks. Otherwise you should
+ * probably use memmove() or memcpy(). If neither is defined, roll your
+ * own version.
*/
-/*#define HAS_SETPGID /**/
+/*#define HAS_SAFE_BCOPY /**/
-/* HAS_SETPGRP:
- * This symbol, if defined, indicates that the setpgrp routine is
- * available to set the current process group.
- */
-/* USE_BSD_SETPGRP:
- * This symbol, if defined, indicates that setpgrp needs two
- * arguments whereas USG one needs none. See also HAS_SETPGID
- * for a POSIX interface.
- */
-/* USE_BSDPGRP:
- * This symbol, if defined, indicates that the BSD notion of process
- * group is to be used. For instance, you have to say setpgrp(pid, pgrp)
- * instead of the USG setpgrp(). This should be obsolete since
- * there are systems which have BSD-ish setpgrp but USG-ish getpgrp.
+/* HAS_SAFE_MEMCPY:
+ * This symbol, if defined, indicates that the memcpy routine is available
+ * to copy potentially overlapping memory blocks. Otherwise you should
+ * probably use memmove() or memcpy(). If neither is defined, roll your
+ * own version.
*/
-/*#define HAS_SETPGRP /**/
-/*#define USE_BSD_SETPGRP /**/
-/*#define USE_BSDPGRP /**/
+/*#define HAS_SAFE_MEMCPY /**/
-/* USE_SFIO:
- * This symbol, if defined, indicates that sfio should
- * be used.
+/* HAS_SANE_MEMCMP:
+ * This symbol, if defined, indicates that the memcmp routine is available
+ * and can be used to compare relative magnitudes of chars with their high
+ * bits set. If it is not defined, roll your own version.
*/
-/*#define USE_SFIO /**/
+#define HAS_SANE_MEMCMP /**/
-/* PTHREADS_CREATED_JOINABLE:
- * This symbol, if defined, indicates that pthreads are created
- * in the joinable (aka undetached) state.
+/* HAS_SIGACTION:
+ * This symbol, if defined, indicates that Vr4's sigaction() routine
+ * is available.
*/
-/*#define PTHREADS_CREATED_JOINABLE /**/
+/*#define HAS_SIGACTION /**/
/* Sigjmp_buf:
* This is the buffer type to be used with Sigsetjmp and Siglongjmp.
@@ -1693,78 +1394,236 @@
#define Siglongjmp(buf,retval) longjmp((buf),(retval))
#endif
-/* USE_DYNAMIC_LOADING:
- * This symbol, if defined, indicates that dynamic loading of
- * some sort is available.
+/* USE_STDIO_PTR:
+ * This symbol is defined if the _ptr and _cnt fields (or similar)
+ * of the stdio FILE structure can be used to access the stdio buffer
+ * for a file handle. If this is defined, then the FILE_ptr(fp)
+ * and FILE_cnt(fp) macros will also be defined and should be used
+ * to access these fields.
*/
-#define USE_DYNAMIC_LOADING /**/
+/* FILE_ptr:
+ * This macro is used to access the _ptr field (or equivalent) of the
+ * FILE structure pointed to by its argument. This macro will always be
+ * defined if USE_STDIO_PTR is defined.
+ */
+/* STDIO_PTR_LVALUE:
+ * This symbol is defined if the FILE_ptr macro can be used as an
+ * lvalue.
+ */
+/* FILE_cnt:
+ * This macro is used to access the _cnt field (or equivalent) of the
+ * FILE structure pointed to by its argument. This macro will always be
+ * defined if USE_STDIO_PTR is defined.
+ */
+/* STDIO_CNT_LVALUE:
+ * This symbol is defined if the FILE_cnt macro can be used as an
+ * lvalue.
+ */
+/*#define USE_STDIO_PTR /**/
+#ifdef USE_STDIO_PTR
+#define FILE_ptr(fp) ((fp)->_ptr)
+#define STDIO_PTR_LVALUE /**/
+#define FILE_cnt(fp) ((fp)->_cnt)
+#define STDIO_CNT_LVALUE /**/
+#endif
-/* I_DBM:
- * This symbol, if defined, indicates that <dbm.h> exists and should
- * be included.
+/* USE_STDIO_BASE:
+ * This symbol is defined if the _base field (or similar) of the
+ * stdio FILE structure can be used to access the stdio buffer for
+ * a file handle. If this is defined, then the FILE_base(fp) macro
+ * will also be defined and should be used to access this field.
+ * Also, the FILE_bufsiz(fp) macro will be defined and should be used
+ * to determine the number of bytes in the buffer. USE_STDIO_BASE
+ * will never be defined unless USE_STDIO_PTR is.
*/
-/* I_RPCSVC_DBM:
- * This symbol, if defined, indicates that <rpcsvc/dbm.h> exists and
- * should be included.
+/* FILE_base:
+ * This macro is used to access the _base field (or equivalent) of the
+ * FILE structure pointed to by its argument. This macro will always be
+ * defined if USE_STDIO_BASE is defined.
*/
-/*#define I_DBM /**/
-#define I_RPCSVC_DBM /**/
+/* FILE_bufsiz:
+ * This macro is used to determine the number of bytes in the I/O
+ * buffer pointed to by _base field (or equivalent) of the FILE
+ * structure pointed to its argument. This macro will always be defined
+ * if USE_STDIO_BASE is defined.
+ */
+/*#define USE_STDIO_BASE /**/
+#ifdef USE_STDIO_BASE
+#define FILE_base(fp) ((fp)->_base)
+#define FILE_bufsiz(fp) ((fp)->_cnt + (fp)->_ptr - (fp)->_base)
+#endif
-/* I_LOCALE:
- * This symbol, if defined, indicates to the C program that it should
- * include <locale.h>.
+/* HAS_VPRINTF:
+ * This symbol, if defined, indicates that the vprintf routine is available
+ * to printf with a pointer to an argument list. If unavailable, you
+ * may need to write your own, probably in terms of _doprnt().
*/
-#define I_LOCALE /**/
+/* USE_CHAR_VSPRINTF:
+ * This symbol is defined if this system has vsprintf() returning type
+ * (char*). The trend seems to be to declare it as "int vsprintf()". It
+ * is up to the package author to declare vsprintf correctly based on the
+ * symbol.
+ */
+#define HAS_VPRINTF /**/
+/*#define USE_CHAR_VSPRINTF /**/
-/* I_SFIO:
+/* I_TIME:
* This symbol, if defined, indicates to the C program that it should
- * include <sfio.h>.
+ * include <time.h>.
*/
-/*#define I_SFIO /**/
-
-/* I_SYS_STAT:
+/* I_SYS_TIME:
* This symbol, if defined, indicates to the C program that it should
- * include <sys/stat.h>.
+ * include <sys/time.h>.
*/
-#define I_SYS_STAT /**/
-
-/* I_VALUES:
+/* I_SYS_TIME_KERNEL:
* This symbol, if defined, indicates to the C program that it should
- * include <values.h> to get definition of symbols like MINFLOAT or
- * MAXLONG, i.e. machine dependant limitations. Probably, you
- * should use <limits.h> instead, if it is available.
+ * include <sys/time.h> with KERNEL defined.
*/
-/*#define I_VALUES /**/
+#define I_TIME /**/
+/*#define I_SYS_TIME /**/
+/*#define I_SYS_TIME_KERNEL /**/
-/* Free_t:
- * This variable contains the return type of free(). It is usually
- * void, but occasionally int.
+/* INTSIZE:
+ * This symbol contains the value of sizeof(int) so that the C
+ * preprocessor can make decisions based on it.
*/
-/* Malloc_t:
- * This symbol is the type of pointer returned by malloc and realloc.
+/* LONGSIZE:
+ * This symbol contains the value of sizeof(long) so that the C
+ * preprocessor can make decisions based on it.
*/
-#define Malloc_t void * /**/
-#define Free_t void /**/
+/* SHORTSIZE:
+ * This symbol contains the value of sizeof(short) so that the C
+ * preprocessor can make decisions based on it.
+ */
+#define INTSIZE 4 /**/
+#define LONGSIZE 4 /**/
+#define SHORTSIZE 2 /**/
-/* MYMALLOC:
- * This symbol, if defined, indicates that we're using our own malloc.
+/* VAL_O_NONBLOCK:
+ * This symbol is to be used during open() or fcntl(F_SETFL) to turn on
+ * non-blocking I/O for the file descriptor. Note that there is no way
+ * back, i.e. you cannot turn it blocking again this way. If you wish to
+ * alternatively switch between blocking and non-blocking, use the
+ * ioctl(FIOSNBIO) call instead, but that is not supported by all devices.
*/
-#define MYMALLOC /**/
+/* VAL_EAGAIN:
+ * This symbol holds the errno error code set by read() when no data was
+ * present on the non-blocking file descriptor.
+ */
+/* RD_NODATA:
+ * This symbol holds the return code from read() when no data is present
+ * on the non-blocking file descriptor. Be careful! If EOF_NONBLOCK is
+ * not defined, then you can't distinguish between no data and EOF by
+ * issuing a read(). You'll have to find another way to tell for sure!
+ */
+/* EOF_NONBLOCK:
+ * This symbol, if defined, indicates to the C program that a read() on
+ * a non-blocking file descriptor will return 0 on EOF, and not the value
+ * held in RD_NODATA (-1 usually, in that case!).
+ */
+#define VAL_O_NONBLOCK O_NONBLOCK
+#define VAL_EAGAIN EAGAIN
+#define RD_NODATA -1
+#define EOF_NONBLOCK
-/* OLDARCHLIB:
+/* RANDBITS:
+ * This symbol contains the number of bits of random number the rand()
+ * function produces. Usual values are 15, 16, and 31.
+ */
+#define RANDBITS 15 /**/
+
+/* SSize_t:
+ * This symbol holds the type used by functions that return
+ * a count of bytes or an error condition. It must be a signed type.
+ * It is usually ssize_t, but may be long or int, etc.
+ * It may be necessary to include <sys/types.h> or <unistd.h>
+ * to get any typedef'ed information.
+ * We will pick a type such that sizeof(SSize_t) == sizeof(Size_t).
+ */
+#define SSize_t int /* signed count of bytes */
+
+/* OSNAME:
+ * This symbol contains the name of the operating system, as determined
+ * by Configure. You shouldn't rely on it too much; the specific
+ * feature tests from Configure are generally more reliable.
+ */
+#define OSNAME "MSWin32" /**/
+
+/* ARCHLIB:
* This variable, if defined, holds the name of the directory in
- * which the user has perl5.000 or perl5.001 architecture-dependent
- * public library files for perl5. For the most part, these
- * files will work with 5.002 (and later), but that is not
- * guaranteed.
+ * which the user wants to put architecture-dependent public
+ * library files for perl5. It is most often a local directory
+ * such as /usr/local/lib. Programs using this variable must be
+ * prepared to deal with filename expansion. If ARCHLIB is the
+ * same as PRIVLIB, it is not defined, since presumably the
+ * program already searches PRIVLIB.
*/
-/* OLDARCHLIB_EXP:
- * This symbol contains the ~name expanded version of OLDARCHLIB, to be
- * used in programs that are not prepared to deal with ~ expansion at
- * run-time.
+/* ARCHLIB_EXP:
+ * This symbol contains the ~name expanded version of ARCHLIB, to be used
+ * in programs that are not prepared to deal with ~ expansion at run-time.
*/
-/*#define OLDARCHLIB "" /**/
-/*#define OLDARCHLIB_EXP "" /**/
+#define ARCHLIB "c:\\perl5004.5x\\lib\\MSWin32-x86" /**/
+#define ARCHLIB_EXP (win32_perllib_path(ARCHNAME,NULL)) /**/
+
+/* CAT2:
+ * This macro catenates 2 tokens together.
+ */
+/* STRINGIFY:
+ * This macro surrounds its token with double quotes.
+ */
+#if 42 == 1
+#define CAT2(a,b)a/**/b
+#define STRINGIFY(a)"a"
+ /* If you can get stringification with catify, tell me how! */
+#endif
+#if 42 == 42
+#define CAT2(a,b)a ## b
+#define StGiFy(a)# a
+#define STRINGIFY(a)StGiFy(a)
+#endif
+#if 42 != 1 && 42 != 42
+#include "Bletch: How does this C preprocessor catenate tokens?"
+#endif
+
+/* CSH:
+ * This symbol, if defined, indicates that the C-shell exists.
+ * If defined, contains the full pathname of csh.
+ */
+/*#define CSH "" /**/
+
+/* HAS_SETGROUPS:
+ * This symbol, if defined, indicates that the setgroups() routine is
+ * available to set the list of process groups. If unavailable, multiple
+ * groups are probably not supported.
+ */
+/*#define HAS_SETGROUPS /**/
+
+/* Signal_t:
+ * This symbol's value is either "void" or "int", corresponding to the
+ * appropriate return type of a signal handler. Thus, you can declare
+ * a signal handler using "Signal_t (*handler)()", and define the
+ * handler using "Signal_t handler(sig)".
+ */
+#define Signal_t void /* Signal handler's return type */
+
+/* Groups_t:
+ * This symbol holds the type used for the second argument to
+ * getgroups() and setgropus(). Usually, this is the same as
+ * gidtype (gid_t) , but sometimes it isn't.
+ * It can be int, ushort, uid_t, etc...
+ * It may be necessary to include <sys/types.h> to get any
+ * typedef'ed information. This is only required if you have
+ * getgroups() or setgropus()..
+ */
+#if defined(HAS_GETGROUPS) || defined(HAS_SETGROUPS)
+#define Groups_t gid_t /* Type for 2nd arg to [sg]etgroups() */
+#endif
+
+/* I_NETDB:
+ * This symbol, if defined, indicates that <netdb.h> exists and
+ * should be included.
+ */
+/*#define I_NETDB /**/
/* PRIVLIB:
* This symbol contains the name of the private library for this package.
@@ -1776,18 +1635,9 @@
* This symbol contains the ~name expanded version of PRIVLIB, to be used
* in programs that are not prepared to deal with ~ expansion at run-time.
*/
-#define PRIVLIB "c:\\perl\\lib" /**/
+#define PRIVLIB "c:\\perl5004.5x\\lib" /**/
#define PRIVLIB_EXP (win32_perllib_path(NULL)) /**/
-/* SH_PATH:
- * This symbol contains the full pathname to the shell used on this
- * 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.
- */
-#define SH_PATH "cmd /x /c" /**/
-
/* SIG_NAME:
* This symbol contains a list of signal names in order of
* signal number. This is intended
@@ -1816,8 +1666,8 @@
* The last element is 0, corresponding to the 0 at the end of
* the sig_name list.
*/
-#define SIG_NAME "ZERO","HUP","INT","QUIT","ILL","TRAP","ABRT","EMT","FPE","KILL","BUS","SEGV","SYS","PIPE","ALRM","TERM","USR1","USR2","CHLD","PWR","WINCH","URG","IO","STOP","TSTP","CONT","TTIN","TTOU","VTALRM","PROF","XCPU","XFSZ","WAITING","LWP","FREEZE","THAW","RTMIN","NUM37","NUM38","NUM39","NUM40","NUM41","NUM42","RTMAX","IOT","CLD","POLL",0 /**/
-#define SIG_NUM 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,6,18,22,0 /**/
+#define SIG_NAME "ZERO", "INT", "ILL", "FPE", "SEGV", "TERM", "BREAK", "ABRT", 0 /**/
+#define SIG_NUM 0, 2, 4, 8, 11, 15, 21, 22, 0 /**/
/* SITEARCH:
* This symbol contains the name of the private library for this package.
@@ -1832,7 +1682,7 @@
* This symbol contains the ~name expanded version of SITEARCH, to be used
* in programs that are not prepared to deal with ~ expansion at run-time.
*/
-#define SITEARCH "c:\\perl\\lib\\site\\MSWin32-x86" /**/
+#define SITEARCH "c:\\perl5004.5x\\lib\\site\\MSWin32-x86" /**/
#define SITEARCH_EXP (win32_perllib_path("site",ARCHNAME,NULL)) /**/
/* SITELIB:
@@ -1848,9 +1698,42 @@
* This symbol contains the ~name expanded version of SITELIB, to be used
* in programs that are not prepared to deal with ~ expansion at run-time.
*/
-#define SITELIB "c:\\perl\\lib\\site" /**/
+#define SITELIB "c:\\perl5004.5x\\lib\\site" /**/
#define SITELIB_EXP (win32_perllib_path("site",NULL)) /**/
+/* DLSYM_NEEDS_UNDERSCORE:
+ * This symbol, if defined, indicates that we need to prepend an
+ * underscore to the symbol name before calling dlsym(). This only
+ * makes sense if you *have* dlsym, which we will presume is the
+ * case if you're using dl_dlopen.xs.
+ */
+/*#define DLSYM_NEEDS_UNDERSCORE /**/
+
+/* USE_SFIO:
+ * This symbol, if defined, indicates that sfio should
+ * be used.
+ */
+/*#define USE_SFIO /**/
+
+/* USE_DYNAMIC_LOADING:
+ * This symbol, if defined, indicates that dynamic loading of
+ * some sort is available.
+ */
+#define USE_DYNAMIC_LOADING /**/
+
+/* DB_Prefix_t:
+ * This symbol 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 u_int32_t.
+ */
+/* DB_Hash_t:
+ * This symbol 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.
+ */
+#define DB_Hash_t int /**/
+#define DB_Prefix_t int /**/
+
/* STARTPERL:
* This variable contains the string to put in front of a perl
* script to make sure (one hopes) that it runs with perl and not
@@ -1865,30 +1748,61 @@
*/
/*#define USE_PERLIO /**/
-/* VOIDFLAGS:
- * This symbol indicates how much support of the void type is given by this
- * compiler. What various bits mean:
- *
- * 1 = supports declaration of void
- * 2 = supports arrays of pointers to functions returning void
- * 4 = supports comparisons between pointers to void functions and
- * addresses of void functions
- * 8 = suports declaration of generic void pointers
- *
- * The package designer should define VOIDUSED to indicate the requirements
- * of the package. This can be done either by #defining VOIDUSED before
- * including config.h, or by defining defvoidused in Myinit.U. If the
- * latter approach is taken, only those flags will be tested. If the
- * level of void support necessary is not present, defines void to int.
+/* Netdb_host_t:
+ * This symbol holds the type used for the 1st argument
+ * to gethostbyaddr().
*/
-#ifndef VOIDUSED
-#define VOIDUSED 15
-#endif
-#define VOIDFLAGS 15
-#if (VOIDFLAGS & VOIDUSED) != VOIDUSED
-#define void int /* is void to be avoided? */
-#define M_VOID /* Xenix strikes again */
-#endif
+/* Netdb_hlen_t:
+ * This symbol holds the type used for the 2nd argument
+ * to gethostbyaddr().
+ */
+/* Netdb_name_t:
+ * This symbol holds the type used for the argument to
+ * gethostbyname().
+ */
+/* Netdb_net_t:
+ * This symbol holds the type used for the 1st argument to
+ * getnetbyaddr().
+ */
+#define Netdb_host_t char * /**/
+#define Netdb_hlen_t int /**/
+#define Netdb_name_t char * /**/
+#define Netdb_net_t long /**/
+
+/* Select_fd_set_t:
+ * This symbol 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(), of course.
+ */
+#define Select_fd_set_t Perl_fd_set * /**/
+
+/* ARCHNAME:
+ * This symbol holds a string representing the architecture name.
+ * It may be used to construct an architecture-dependant pathname
+ * where library files may be held under a private library, for
+ * instance.
+ */
+#define ARCHNAME "MSWin32-x86" /**/
+
+/* HAS_PTHREAD_YIELD:
+ * This symbol, if defined, indicates that the pthread_yield
+ * routine is available to yield the execution of the current
+ * thread.
+ */
+/*#define HAS_PTHREAD_YIELD /**/
+
+/* PTHREADS_CREATED_JOINABLE:
+ * This symbol, if defined, indicates that pthreads are created
+ * in the joinable (aka undetached) state.
+ */
+/*#define PTHREADS_CREATED_JOINABLE /**/
+
+/* USE_THREADS:
+ * This symbol, if defined, indicates that Perl should
+ * be built to use threads.
+ */
+/*#define USE_THREADS /**/
#endif
#include <win32.h>
diff --git a/win32/config_H.vc b/win32/config_H.vc
index c3b8dc7e07..87bc9c09dc 100644
--- a/win32/config_H.vc
+++ b/win32/config_H.vc
@@ -7,12 +7,15 @@
* that running config_h.SH again will wipe out any changes you've made.
* For a more permanent change edit config.sh and rerun config_h.SH.
*
- * $Id: Config_h.U,v 3.0.1.4 1995/09/25 09:10:49 ram Exp $
+ * $Id: Config_h.U,v 3.0.1.5 1997/02/28 14:57:43 ram Exp $
*/
-/* Configuration time: undef
- * Configured by: nick
- * Target system:
+/*
+ * Package name : perl5
+ * Source directory : undef
+ * Configuration time: undef
+ * Configured by : gsar
+ * Target system :
*/
#ifndef _config_h_
@@ -25,37 +28,10 @@
#define win32_perllib_path PerlEnv_lib_path
#endif
-
-/* MEM_ALIGNBYTES:
- * This symbol contains the number of bytes required to align a
- * double. Usual values are 2, 4 and 8.
- * On NeXT starting with 3.2, you can build "Fat" Multiple Architecture
- * Binaries (MAB) for targets with varying alignment. This only matters
- * for perl, where the config.h can be generated and installed on one
- * system, and used by a different architecture to build an extension.
- * The default is eight, for safety.
- */
-#ifndef NeXT
-#define MEM_ALIGNBYTES 8 /**/
-#else /* NeXT */
-#ifdef __m68k__
-#define MEM_ALIGNBYTES 2
-#else
-#ifdef __i386__
-#define MEM_ALIGNBYTES 4
-#else /* __hppa__, __sparc__ and default for unknown architectures */
-#define MEM_ALIGNBYTES 8
-#endif /* __i386__ */
-#endif /* __m68k__ */
-#endif /* NeXT */
-
-/* ARCHNAME:
- * This symbol holds a string representing the architecture name.
- * It may be used to construct an architecture-dependant pathname
- * where library files may be held under a private library, for
- * instance.
+/* LOC_SED:
+ * This symbol holds the complete pathname to the sed program.
*/
-#define ARCHNAME "MSWin32-x86" /**/
+#define LOC_SED "" /**/
/* BIN:
* This symbol holds the path of the bin directory where the package will
@@ -68,36 +44,6 @@
#define BIN "c:\\perl5004.5x\\bin" /**/
#define BIN_EXP "c:\\perl5004.5x\\bin" /**/
-/* CAT2:
- * This macro catenates 2 tokens together.
- */
-/* STRINGIFY:
- * This macro surrounds its token with double quotes.
- */
-#if 42 == 1
-#define CAT2(a,b)a/**/b
-#define CAT3(a,b,c)a/**/b/**/c
-#define CAT4(a,b,c,d)a/**/b/**/c/**/d
-#define CAT5(a,b,c,d,e)a/**/b/**/c/**/d/**/e
-#define STRINGIFY(a)"a"
- /* If you can get stringification with catify, tell me how! */
-#endif
-#if 42 == 42
-#define CAT2(a,b)a ## b
-#define CAT3(a,b,c)a ## b ## c
-#define CAT4(a,b,c,d)a ## b ## c ## d
-#define CAT5(a,b,c,d,e)a ## b ## c ## d ## e
-#define StGiFy(a)# a
-#define STRINGIFY(a)StGiFy(a)
-#define SCAT2(a,b)StGiFy(a) StGiFy(b)
-#define SCAT3(a,b,c)StGiFy(a) StGiFy(b) StGiFy(c)
-#define SCAT4(a,b,c,d)StGiFy(a) StGiFy(b) StGiFy(c) StGiFy(d)
-#define SCAT5(a,b,c,d,e)StGiFy(a) StGiFy(b) StGiFy(c) StGiFy(d) StGiFy(e)
-#endif
-#ifndef CAT2
-#include "Bletch: How does this C preprocessor catenate tokens?"
-#endif
-
/* CPPSTDIN:
* This symbol contains the first part of the string which will invoke
* the C preprocessor on the standard input and produce to standard
@@ -146,27 +92,6 @@
*/
/*#define HAS_BZERO /**/
-/* CASTI32:
- * This symbol is defined if the C compiler can cast negative
- * or large floating point numbers to 32-bit ints.
- */
-#define CASTI32 /**/
-
-/* CASTNEGFLOAT:
- * This symbol is defined if the C compiler can cast negative
- * numbers to unsigned longs, ints and shorts.
- */
-/* CASTFLAGS:
- * This symbol contains flags that say what 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
- */
-#define CASTNEGFLOAT /**/
-#define CASTFLAGS 0 /**/
-
/* HAS_CHOWN:
* This symbol, if defined, indicates that the chown routine is
* available.
@@ -185,12 +110,6 @@
*/
#define HAS_CHSIZE /**/
-/* VOID_CLOSEDIR:
- * This symbol, if defined, indicates that the closedir() routine
- * does not return a value.
- */
-/*#define VOID_CLOSEDIR /**/
-
/* HASCONST:
* This symbol, if defined, indicates that this C compiler knows about
* the const type. There is no need to actually test for that symbol
@@ -235,6 +154,26 @@
*/
#define HAS_DLERROR /**/
+/* SETUID_SCRIPTS_ARE_SECURE_NOW:
+ * This symbol, if defined, indicates that the bug that prevents
+ * setuid scripts from being secure is not present in this kernel.
+ */
+/* DOSUID:
+ * This symbol, if defined, indicates that the C program should
+ * check the script that it is executing for setuid/setgid bits, and
+ * attempt to emulate setuid/setgid on systems that have disabled
+ * setuid #! scripts because the kernel can't do it securely.
+ * It is up to the package designer to make sure that this emulation
+ * is done securely. Among other things, it should do an fstat on
+ * the script it just opened to make sure it really is a setuid/setgid
+ * script, it should make sure the arguments passed correspond exactly
+ * to the argument on the #! line, and it should not trust any
+ * subprocesses to which it must pass the filename rather than the
+ * file descriptor of the script to be executed.
+ */
+/*#define SETUID_SCRIPTS_ARE_SECURE_NOW /**/
+/*#define DOSUID /**/
+
/* HAS_DUP2:
* This symbol, if defined, indicates that the dup2 routine is
* available to duplicate file descriptors.
@@ -305,13 +244,7 @@
* available to get the list of process groups. If unavailable, multiple
* groups are probably not supported.
*/
-/* HAS_SETGROUPS:
- * This symbol, if defined, indicates that the setgroups() routine is
- * available to set the list of process groups. If unavailable, multiple
- * groups are probably not supported.
- */
/*#define HAS_GETGROUPS /**/
-/*#define HAS_SETGROUPS /**/
/* HAS_GETHOSTENT:
* This symbol, if defined, indicates that the gethostent routine is
@@ -319,81 +252,6 @@
*/
/*#define HAS_GETHOSTENT /**/
-/* HAS_GETHOSTBYADDR:
- * This symbol, if defined, indicates that the gethostbyaddr routine is
- * available to lookup hosts by their IP addresses.
- */
-#define HAS_GETHOSTBYADDR /**/
-
-/* Netdb_host_t:
- * This symbol holds the type used for the 1st argument
- * to gethostbyaddr().
- */
-#define Netdb_host_t char *
-
-/* Netdb_hlen_t:
- * This symbol holds the type used for the 2nd argument
- * to gethostbyaddr().
- */
-#define Netdb_hlen_t int
-
-/* HAS_GETHOSTBYNAME:
- * This symbol, if defined, indicates that the gethostbyname routine is
- * available to lookup hosts by their DNS names.
- */
-#define HAS_GETHOSTBYNAME /**/
-
-/* Netdb_name_t:
- * This symbol holds the type used for the 1st argument
- * to gethostbyname(), the 1st argument to getnetbyname(),
- * the 1st argument to getprotobyname(), the 1st argument to
- * getservbyname(), the 2nd argument to getservbyname(),
- * and the 2nd argument to getservbyport().
- */
-#define Netdb_name_t char *
-
-/* HAS_GETNETBYADDR:
- * This symbol, if defined, indicates that the getnetbyaddr routine is
- * available to lookup networks by their IP addresses.
- */
-/*#define HAS_GETNETBYADDR /**/
-
-/* Netdb_net_t:
- * This symbol holds the type used for the 1st argument
- * to getnetbyaddr().
- */
-#define Netdb_net_t long
-
-/* HAS_GETNETBYNAME:
- * This symbol, if defined, indicates that the getnetbyname routine is
- * available to lookup networks by their names.
- */
-/*#define HAS_GETNETBYNAME /**/
-
-/* HAS_GETPROTOBYNAME:
- * This symbol, if defined, indicates that the getprotobyname routine is
- * available to lookup protocols by their names.
- */
-#define HAS_GETPROTOBYNAME /**/
-
-/* HAS_GETPROTOBYNUMBER:
- * This symbol, if defined, indicates that the getprotobynumber routine is
- * available to lookup protocols by their numbers.
- */
-#define HAS_GETPROTOBYNUMBER /**/
-
-/* HAS_GETSERVBYNAME:
- * This symbol, if defined, indicates that the getservbyname routine is
- * available to lookup services by their names.
- */
-#define HAS_GETSERVBYNAME /**/
-
-/* HAS_GETSERVBYPORT:
- * This symbol, if defined, indicates that the getservbyport routine is
- * available to lookup services by their ports.
- */
-#define HAS_GETSERVBYPORT /**/
-
/* HAS_UNAME:
* This symbol, if defined, indicates that the C program may use the
* uname() routine to derive the host name. See also HAS_GETHOSTNAME
@@ -407,6 +265,24 @@
*/
#define HAS_GETLOGIN /**/
+/* HAS_GETPGID:
+ * This symbol, if defined, indicates to the C program that
+ * the getpgid(pid) function is available to get the
+ * process group id.
+ */
+/*#define HAS_GETPGID /**/
+
+/* HAS_GETPGRP:
+ * This symbol, if defined, indicates that the getpgrp routine is
+ * available to get the current process group.
+ */
+/* USE_BSD_GETPGRP:
+ * This symbol, if defined, indicates that getpgrp needs one
+ * arguments whereas USG one needs none.
+ */
+/*#define HAS_GETPGRP /**/
+/*#define USE_BSD_GETPGRP /**/
+
/* HAS_GETPGRP2:
* This symbol, if defined, indicates that the getpgrp2() (as in DG/UX)
* routine is available to get the current process group.
@@ -450,11 +326,12 @@
#define HAS_NTOHL /**/
#define HAS_NTOHS /**/
-/* HAS_ISASCII:
- * This manifest constant lets the C program know that isascii
- * is available.
+/* HAS_INET_ATON:
+ * This symbol, if defined, indicates to the C program that the
+ * inet_aton() function is available to parse IP address "dotted-quad"
+ * strings.
*/
-#define HAS_ISASCII /**/
+/*#define HAS_INET_ATON /**/
/* HAS_KILLPG:
* This symbol, if defined, indicates that the killpg routine is available
@@ -564,12 +441,6 @@
*/
/*#define HAS_NICE /**/
-/* HAS_OPEN3:
- * This manifest constant lets the C program know that the three
- * argument form of open(2) is available.
- */
-/*#define HAS_OPEN3 /**/
-
/* HAS_PATHCONF:
* This symbol, if defined, indicates that pathconf() is available
* to determine file-system related limits and options associated
@@ -597,16 +468,11 @@
/* HAS_POLL:
* This symbol, if defined, indicates that the poll routine is
- * available to poll active file descriptors.
+ * available to poll active file descriptors. You may safely
+ * include <poll.h> when this symbol is defined.
*/
/*#define HAS_POLL /**/
-/* HAS_PTHREAD_YIELD:
- * This symbol, if defined, indicates that the pthread_yield routine is
- * available to yield the execution of the current thread.
- */
-#undef HAS_PTHREAD_YIELD
-
/* HAS_READDIR:
* This symbol, if defined, indicates that the readdir routine is
* available to read directory entries. You may have to include
@@ -614,12 +480,6 @@
*/
#define HAS_READDIR /**/
-/* HAS_SCHED_YIELD:
- * This symbol, if defined, indicates that the sched_yield
- * routine is available to yield the execution of the current thread.
- */
-#undef HAS_SCHED_YIELD
-
/* HAS_SEEKDIR:
* This symbol, if defined, indicates that the seekdir routine is
* available. You may have to include <dirent.h>. See I_DIRENT.
@@ -658,29 +518,6 @@
*/
#define HAS_RMDIR /**/
-/* HAS_SAFE_BCOPY:
- * This symbol, if defined, indicates that the bcopy routine is available
- * to copy potentially overlapping memory blocks. Otherwise you should
- * probably use memmove() or memcpy(). If neither is defined, roll your
- * own version.
- */
-/*#define HAS_SAFE_BCOPY /**/
-
-/* HAS_SAFE_MEMCPY:
- * This symbol, if defined, indicates that the memcpy routine is available
- * to copy potentially overlapping memory blocks. Otherwise you should
- * probably use memmove() or memcpy(). If neither is defined, roll your
- * own version.
- */
-/*#define HAS_SAFE_MEMCPY /**/
-
-/* HAS_SANE_MEMCMP:
- * This symbol, if defined, indicates that the memcmp routine is available
- * and can be used to compare relative magnitudes of chars with their high
- * bits set. If it is not defined, roll your own version.
- */
-#define HAS_SANE_MEMCMP /**/
-
/* HAS_SELECT:
* This symbol, if defined, indicates that the select routine is
* available to select active file descriptors. If the timeout field
@@ -719,6 +556,24 @@
*/
#define HAS_SETLOCALE /**/
+/* HAS_SETPGID:
+ * This symbol, if defined, indicates that the setpgid(pid, gpid)
+ * routine is available to set process group ID.
+ */
+/*#define HAS_SETPGID /**/
+
+/* HAS_SETPGRP:
+ * This symbol, if defined, indicates that the setpgrp routine is
+ * available to set the current process group.
+ */
+/* USE_BSD_SETPGRP:
+ * This symbol, if defined, indicates that setpgrp needs two
+ * arguments whereas USG one needs none. See also HAS_SETPGID
+ * for a POSIX interface.
+ */
+/*#define HAS_SETPGRP /**/
+/*#define USE_BSD_SETPGRP /**/
+
/* HAS_SETPGRP2:
* This symbol, if defined, indicates that the setpgrp2() (as in DG/UX)
* routine is available to set the current process group.
@@ -795,12 +650,6 @@
#define Shmat_t void * /**/
/*#define HAS_SHMAT_PROTOTYPE /**/
-/* HAS_SIGACTION:
- * This symbol, if defined, indicates that Vr4's sigaction() routine
- * is available.
- */
-/*#define HAS_SIGACTION /**/
-
/* HAS_SOCKET:
* This symbol, if defined, indicates that the BSD socket interface is
* supported.
@@ -818,65 +667,6 @@
*/
/*#define USE_STAT_BLOCKS /**/
-/* USE_STDIO_PTR:
- * This symbol is defined if the _ptr and _cnt fields (or similar)
- * of the stdio FILE structure can be used to access the stdio buffer
- * for a file handle. If this is defined, then the FILE_ptr(fp)
- * and FILE_cnt(fp) macros will also be defined and should be used
- * to access these fields.
- */
-/* FILE_ptr:
- * This macro is used to access the _ptr field (or equivalent) of the
- * FILE structure pointed to by its argument. This macro will always be
- * defined if USE_STDIO_PTR is defined.
- */
-/* STDIO_PTR_LVALUE:
- * This symbol is defined if the FILE_ptr macro can be used as an
- * lvalue.
- */
-/* FILE_cnt:
- * This macro is used to access the _cnt field (or equivalent) of the
- * FILE structure pointed to by its argument. This macro will always be
- * defined if USE_STDIO_PTR is defined.
- */
-/* STDIO_CNT_LVALUE:
- * This symbol is defined if the FILE_cnt macro can be used as an
- * lvalue.
- */
-#define USE_STDIO_PTR /**/
-#ifdef USE_STDIO_PTR
-#define FILE_ptr(fp) ((fp)->_ptr)
-#define STDIO_PTR_LVALUE /**/
-#define FILE_cnt(fp) ((fp)->_cnt)
-#define STDIO_CNT_LVALUE /**/
-#endif
-
-/* USE_STDIO_BASE:
- * This symbol is defined if the _base field (or similar) of the
- * stdio FILE structure can be used to access the stdio buffer for
- * a file handle. If this is defined, then the FILE_base(fp) macro
- * will also be defined and should be used to access this field.
- * Also, the FILE_bufsiz(fp) macro will be defined and should be used
- * to determine the number of bytes in the buffer. USE_STDIO_BASE
- * will never be defined unless USE_STDIO_PTR is.
- */
-/* FILE_base:
- * This macro is used to access the _base field (or equivalent) of the
- * FILE structure pointed to by its argument. This macro will always be
- * defined if USE_STDIO_BASE is defined.
- */
-/* FILE_bufsiz:
- * This macro is used to determine the number of bytes in the I/O
- * buffer pointed to by _base field (or equivalent) of the FILE
- * structure pointed to its argument. This macro will always be defined
- * if USE_STDIO_BASE is defined.
- */
-#define USE_STDIO_BASE /**/
-#ifdef USE_STDIO_BASE
-#define FILE_base(fp) ((fp)->_base)
-#define FILE_bufsiz(fp) ((fp)->_cnt + (fp)->_ptr - (fp)->_base)
-#endif
-
/* HAS_STRCHR:
* This symbol is defined to indicate that the strchr()/strrchr()
* functions are available for string searching. If not, try the
@@ -1018,14 +808,6 @@
*/
/*#define HAS_VFORK /**/
-/* Signal_t:
- * This symbol's value is either "void" or "int", corresponding to the
- * appropriate return type of a signal handler. Thus, you can declare
- * a signal handler using "Signal_t (*handler)()", and define the
- * handler using "Signal_t handler(sig)".
- */
-#define Signal_t void /* Signal handler's return type */
-
/* HASVOLATILE:
* This symbol, if defined, indicates that this C compiler knows about
* the volatile declaration.
@@ -1035,20 +817,6 @@
#define volatile
#endif
-/* HAS_VPRINTF:
- * This symbol, if defined, indicates that the vprintf routine is available
- * to printf with a pointer to an argument list. If unavailable, you
- * may need to write your own, probably in terms of _doprnt().
- */
-/* USE_CHAR_VSPRINTF:
- * This symbol is defined if this system has vsprintf() returning type
- * (char*). The trend seems to be to declare it as "int vsprintf()". It
- * is up to the package author to declare vsprintf correctly based on the
- * symbol.
- */
-#define HAS_VPRINTF /**/
-/*#define USE_CHAR_VSPRINTF /**/
-
/* HAS_WAIT4:
* This symbol, if defined, indicates that wait4() exists.
*/
@@ -1088,30 +856,16 @@
*/
#define Gid_t gid_t /* Type for getgid(), etc... */
-/* Groups_t:
- * This symbol holds the type used for the second argument to
- * [gs]etgroups(). Usually, this is the same of gidtype, but
- * sometimes it isn't. It can be int, ushort, uid_t, etc...
- * It may be necessary to include <sys/types.h> to get any
- * typedef'ed information. This is only required if you have
- * getgroups() or setgroups().
- */
-#if defined(HAS_GETGROUPS) || defined(HAS_SETGROUPS)
-#define Groups_t gid_t /* Type for 2nd arg to [gs]etgroups() */
-#endif
-
-/* DB_Prefix_t:
- * This symbol 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 u_int32_t.
+/* I_DBM:
+ * This symbol, if defined, indicates that <dbm.h> exists and should
+ * be included.
*/
-/* DB_Hash_t:
- * This symbol 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.
+/* I_RPCSVC_DBM:
+ * This symbol, if defined, indicates that <rpcsvc/dbm.h> exists and
+ * should be included.
*/
-#define DB_Hash_t int /**/
-#define DB_Prefix_t int /**/
+/*#define I_DBM /**/
+#define I_RPCSVC_DBM /**/
/* I_DIRENT:
* This symbol, if defined, indicates to the C program that it should
@@ -1164,6 +918,12 @@
*/
#define I_LIMITS /**/
+/* I_LOCALE:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <locale.h>.
+ */
+#define I_LOCALE /**/
+
/* I_MATH:
* This symbol, if defined, indicates to the C program that it should
* include <math.h>.
@@ -1194,12 +954,6 @@
*/
/*#define I_NETINET_IN /**/
-/* I_NETDB:
- * This symbol, if defined, indicates that <netdb.h> exists and
- * should be included.
- */
-/*#define I_NETDB /**/
-
/* I_PWD:
* This symbol, if defined, indicates to the C program that it should
* include <pwd.h>.
@@ -1236,6 +990,12 @@
/*#define PWEXPIRE /**/
/*#define PWCOMMENT /**/
+/* I_SFIO:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <sfio.h>.
+ */
+/*#define I_SFIO /**/
+
/* I_STDDEF:
* This symbol, if defined, indicates that <stddef.h> exists and should
* be included.
@@ -1296,6 +1056,12 @@
*/
/*#define I_SYS_SELECT /**/
+/* I_SYS_STAT:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <sys/stat.h>.
+ */
+#define I_SYS_STAT /**/
+
/* I_SYS_TIMES:
* This symbol, if defined, indicates to the C program that it should
* include <sys/times.h>.
@@ -1340,22 +1106,6 @@
/*#define I_TERMIOS /**/
/*#define I_SGTTY /**/
-/* I_TIME:
- * This symbol, if defined, indicates to the C program that it should
- * include <time.h>.
- */
-/* I_SYS_TIME:
- * This symbol, if defined, indicates to the C program that it should
- * include <sys/time.h>.
- */
-/* I_SYS_TIME_KERNEL:
- * This symbol, if defined, indicates to the C program that it should
- * include <sys/time.h> with KERNEL defined.
- */
-#define I_TIME /**/
-/*#define I_SYS_TIME /**/
-/*#define I_SYS_TIME_KERNEL /**/
-
/* I_UNISTD:
* This symbol, if defined, indicates to the C program that it should
* include <unistd.h>.
@@ -1368,6 +1118,14 @@
*/
#define I_UTIME /**/
+/* I_VALUES:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <values.h> to get definition of symbols like MINFLOAT or
+ * MAXLONG, i.e. machine dependant limitations. Probably, you
+ * should use <limits.h> instead, if it is available.
+ */
+/*#define I_VALUES /**/
+
/* I_STDARG:
* This symbol, if defined, indicates that <stdarg.h> exists and should
* be included.
@@ -1385,22 +1143,6 @@
*/
/*#define I_VFORK /**/
-/* INTSIZE:
- * This symbol contains the value of sizeof(int) so that the C
- * preprocessor can make decisions based on it.
- */
-/* LONGSIZE:
- * This symbol contains the value of sizeof(long) so that the C
- * preprocessor can make decisions based on it.
- */
-/* SHORTSIZE:
- * This symbol contains the value of sizeof(short) so that the C
- * preprocessor can make decisions based on it.
- */
-#define INTSIZE 4 /**/
-#define LONGSIZE 4 /**/
-#define SHORTSIZE 2 /**/
-
/* Off_t:
* This symbol holds the type used to declare offsets in the kernel.
* It can be int, long, off_t, etc... It may be necessary to include
@@ -1408,6 +1150,21 @@
*/
#define Off_t off_t /* <offset> type */
+/* Free_t:
+ * This variable contains the return type of free(). It is usually
+ * void, but occasionally int.
+ */
+/* Malloc_t:
+ * This symbol is the type of pointer returned by malloc and realloc.
+ */
+#define Malloc_t void * /**/
+#define Free_t void /**/
+
+/* MYMALLOC:
+ * This symbol, if defined, indicates that we're using our own malloc.
+ */
+#define MYMALLOC /**/
+
/* Mode_t:
* This symbol holds the type used to declare file modes
* for systems calls. It is usually mode_t, but may be
@@ -1416,32 +1173,12 @@
*/
#define Mode_t mode_t /* file mode parameter for system calls */
-/* VAL_O_NONBLOCK:
- * This symbol is to be used during open() or fcntl(F_SETFL) to turn on
- * non-blocking I/O for the file descriptor. Note that there is no way
- * back, i.e. you cannot turn it blocking again this way. If you wish to
- * alternatively switch between blocking and non-blocking, use the
- * ioctl(FIOSNBIO) call instead, but that is not supported by all devices.
- */
-/* VAL_EAGAIN:
- * This symbol holds the errno error code set by read() when no data was
- * present on the non-blocking file descriptor.
- */
-/* RD_NODATA:
- * This symbol holds the return code from read() when no data is present
- * on the non-blocking file descriptor. Be careful! If EOF_NONBLOCK is
- * not defined, then you can't distinguish between no data and EOF by
- * issuing a read(). You'll have to find another way to tell for sure!
- */
-/* EOF_NONBLOCK:
- * This symbol, if defined, indicates to the C program that a read() on
- * a non-blocking file descriptor will return 0 on EOF, and not the value
- * held in RD_NODATA (-1 usually, in that case!).
+/* Pid_t:
+ * This symbol holds the type used to declare process ids in the kernel.
+ * It can be int, uint, pid_t, etc... It may be necessary to include
+ * <sys/types.h> to get any typedef'ed information.
*/
-#define VAL_O_NONBLOCK O_NONBLOCK
-#define VAL_EAGAIN EAGAIN
-#define RD_NODATA -1
-#define EOF_NONBLOCK
+#define Pid_t int /* PID type */
/* CAN_PROTOTYPE:
* If defined, this macro indicates that the C compiler can handle
@@ -1461,19 +1198,14 @@
#define _(args) ()
#endif
-/* RANDBITS:
- * This symbol contains the number of bits of random number the rand()
- * function produces. Usual values are 15, 16, and 31.
- */
-#define RANDBITS 15 /**/
-
-/* Select_fd_set_t:
- * This symbol 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(), of course.
+/* SH_PATH:
+ * This symbol contains the full pathname to the shell used on this
+ * 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.
*/
-#define Select_fd_set_t Perl_fd_set * /**/
+#define SH_PATH "cmd /x /c" /**/
/* Size_t:
* This symbol holds the type used to declare length parameters
@@ -1483,16 +1215,6 @@
*/
#define Size_t size_t /* length paramater for string functions */
-/* SSize_t:
- * This symbol holds the type used by functions that return
- * a count of bytes or an error condition. It must be a signed type.
- * It is usually ssize_t, but may be long or int, etc.
- * It may be necessary to include <sys/types.h> or <unistd.h>
- * to get any typedef'ed information.
- * We will pick a type such that sizeof(SSize_t) == sizeof(Size_t).
- */
-#define SSize_t int /* signed count of bytes */
-
/* STDCHAR:
* This symbol is defined to be the type of char used in stdio.h.
* It has the values "unsigned char" or "char".
@@ -1506,39 +1228,41 @@
*/
#define Uid_t uid_t /* UID type */
-/* LOC_SED:
- * This symbol holds the complete pathname to the sed program.
- */
-#define LOC_SED "" /**/
-
-/* OSNAME:
- * This symbol contains the name of the operating system, as determined
- * by Configure. You shouldn't rely on it too much; the specific
- * feature tests from Configure are generally more reliable.
- */
-#define OSNAME "MSWin32" /**/
-
-/* ARCHLIB:
- * This variable, if defined, holds the name of the directory in
- * which the user wants to put architecture-dependent public
- * library files for perl5. It is most often a local directory
- * such as /usr/local/lib. Programs using this variable must be
- * prepared to deal with filename expansion. If ARCHLIB is the
- * same as PRIVLIB, it is not defined, since presumably the
- * program already searches PRIVLIB.
- */
-/* ARCHLIB_EXP:
- * This symbol contains the ~name expanded version of ARCHLIB, to be used
- * in programs that are not prepared to deal with ~ expansion at run-time.
+/* VOIDFLAGS:
+ * This symbol indicates how much support of the void type is given by this
+ * compiler. What various bits mean:
+ *
+ * 1 = supports declaration of void
+ * 2 = supports arrays of pointers to functions returning void
+ * 4 = supports comparisons between pointers to void functions and
+ * addresses of void functions
+ * 8 = suports declaration of generic void pointers
+ *
+ * The package designer should define VOIDUSED to indicate the requirements
+ * of the package. This can be done either by #defining VOIDUSED before
+ * including config.h, or by defining defvoidused in Myinit.U. If the
+ * latter approach is taken, only those flags will be tested. If the
+ * level of void support necessary is not present, defines void to int.
*/
-#define ARCHLIB "c:\\perl\\lib\\MSWin32-x86" /**/
-#define ARCHLIB_EXP (win32_perllib_path(ARCHNAME,NULL)) /**/
+#ifndef VOIDUSED
+#define VOIDUSED 15
+#endif
+#define VOIDFLAGS 15
+#if (VOIDFLAGS & VOIDUSED) != VOIDUSED
+#define void int /* is void to be avoided? */
+#define M_VOID /* Xenix strikes again */
+#endif
-/* BINCOMPAT3:
- * This symbol, if defined, indicates that Perl 5.004 should be
- * binary-compatible with Perl 5.003.
+/* MEM_ALIGNBYTES:
+ * This symbol contains the number of bytes required to align a
+ * double. Usual values are 2, 4 and 8.
+ * On NeXT starting with 3.2, you can build "Fat" Multiple Architecture
+ * Binaries (MAB) for targets with varying alignment. This only matters
+ * for perl, where the config.h can be generated and installed on one
+ * system, and used by a different architecture to build an extension.
+ * The default is eight, for safety.
*/
-/*#define BINCOMPAT3 /**/
+#define MEM_ALIGNBYTES 8 /**/
/* BYTEORDER:
* This symbol holds the hexadecimal constant defined in byteorder,
@@ -1563,39 +1287,32 @@
#endif /* ENDIAN CHECK */
#endif /* NeXT */
-/* CSH:
- * This symbol, if defined, indicates that the C-shell exists.
- * If defined, contains the full pathname of csh.
+/* CASTI32:
+ * This symbol is defined if the C compiler can cast negative
+ * or large floating point numbers to 32-bit ints.
*/
-/*#define CSH "" /**/
+#define CASTI32 /**/
-/* DLSYM_NEEDS_UNDERSCORE:
- * This symbol, if defined, indicates that we need to prepend an
- * underscore to the symbol name before calling dlsym(). This only
- * makes sense if you *have* dlsym, which we will presume is the
- * case if you're using dl_dlopen.xs.
+/* CASTNEGFLOAT:
+ * This symbol is defined if the C compiler can cast negative
+ * numbers to unsigned longs, ints and shorts.
*/
-/*#define DLSYM_NEEDS_UNDERSCORE /**/
-
-/* SETUID_SCRIPTS_ARE_SECURE_NOW:
- * This symbol, if defined, indicates that the bug that prevents
- * setuid scripts from being secure is not present in this kernel.
+/* CASTFLAGS:
+ * This symbol contains flags that say what 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
*/
-/* DOSUID:
- * This symbol, if defined, indicates that the C program should
- * check the script that it is executing for setuid/setgid bits, and
- * attempt to emulate setuid/setgid on systems that have disabled
- * setuid #! scripts because the kernel can't do it securely.
- * It is up to the package designer to make sure that this emulation
- * is done securely. Among other things, it should do an fstat on
- * the script it just opened to make sure it really is a setuid/setgid
- * script, it should make sure the arguments passed correspond exactly
- * to the argument on the #! line, and it should not trust any
- * subprocesses to which it must pass the filename rather than the
- * file descriptor of the script to be executed.
+#define CASTNEGFLOAT /**/
+#define CASTFLAGS 0 /**/
+
+/* VOID_CLOSEDIR:
+ * This symbol, if defined, indicates that the closedir() routine
+ * does not return a value.
*/
-/*#define SETUID_SCRIPTS_ARE_SECURE_NOW /**/
-/*#define DOSUID /**/
+/*#define VOID_CLOSEDIR /**/
/* Gconvert:
* This preprocessor macro is defined to convert a floating point
@@ -1614,68 +1331,51 @@
*/
#define Gconvert(x,n,t,b) sprintf((b),"%.*g",(n),(x))
-/* HAS_GETPGID:
+/* HAS_GNULIBC:
* This symbol, if defined, indicates to the C program that
- * the getpgid(pid) function is available to get the
- * process group id.
- */
-/*#define HAS_GETPGID /**/
-
-/* HAS_GETPGRP:
- * This symbol, if defined, indicates that the getpgrp routine is
- * available to get the current process group.
+ * the GNU C library is being used.
*/
-/* USE_BSD_GETPGRP:
- * This symbol, if defined, indicates that getpgrp needs one
- * arguments whereas USG one needs none.
+/*#define HAS_GNULIBC /**/
+/* HAS_ISASCII:
+ * This manifest constant lets the C program know that isascii
+ * is available.
*/
-/*#define HAS_GETPGRP /**/
-/*#define USE_BSD_GETPGRP /**/
+#define HAS_ISASCII /**/
-/* HAS_INET_ATON:
- * This symbol, if defined, indicates to the C program that the
- * inet_aton() function is available to parse IP address "dotted-quad"
- * strings.
+/* HAS_OPEN3:
+ * This manifest constant lets the C program know that the three
+ * argument form of open(2) is available.
*/
-/*#define HAS_INET_ATON /**/
+/*#define HAS_OPEN3 /**/
-/* HAS_SETPGID:
- * This symbol, if defined, indicates to the C program that
- * the setpgid(pid, gpid) function is available to set the
- * process group id.
+/* HAS_SAFE_BCOPY:
+ * This symbol, if defined, indicates that the bcopy routine is available
+ * to copy potentially overlapping memory blocks. Otherwise you should
+ * probably use memmove() or memcpy(). If neither is defined, roll your
+ * own version.
*/
-/*#define HAS_SETPGID /**/
+/*#define HAS_SAFE_BCOPY /**/
-/* HAS_SETPGRP:
- * This symbol, if defined, indicates that the setpgrp routine is
- * available to set the current process group.
- */
-/* USE_BSD_SETPGRP:
- * This symbol, if defined, indicates that setpgrp needs two
- * arguments whereas USG one needs none. See also HAS_SETPGID
- * for a POSIX interface.
- */
-/* USE_BSDPGRP:
- * This symbol, if defined, indicates that the BSD notion of process
- * group is to be used. For instance, you have to say setpgrp(pid, pgrp)
- * instead of the USG setpgrp(). This should be obsolete since
- * there are systems which have BSD-ish setpgrp but USG-ish getpgrp.
+/* HAS_SAFE_MEMCPY:
+ * This symbol, if defined, indicates that the memcpy routine is available
+ * to copy potentially overlapping memory blocks. Otherwise you should
+ * probably use memmove() or memcpy(). If neither is defined, roll your
+ * own version.
*/
-/*#define HAS_SETPGRP /**/
-/*#define USE_BSD_SETPGRP /**/
-/*#define USE_BSDPGRP /**/
+/*#define HAS_SAFE_MEMCPY /**/
-/* USE_SFIO:
- * This symbol, if defined, indicates that sfio should
- * be used.
+/* HAS_SANE_MEMCMP:
+ * This symbol, if defined, indicates that the memcmp routine is available
+ * and can be used to compare relative magnitudes of chars with their high
+ * bits set. If it is not defined, roll your own version.
*/
-/*#define USE_SFIO /**/
+#define HAS_SANE_MEMCMP /**/
-/* PTHREADS_CREATED_JOINABLE:
- * This symbol, if defined, indicates that pthreads are created
- * in the joinable (aka undetached) state.
+/* HAS_SIGACTION:
+ * This symbol, if defined, indicates that Vr4's sigaction() routine
+ * is available.
*/
-/*#define PTHREADS_CREATED_JOINABLE /**/
+/*#define HAS_SIGACTION /**/
/* Sigjmp_buf:
* This is the buffer type to be used with Sigsetjmp and Siglongjmp.
@@ -1701,80 +1401,236 @@
#define Siglongjmp(buf,retval) longjmp((buf),(retval))
#endif
-/* USE_DYNAMIC_LOADING:
- * This symbol, if defined, indicates that dynamic loading of
- * some sort is available.
+/* USE_STDIO_PTR:
+ * This symbol is defined if the _ptr and _cnt fields (or similar)
+ * of the stdio FILE structure can be used to access the stdio buffer
+ * for a file handle. If this is defined, then the FILE_ptr(fp)
+ * and FILE_cnt(fp) macros will also be defined and should be used
+ * to access these fields.
*/
-#define USE_DYNAMIC_LOADING /**/
+/* FILE_ptr:
+ * This macro is used to access the _ptr field (or equivalent) of the
+ * FILE structure pointed to by its argument. This macro will always be
+ * defined if USE_STDIO_PTR is defined.
+ */
+/* STDIO_PTR_LVALUE:
+ * This symbol is defined if the FILE_ptr macro can be used as an
+ * lvalue.
+ */
+/* FILE_cnt:
+ * This macro is used to access the _cnt field (or equivalent) of the
+ * FILE structure pointed to by its argument. This macro will always be
+ * defined if USE_STDIO_PTR is defined.
+ */
+/* STDIO_CNT_LVALUE:
+ * This symbol is defined if the FILE_cnt macro can be used as an
+ * lvalue.
+ */
+#define USE_STDIO_PTR /**/
+#ifdef USE_STDIO_PTR
+#define FILE_ptr(fp) ((fp)->_ptr)
+#define STDIO_PTR_LVALUE /**/
+#define FILE_cnt(fp) ((fp)->_cnt)
+#define STDIO_CNT_LVALUE /**/
+#endif
-/* I_DBM:
- * This symbol, if defined, indicates that <dbm.h> exists and should
- * be included.
+/* USE_STDIO_BASE:
+ * This symbol is defined if the _base field (or similar) of the
+ * stdio FILE structure can be used to access the stdio buffer for
+ * a file handle. If this is defined, then the FILE_base(fp) macro
+ * will also be defined and should be used to access this field.
+ * Also, the FILE_bufsiz(fp) macro will be defined and should be used
+ * to determine the number of bytes in the buffer. USE_STDIO_BASE
+ * will never be defined unless USE_STDIO_PTR is.
*/
-/* I_RPCSVC_DBM:
- * This symbol, if defined, indicates that <rpcsvc/dbm.h> exists and
- * should be included.
+/* FILE_base:
+ * This macro is used to access the _base field (or equivalent) of the
+ * FILE structure pointed to by its argument. This macro will always be
+ * defined if USE_STDIO_BASE is defined.
*/
-/*#define I_DBM /**/
-#define I_RPCSVC_DBM /**/
+/* FILE_bufsiz:
+ * This macro is used to determine the number of bytes in the I/O
+ * buffer pointed to by _base field (or equivalent) of the FILE
+ * structure pointed to its argument. This macro will always be defined
+ * if USE_STDIO_BASE is defined.
+ */
+#define USE_STDIO_BASE /**/
+#ifdef USE_STDIO_BASE
+#define FILE_base(fp) ((fp)->_base)
+#define FILE_bufsiz(fp) ((fp)->_cnt + (fp)->_ptr - (fp)->_base)
+#endif
-/* I_LOCALE:
- * This symbol, if defined, indicates to the C program that it should
- * include <locale.h>.
+/* HAS_VPRINTF:
+ * This symbol, if defined, indicates that the vprintf routine is available
+ * to printf with a pointer to an argument list. If unavailable, you
+ * may need to write your own, probably in terms of _doprnt().
*/
-#define I_LOCALE /**/
+/* USE_CHAR_VSPRINTF:
+ * This symbol is defined if this system has vsprintf() returning type
+ * (char*). The trend seems to be to declare it as "int vsprintf()". It
+ * is up to the package author to declare vsprintf correctly based on the
+ * symbol.
+ */
+#define HAS_VPRINTF /**/
+/*#define USE_CHAR_VSPRINTF /**/
-/* I_SFIO:
+/* I_TIME:
* This symbol, if defined, indicates to the C program that it should
- * include <sfio.h>.
+ * include <time.h>.
*/
-/*#define I_SFIO /**/
-
-/* I_SYS_STAT:
+/* I_SYS_TIME:
* This symbol, if defined, indicates to the C program that it should
- * include <sys/stat.h>.
+ * include <sys/time.h>.
*/
-#define I_SYS_STAT /**/
-
-/* I_VALUES:
+/* I_SYS_TIME_KERNEL:
* This symbol, if defined, indicates to the C program that it should
- * include <values.h> to get definition of symbols like MINFLOAT or
- * MAXLONG, i.e. machine dependant limitations. Probably, you
- * should use <limits.h> instead, if it is available.
+ * include <sys/time.h> with KERNEL defined.
*/
-/*#define I_VALUES /**/
+#define I_TIME /**/
+/*#define I_SYS_TIME /**/
+/*#define I_SYS_TIME_KERNEL /**/
-/* Free_t:
- * This variable contains the return type of free(). It is usually
- * void, but occasionally int.
+/* INTSIZE:
+ * This symbol contains the value of sizeof(int) so that the C
+ * preprocessor can make decisions based on it.
*/
-/* Malloc_t:
- * This symbol is the type of pointer returned by malloc and realloc.
+/* LONGSIZE:
+ * This symbol contains the value of sizeof(long) so that the C
+ * preprocessor can make decisions based on it.
*/
-#define Malloc_t void * /**/
-#define Free_t void /**/
+/* SHORTSIZE:
+ * This symbol contains the value of sizeof(short) so that the C
+ * preprocessor can make decisions based on it.
+ */
+#define INTSIZE 4 /**/
+#define LONGSIZE 4 /**/
+#define SHORTSIZE 2 /**/
-/* MYMALLOC:
- * This symbol, if defined, indicates that we're using our own malloc.
+/* VAL_O_NONBLOCK:
+ * This symbol is to be used during open() or fcntl(F_SETFL) to turn on
+ * non-blocking I/O for the file descriptor. Note that there is no way
+ * back, i.e. you cannot turn it blocking again this way. If you wish to
+ * alternatively switch between blocking and non-blocking, use the
+ * ioctl(FIOSNBIO) call instead, but that is not supported by all devices.
*/
-#ifndef PERL_OBJECT
-#define MYMALLOC /**/
-#endif
+/* VAL_EAGAIN:
+ * This symbol holds the errno error code set by read() when no data was
+ * present on the non-blocking file descriptor.
+ */
+/* RD_NODATA:
+ * This symbol holds the return code from read() when no data is present
+ * on the non-blocking file descriptor. Be careful! If EOF_NONBLOCK is
+ * not defined, then you can't distinguish between no data and EOF by
+ * issuing a read(). You'll have to find another way to tell for sure!
+ */
+/* EOF_NONBLOCK:
+ * This symbol, if defined, indicates to the C program that a read() on
+ * a non-blocking file descriptor will return 0 on EOF, and not the value
+ * held in RD_NODATA (-1 usually, in that case!).
+ */
+#define VAL_O_NONBLOCK O_NONBLOCK
+#define VAL_EAGAIN EAGAIN
+#define RD_NODATA -1
+#define EOF_NONBLOCK
+
+/* RANDBITS:
+ * This symbol contains the number of bits of random number the rand()
+ * function produces. Usual values are 15, 16, and 31.
+ */
+#define RANDBITS 15 /**/
+
+/* SSize_t:
+ * This symbol holds the type used by functions that return
+ * a count of bytes or an error condition. It must be a signed type.
+ * It is usually ssize_t, but may be long or int, etc.
+ * It may be necessary to include <sys/types.h> or <unistd.h>
+ * to get any typedef'ed information.
+ * We will pick a type such that sizeof(SSize_t) == sizeof(Size_t).
+ */
+#define SSize_t int /* signed count of bytes */
-/* OLDARCHLIB:
+/* OSNAME:
+ * This symbol contains the name of the operating system, as determined
+ * by Configure. You shouldn't rely on it too much; the specific
+ * feature tests from Configure are generally more reliable.
+ */
+#define OSNAME "MSWin32" /**/
+
+/* ARCHLIB:
* This variable, if defined, holds the name of the directory in
- * which the user has perl5.000 or perl5.001 architecture-dependent
- * public library files for perl5. For the most part, these
- * files will work with 5.002 (and later), but that is not
- * guaranteed.
+ * which the user wants to put architecture-dependent public
+ * library files for perl5. It is most often a local directory
+ * such as /usr/local/lib. Programs using this variable must be
+ * prepared to deal with filename expansion. If ARCHLIB is the
+ * same as PRIVLIB, it is not defined, since presumably the
+ * program already searches PRIVLIB.
+ */
+/* ARCHLIB_EXP:
+ * This symbol contains the ~name expanded version of ARCHLIB, to be used
+ * in programs that are not prepared to deal with ~ expansion at run-time.
+ */
+#define ARCHLIB "c:\\perl5004.5x\\lib\\MSWin32-x86" /**/
+#define ARCHLIB_EXP (win32_perllib_path(ARCHNAME,NULL)) /**/
+
+/* CAT2:
+ * This macro catenates 2 tokens together.
+ */
+/* STRINGIFY:
+ * This macro surrounds its token with double quotes.
+ */
+#if 42 == 1
+#define CAT2(a,b)a/**/b
+#define STRINGIFY(a)"a"
+ /* If you can get stringification with catify, tell me how! */
+#endif
+#if 42 == 42
+#define CAT2(a,b)a ## b
+#define StGiFy(a)# a
+#define STRINGIFY(a)StGiFy(a)
+#endif
+#if 42 != 1 && 42 != 42
+#include "Bletch: How does this C preprocessor catenate tokens?"
+#endif
+
+/* CSH:
+ * This symbol, if defined, indicates that the C-shell exists.
+ * If defined, contains the full pathname of csh.
*/
-/* OLDARCHLIB_EXP:
- * This symbol contains the ~name expanded version of OLDARCHLIB, to be
- * used in programs that are not prepared to deal with ~ expansion at
- * run-time.
+/*#define CSH "" /**/
+
+/* HAS_SETGROUPS:
+ * This symbol, if defined, indicates that the setgroups() routine is
+ * available to set the list of process groups. If unavailable, multiple
+ * groups are probably not supported.
*/
-/*#define OLDARCHLIB "" /**/
-/*#define OLDARCHLIB_EXP "" /**/
+/*#define HAS_SETGROUPS /**/
+
+/* Signal_t:
+ * This symbol's value is either "void" or "int", corresponding to the
+ * appropriate return type of a signal handler. Thus, you can declare
+ * a signal handler using "Signal_t (*handler)()", and define the
+ * handler using "Signal_t handler(sig)".
+ */
+#define Signal_t void /* Signal handler's return type */
+
+/* Groups_t:
+ * This symbol holds the type used for the second argument to
+ * getgroups() and setgropus(). Usually, this is the same as
+ * gidtype (gid_t) , but sometimes it isn't.
+ * It can be int, ushort, uid_t, etc...
+ * It may be necessary to include <sys/types.h> to get any
+ * typedef'ed information. This is only required if you have
+ * getgroups() or setgropus()..
+ */
+#if defined(HAS_GETGROUPS) || defined(HAS_SETGROUPS)
+#define Groups_t gid_t /* Type for 2nd arg to [sg]etgroups() */
+#endif
+
+/* I_NETDB:
+ * This symbol, if defined, indicates that <netdb.h> exists and
+ * should be included.
+ */
+/*#define I_NETDB /**/
/* PRIVLIB:
* This symbol contains the name of the private library for this package.
@@ -1789,15 +1645,6 @@
#define PRIVLIB "c:\\perl5004.5x\\lib" /**/
#define PRIVLIB_EXP (win32_perllib_path(NULL)) /**/
-/* SH_PATH:
- * This symbol contains the full pathname to the shell used on this
- * 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.
- */
-#define SH_PATH "cmd /x /c" /**/
-
/* SIG_NAME:
* This symbol contains a list of signal names in order of
* signal number. This is intended
@@ -1826,8 +1673,8 @@
* The last element is 0, corresponding to the 0 at the end of
* the sig_name list.
*/
-#define SIG_NAME "ZERO","HUP","INT","QUIT","ILL","TRAP","ABRT","EMT","FPE","KILL","BUS","SEGV","SYS","PIPE","ALRM","TERM","USR1","USR2","CHLD","PWR","WINCH","URG","IO","STOP","TSTP","CONT","TTIN","TTOU","VTALRM","PROF","XCPU","XFSZ","WAITING","LWP","FREEZE","THAW","RTMIN","NUM37","NUM38","NUM39","NUM40","NUM41","NUM42","RTMAX","IOT","CLD","POLL",0 /**/
-#define SIG_NUM 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,6,18,22,0 /**/
+#define SIG_NAME "ZERO", "INT", "ILL", "FPE", "SEGV", "TERM", "BREAK", "ABRT", 0 /**/
+#define SIG_NUM 0, 2, 4, 8, 11, 15, 21, 22, 0 /**/
/* SITEARCH:
* This symbol contains the name of the private library for this package.
@@ -1842,7 +1689,7 @@
* This symbol contains the ~name expanded version of SITEARCH, to be used
* in programs that are not prepared to deal with ~ expansion at run-time.
*/
-#define SITEARCH "c:\\perl\\lib\\site\\MSWin32-x86" /**/
+#define SITEARCH "c:\\perl5004.5x\\lib\\site\\MSWin32-x86" /**/
#define SITEARCH_EXP (win32_perllib_path("site",ARCHNAME,NULL)) /**/
/* SITELIB:
@@ -1861,6 +1708,39 @@
#define SITELIB "c:\\perl5004.5x\\lib\\site" /**/
#define SITELIB_EXP (win32_perllib_path("site",NULL)) /**/
+/* DLSYM_NEEDS_UNDERSCORE:
+ * This symbol, if defined, indicates that we need to prepend an
+ * underscore to the symbol name before calling dlsym(). This only
+ * makes sense if you *have* dlsym, which we will presume is the
+ * case if you're using dl_dlopen.xs.
+ */
+/*#define DLSYM_NEEDS_UNDERSCORE /**/
+
+/* USE_SFIO:
+ * This symbol, if defined, indicates that sfio should
+ * be used.
+ */
+/*#define USE_SFIO /**/
+
+/* USE_DYNAMIC_LOADING:
+ * This symbol, if defined, indicates that dynamic loading of
+ * some sort is available.
+ */
+#define USE_DYNAMIC_LOADING /**/
+
+/* DB_Prefix_t:
+ * This symbol 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 u_int32_t.
+ */
+/* DB_Hash_t:
+ * This symbol 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.
+ */
+#define DB_Hash_t int /**/
+#define DB_Prefix_t int /**/
+
/* STARTPERL:
* This variable contains the string to put in front of a perl
* script to make sure (one hopes) that it runs with perl and not
@@ -1875,30 +1755,61 @@
*/
/*#define USE_PERLIO /**/
-/* VOIDFLAGS:
- * This symbol indicates how much support of the void type is given by this
- * compiler. What various bits mean:
- *
- * 1 = supports declaration of void
- * 2 = supports arrays of pointers to functions returning void
- * 4 = supports comparisons between pointers to void functions and
- * addresses of void functions
- * 8 = suports declaration of generic void pointers
- *
- * The package designer should define VOIDUSED to indicate the requirements
- * of the package. This can be done either by #defining VOIDUSED before
- * including config.h, or by defining defvoidused in Myinit.U. If the
- * latter approach is taken, only those flags will be tested. If the
- * level of void support necessary is not present, defines void to int.
+/* Netdb_host_t:
+ * This symbol holds the type used for the 1st argument
+ * to gethostbyaddr().
*/
-#ifndef VOIDUSED
-#define VOIDUSED 15
-#endif
-#define VOIDFLAGS 15
-#if (VOIDFLAGS & VOIDUSED) != VOIDUSED
-#define void int /* is void to be avoided? */
-#define M_VOID /* Xenix strikes again */
-#endif
+/* Netdb_hlen_t:
+ * This symbol holds the type used for the 2nd argument
+ * to gethostbyaddr().
+ */
+/* Netdb_name_t:
+ * This symbol holds the type used for the argument to
+ * gethostbyname().
+ */
+/* Netdb_net_t:
+ * This symbol holds the type used for the 1st argument to
+ * getnetbyaddr().
+ */
+#define Netdb_host_t char * /**/
+#define Netdb_hlen_t int /**/
+#define Netdb_name_t char * /**/
+#define Netdb_net_t long /**/
+
+/* Select_fd_set_t:
+ * This symbol 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(), of course.
+ */
+#define Select_fd_set_t Perl_fd_set * /**/
+
+/* ARCHNAME:
+ * This symbol holds a string representing the architecture name.
+ * It may be used to construct an architecture-dependant pathname
+ * where library files may be held under a private library, for
+ * instance.
+ */
+#define ARCHNAME "MSWin32-x86" /**/
+
+/* HAS_PTHREAD_YIELD:
+ * This symbol, if defined, indicates that the pthread_yield
+ * routine is available to yield the execution of the current
+ * thread.
+ */
+/*#define HAS_PTHREAD_YIELD /**/
+
+/* PTHREADS_CREATED_JOINABLE:
+ * This symbol, if defined, indicates that pthreads are created
+ * in the joinable (aka undetached) state.
+ */
+/*#define PTHREADS_CREATED_JOINABLE /**/
+
+/* USE_THREADS:
+ * This symbol, if defined, indicates that Perl should
+ * be built to use threads.
+ */
+/*#define USE_THREADS /**/
#endif
#include <win32.h>
diff --git a/win32/config_h.PL b/win32/config_h.PL
index 8a1665a75a..471c43c7e1 100644
--- a/win32/config_h.PL
+++ b/win32/config_h.PL
@@ -69,7 +69,7 @@ if (compare("$file.new",$file))
chmod(0666,$file);
unlink($file);
rename("$file.new",$file);
- chmod(0444,$file);
+ #chmod(0444,$file);
exit(1);
}
diff --git a/win32/makedef.pl b/win32/makedef.pl
index fcccdcce5a..07dfa04942 100644
--- a/win32/makedef.pl
+++ b/win32/makedef.pl
@@ -27,6 +27,7 @@ open(CFG,'config.h') || die "Cannot open config.h:$!";
while (<CFG>)
{
$define{$1} = 1 if /^\s*#\s*define\s+(MYMALLOC)\b/;
+ $define{$1} = 1 if /^\s*#\s*define\s+(USE_THREADS)\b/;
}
close(CFG);
@@ -248,6 +249,7 @@ unless ($define{'USE_THREADS'})
Perl_condpair_magic
Perl_thr_key
Perl_sv_mutex
+Perl_svref_mutex
Perl_malloc_mutex
Perl_eval_mutex
Perl_eval_cond
diff --git a/win32/makefile.mk b/win32/makefile.mk
index 5aceb31794..d027ce5b2d 100644
--- a/win32/makefile.mk
+++ b/win32/makefile.mk
@@ -17,7 +17,7 @@ INST_TOP *= $(INST_DRV)\perl5004.5x
#
# uncomment to enable threads-capabilities
-#USE_THREADS *= -DUSE_THREADS
+USE_THREADS *= define
#
# uncomment one
@@ -45,6 +45,13 @@ CCTYPE *= BORLAND
#CRYPT_LIB *= des_fcrypt.lib
#
+# set this if you wish to use perl's malloc
+# WARNING: Turning this on/off WILL break binary compatibility with extensions
+# you may have compiled with/without it. Be prepared to recompile all extensions
+# if you change the default.
+PERL_MALLOC *= define
+
+#
# set the install locations of the compiler include/libraries
#CCHOME *= f:\msdev\vc
CCHOME *= C:\bc5
@@ -71,19 +78,26 @@ D_CRYPT=define
CRYPT_FLAG=-DHAVE_DES_FCRYPT
.ENDIF
-BUILDOPT *= $(USE_THREADS)
-#BUILDOPT *= $(USE_THREADS) -DMULTIPLICITY
-#BUILDOPT *= $(USE_THREADS) -DPERL_GLOBAL_STRUCT -DMULTIPLICITY
+.IF "$(PERL_MALLOC)" == ""
+PERL_MALLOC *= undef
+.ENDIF
+
+#BUILDOPT *= -DMULTIPLICITY
+#BUILDOPT *= -DPERL_GLOBAL_STRUCT -DMULTIPLICITY
# -DUSE_PERLIO -D__STDC__=1 -DUSE_SFIO -DI_SFIO -I\sfio97\include
+.IF "$(USE_THREADS)" == ""
+USE_THREADS = undef
+.ENDIF
+
.IMPORT .IGNORE : PROCESSOR_ARCHITECTURE
PROCESSOR_ARCHITECTURE *= x86
-.IF "$(USE_THREADS)" == ""
-ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)
-.ELSE
+.IF "$(USE_THREADS)" == "define"
ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-thread
+.ELSE
+ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)
.ENDIF
ARCHDIR = ..\lib\$(ARCHNAME)
@@ -296,7 +310,6 @@ CFGH_TMPL = config_H.gc
.ELSE
-MAKE = nmake -nologo
CFGSH_TMPL = config.vc
CFGH_TMPL = config_H.vc
PERL95EXE=..\perl95.exe
@@ -312,12 +325,18 @@ NOOP=@echo
CRYPT_OBJ=$(CRYPT_SRC:db:+$(o))
.ENDIF
+.IF "$(PERL_MALLOC)" == "define"
+MALLOC_SRC = ..\malloc.c
+MALLOC_OBJ = ..\malloc$(o)
+.ENDIF
+
#
# filenames given to xsubpp must have forward slashes (since it puts
# full pathnames in #line strings)
XSUBPP=..\$(MINIPERL) -I..\..\lib ..\$(EXTUTILSDIR)\xsubpp -C++ -prototypes
CORE_C= ..\av.c \
+ ..\byterun.c \
..\deb.c \
..\doio.c \
..\doop.c \
@@ -343,10 +362,11 @@ CORE_C= ..\av.c \
..\toke.c \
..\universal.c \
..\util.c \
- ..\malloc.c \
+ $(MALLOC_SRC) \
$(CRYPT_SRC)
CORE_OBJ= ..\av$(o) \
+ ..\byterun$(o) \
..\deb$(o) \
..\doio$(o) \
..\doop$(o) \
@@ -372,7 +392,7 @@ CORE_OBJ= ..\av$(o) \
..\toke$(o) \
..\universal$(o)\
..\util$(o) \
- ..\malloc$(o) \
+ $(MALLOC_OBJ) \
$(CRYPT_OBJ)
WIN32_C = perllib.c \
@@ -398,6 +418,8 @@ X2P_OBJ = ..\x2p\a2p$(o) \
..\x2p\walk$(o)
CORE_H = ..\av.h \
+ ..\byterun.h \
+ ..\bytecode.h \
..\cop.h \
..\cv.h \
..\dosish.h \
@@ -472,6 +494,24 @@ POD2MAN=$(PODDIR)\pod2man
POD2LATEX=$(PODDIR)\pod2latex
POD2TEXT=$(PODDIR)\pod2text
+CFG_VARS= "INST_DRV=$(INST_DRV)" \
+ "INST_TOP=$(INST_TOP)" \
+ "archname=$(ARCHNAME)" \
+ "cc=$(CC)" \
+ "ccflags=$(OPTIMIZE) $(DEFINES)" \
+ "cf_email=$(EMAIL)" \
+ "d_crypt=$(D_CRYPT)" \
+ "d_mymalloc=$(PERL_MALLOC)" \
+ "libs=$(LIBFILES:f)" \
+ "incpath=$(CCINCDIR)" \
+ "libpth=$(strip $(CCLIBDIR) $(LIBFILES:d))" \
+ "libc=$(LIBC)" \
+ "static_ext=$(STATIC_EXT)" \
+ "dynamic_ext=$(DYNAMIC_EXT)" \
+ "usethreads=$(USE_THREADS)" \
+ "LINK_FLAGS=$(LINK_FLAGS)" \
+ "optimize=$(OPTIMIZE)"
+
#
# Top targets
#
@@ -507,23 +547,19 @@ config.w32 : $(CFGSH_TMPL)
copy $(CFGH_TMPL) config.h
..\config.sh : config.w32 $(MINIPERL) config_sh.PL
- $(MINIPERL) -I..\lib config_sh.PL \
- "INST_DRV=$(INST_DRV)" \
- "INST_TOP=$(INST_TOP)" \
- "archname=$(ARCHNAME)" \
- "cc=$(CC)" \
- "ccflags=$(OPTIMIZE) $(DEFINES)" \
- "cf_email=$(EMAIL)" \
- "d_crypt=$(D_CRYPT)" \
- "libs=$(LIBFILES:f)" \
- "incpath=$(CCINCDIR)" \
- "libpth=$(strip $(CCLIBDIR) $(LIBFILES:d))" \
- "libc=$(LIBC)" \
- "static_ext=$(STATIC_EXT)" \
- "dynamic_ext=$(DYNAMIC_EXT)" \
- "LINK_FLAGS=$(LINK_FLAGS)" \
- "optimize=$(OPTIMIZE)" \
- config.w32 > ..\config.sh
+ $(MINIPERL) -I..\lib config_sh.PL $(CFG_VARS) config.w32 > ..\config.sh
+
+# this target is for when changes to the main config.sh happen
+# edit config.{b,v,g}c and make this target once for each supported
+# compiler (e.g. `dmake CCTYPE=BORLAND regen_config_h`)
+regen_config_h:
+ perl config_sh.PL $(CFG_VARS) $(CFGSH_TMPL) > ..\config.sh
+ -cd .. && del /f perl.exe
+ cd .. && perl configpm
+ -del /f $(CFGH_TMPL)
+ -mkdir ..\lib\CORE
+ -perl -I..\lib config_h.PL
+ rename config.h $(CFGH_TMPL)
$(CONFIGPM) : $(MINIPERL) ..\config.sh config_h.PL ..\minimod.pl
cd .. && miniperl configpm
@@ -531,8 +567,7 @@ $(CONFIGPM) : $(MINIPERL) ..\config.sh config_h.PL ..\minimod.pl
$(XCOPY) ..\*.h $(COREDIR)\*.*
$(XCOPY) *.h $(COREDIR)\*.*
$(RCOPY) include $(COREDIR)\*.*
- $(MINIPERL) -I..\lib config_h.PL || $(MAKE) CCTYPE=$(CCTYPE) \
- CFG=$(CFG) $(CONFIGPM)
+ $(MINIPERL) -I..\lib config_h.PL || $(MAKE) $(MAKEMACROS) $(CONFIGPM)
LKPRE = INPUT (
LKPOST = )
diff --git a/win32/win32.c b/win32/win32.c
index fe38c1e2ae..54ce3990ab 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -716,9 +716,13 @@ getlogin(void)
return (char*)NULL;
}
-/*
- * pretended kill
- */
+int
+chown(const char *path, uid_t owner, gid_t group)
+{
+ /* XXX noop */
+ return 0;
+}
+
int
kill(int pid, int sig)
{
@@ -734,7 +738,7 @@ kill(int pid, int sig)
}
return 0;
}
-
+
/*
* File system stuff
*/
diff --git a/win32/win32.h b/win32/win32.h
index 35eeaba612..a502978201 100644
--- a/win32/win32.h
+++ b/win32/win32.h
@@ -169,6 +169,7 @@ extern int setgid(gid_t gid);
extern int kill(int pid, int sig);
extern void *sbrk(int need);
extern char * getlogin(void);
+extern int chown(const char *p, uid_t o, gid_t g);
#undef Stat
#define Stat win32_stat
diff --git a/x2p/Makefile.SH b/x2p/Makefile.SH
index dea2392ec4..bf7495a39b 100755
--- a/x2p/Makefile.SH
+++ b/x2p/Makefile.SH
@@ -46,13 +46,12 @@ $make_set_make
# grrr
SHELL = $sh
-# These variables will be used in a future version to make
-# the make file more portable to non-unix systems.
+# These variables may need to be manually set for non-Unix systems.
AR = $ar
-EXE_EXT = $exe_ext
-LIB_EXT = $lib_ext
-OBJ_EXT = $obj_ext
-PATH_SEP = $path_sep
+EXE_EXT = $_ext
+LIB_EXT = $_a
+OBJ_EXT = $_o
+PATH_SEP = $p_
FIRSTMAKEFILE = $firstmakefile