summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMalcolm Beattie <mbeattie@sable.ox.ac.uk>1998-04-02 15:25:18 +0000
committerMalcolm Beattie <mbeattie@sable.ox.ac.uk>1998-04-02 15:25:18 +0000
commitdc45a647708b6c5442e1362e6b6e7a2583c30346 (patch)
tree77eb71f3ede3b243141f6874d47e94606370b5f1
parent67ce88566282df78bad77aeb9c4b93768bda70aa (diff)
downloadperl-dc45a647708b6c5442e1362e6b6e7a2583c30346.tar.gz
Andy Dougherty's configuration patches (Config_63-01 up to 04).
p4raw-id: //depot/perl@845
-rwxr-xr-xConfigure1328
-rw-r--r--INSTALL62
-rw-r--r--Policy_sh.SH143
-rw-r--r--Porting/Glossary74
-rw-r--r--Porting/config.sh21
-rw-r--r--Porting/config_H282
-rw-r--r--config_h.SH276
-rw-r--r--ext/POSIX/POSIX.xs8
-rw-r--r--handy.h46
-rw-r--r--hints/hpux.sh5
-rwxr-xr-xmyconfig6
-rw-r--r--perlsock.h19
-rw-r--r--pp.c6
-rw-r--r--pp_sys.c73
-rw-r--r--regexec.c6
15 files changed, 1410 insertions, 945 deletions
diff --git a/Configure b/Configure
index af22c1b77f..461670a5cb 100755
--- a/Configure
+++ b/Configure
@@ -20,7 +20,7 @@
# $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $
#
-# Generated on Mon Mar 9 14:02:25 EST 1998 [metaconfig 3.0 PL70]
+# Generated on Tue Mar 31 15:49:57 EST 1998 [metaconfig 3.0 PL70]
cat >/tmp/c1$$ <<EOF
ARGGGHHHH!!!!!
@@ -176,7 +176,6 @@ emacs=''
expr=''
find=''
flex=''
-gcc=''
grep=''
gzip=''
inews=''
@@ -332,10 +331,12 @@ aphostname=''
d_gethname=''
d_phostname=''
d_uname=''
+d_gethostprotos=''
d_getlogin=''
d_getnbyaddr=''
d_getnbyname=''
d_getnent=''
+d_getnetprotos=''
d_getpent=''
d_getpgid=''
d_getpgrp2=''
@@ -345,7 +346,9 @@ d_getppid=''
d_getprior=''
d_getpbyname=''
d_getpbynumber=''
+d_getprotoprotos=''
d_getsent=''
+d_getservprotos=''
d_getsbyname=''
d_getsbyport=''
d_gnulibc=''
@@ -358,6 +361,8 @@ d_locconv=''
d_lockf=''
d_longdbl=''
longdblsize=''
+d_longlong=''
+longlongsize=''
d_lstat=''
d_mblen=''
d_mbstowcs=''
@@ -1904,6 +1909,8 @@ EOM
*.08.*) osvers=9 ;;
*.09.*) osvers=9 ;;
*.10.*) osvers=10 ;;
+ *.11.*) osvers=11 ;;
+ *.12.*) osvers=12 ;;
*) osvers="$3" ;;
esac
;;
@@ -2277,8 +2284,8 @@ esac
set usethreads
eval $setvar
: Look for a hint-file generated 'call-back-unit'. Now that the
-: user has specified the compiler, we may need to set or change some
-: other defaults.
+: user has specified if a threading perl is to be built, we may need
+: to set or change some other defaults.
if $test -f usethreads.cbu; then
. ./usethreads.cbu
fi
@@ -3055,393 +3062,6 @@ 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
-'')
- prog=`echo $package | $sed 's/-*[0-9.]*$//'`
- dflt="$privlib/site_$prog" ;;
-*) dflt="$sitelib" ;;
-esac
-$cat <<EOM
-
-The installation process will also create a directory for
-site-specific extensions and modules. Some users find it convenient
-to place all local files in this directory rather than in the main
-distribution directory.
-
-EOM
-fn=d~+
-rp='Pathname for the site-specific library files?'
-. ./getfile
-if $test "X$sitelibexp" != "X$ansexp"; then
- installsitelib=''
-fi
-sitelib="$ans"
-sitelibexp="$ansexp"
-if $afs; then
- $cat <<EOM
-
-Since you are running AFS, I need to distinguish the directory in
-which site-specific files 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 "$installsitelib" in
- '') dflt=`echo $sitelibexp | sed 's#^/afs/#/afs/.#'`;;
- *) dflt="$installsitelib";;
- esac
- fn=de~
- rp='Where will site-specific files be installed?'
- . ./getfile
- installsitelib="$ans"
-else
- installsitelib="$sitelibexp"
-fi
-
-: determine where site specific architecture-dependent libraries go.
-xxx=`echo $sitelib/$archname | sed 's!^$prefix!!'`
-: xxx is usuually lib/site_perl/archname.
-set sitearch sitearch none
-eval $prefixit
-case "$sitearch" in
-'') dflt="$sitelib/$archname" ;;
-*) dflt="$sitearch" ;;
-esac
-$cat <<EOM
-
-The installation process will also create a directory for
-architecture-dependent site-specific extensions and modules.
-
-EOM
-fn=nd~+
-rp='Pathname for the site-specific architecture-dependent library files?'
-. ./getfile
-if $test "X$sitearchexp" != "X$ansexp"; then
- installsitearch=''
-fi
-sitearch="$ans"
-sitearchexp="$ansexp"
-if $afs; then
- $cat <<EOM
-
-Since you are running AFS, I need to distinguish the directory in
-which site-specific architecture-dependent library files 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 "$installsitearch" in
- '') dflt=`echo $sitearchexp | sed 's#^/afs/#/afs/.#'`;;
- *) dflt="$installsitearch";;
- esac
- fn=de~
- rp='Where will site-specific architecture-dependent files be installed?'
- . ./getfile
- installsitearch="$ans"
-else
- installsitearch="$sitearchexp"
-fi
-
: see what memory models we can support
case "$models" in
'')
@@ -4341,7 +3961,12 @@ $rm -f try try.* core
compile='
mc_file=$1;
shift;
-$cc $optimize $ccflags $ldflags -o ${mc_file} $* ${mc_file}.c $libs > /dev/null 2>&1;'
+$cc $optimize $ccflags $ldflags -o ${mc_file}$_exe $* ${mc_file}.c $libs > /dev/null 2>&1;'
+: define a shorthand compile call for compilations that should be ok.
+compile_ok='
+mc_file=$1;
+shift;
+$cc $optimize $ccflags $ldflags -o ${mc_file}$_exe $* ${mc_file}.c $libs;'
echo " "
echo "Checking for GNU C Library..." >&4
@@ -4354,7 +3979,7 @@ main()
EOM
set gnulibc
if eval $compile && \
- ./gnulibc | $contains '^GNU C Library' >/dev/null 2>&1; then
+ ./gnulibc | $contains '^GNU C Library'; then
val="$define"
echo "You are using the GNU C Library"
else
@@ -4368,12 +3993,26 @@ eval $setvar
: see if nm is to be used to determine whether a symbol is defined or not
case "$usenm" in
'')
+ dflt=''
case "$d_gnulibc" in
- $define)
+ "$define")
+ echo " "
+ echo "nm probably won't work on the GNU C Library." >&4
dflt=n
;;
- *)
- dflt=`egrep 'inlibc|csym' ../Configure | wc -l 2>/dev/null`
+ esac
+ case "$dflt" in
+ '')
+ if $test "$osname" = aix -a ! -f /lib/syscalls.exp; then
+ echo " "
+ echo "Whoops! This is an AIX system without /lib/syscalls.exp!" >&4
+ echo "'nm' won't be sufficient on this sytem." >&4
+ dflt=n
+ fi
+ ;;
+ esac
+ case "$dflt" in
+ '') dflt=`egrep 'inlibc|csym' ../Configure | wc -l 2>/dev/null`
if $test $dflt -gt 20; then
dflt=y
else
@@ -4384,26 +4023,28 @@ case "$usenm" in
;;
*)
case "$usenm" in
- true) dflt=y;;
+ true|$define) dflt=y;;
*) dflt=n;;
esac
;;
esac
$cat <<EOM
-I can use '$nm' to extract the symbols from your C libraries. This is a time
-consuming task which may generate huge output on the disk (up to 3 megabytes)
-but that should make the symbols extraction faster. The alternative is to skip
-the 'nm' extraction part and to compile a small test program instead to
-determine whether each symbol is present. If you have a fast C compiler and/or
-if your 'nm' output cannot be parsed, this may be the best solution.
-You shouldn't let me use 'nm' if you have the GNU C Library.
+I can use $nm to extract the symbols from your C libraries. This
+is a time consuming task which may generate huge output on the disk (up
+to 3 megabytes) but that should make the symbols extraction faster. The
+alternative is to skip the 'nm' extraction part and to compile a small
+test program instead to determine whether each symbol is present. If
+you have a fast C compiler and/or if your 'nm' output cannot be parsed,
+this may be the best solution.
+
+You probably shouldn't let me use 'nm' if you are using the GNU C Library.
EOM
rp="Shall I use $nm to extract C symbols from the libraries?"
. ./myread
case "$ans" in
-n|N) usenm=false;;
+[Nn]*) usenm=false;;
*) usenm=true;;
esac
@@ -4666,12 +4307,27 @@ else
echo " "
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
+ if $ar t $libc > libc.tmp && $contains '^fprintf$' libc.tmp >/dev/null 2>&1; then
+ for thisname in $libnames $libc; do
$ar t $thisname >>libc.tmp
done
$sed -e "s/\\$_o\$//" < libc.tmp > libc.list
echo "Ok." >&4
+ elif test "X$osname" = "Xos2" && $ar tv $libc > libc.tmp; then
+ # Repeat libc to extract forwarders to DLL entries too
+ for thisname in $libnames $libc; do
+ $ar tv $thisname >>libc.tmp
+ # Revision 50 of EMX has bug in $ar.
+ # it will not extract forwarders to DLL entries
+ # Use emximp which will extract exactly them.
+ emximp -o tmp.imp $thisname \
+ 2>/dev/null && \
+ $sed -e 's/^\([_a-zA-Z0-9]*\) .*$/\1/p' \
+ < tmp.imp >>libc.tmp
+ $rm tmp.imp
+ done
+ $sed -e "s/\\$_o\$//" -e 's/^ \+//' < 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
@@ -4885,7 +4541,7 @@ $undef|n|false)
$define) dflt='y' ;;
esac
: Does a dl_xxx.xs file exist for this operating system
- $test -f ../$dldir/dl_${osname}.xs && dflt='y'
+ $test -f $rsrc/$dldir/dl_${osname}.xs && dflt='y'
;;
esac
rp="Do you wish to use dynamic loading?"
@@ -4895,7 +4551,7 @@ case "$ans" in
y*) usedl="$define"
case "$dlsrc" in
'')
- if $test -f ../$dldir/dl_${osname}.xs ; then
+ if $test -f $rsrc/$dldir/dl_${osname}.xs ; then
dflt="$dldir/dl_${osname}.xs"
elif $test "$d_dlopen" = "$define" ; then
dflt="$dldir/dl_dlopen.xs"
@@ -4910,15 +4566,17 @@ y*) usedl="$define"
esac
echo "The following dynamic loading files are available:"
: Can not go over to $dldir because getfile has path hard-coded in.
- cd ..; ls -C $dldir/dl*.xs; cd UU
- rp="Source file to use for dynamic loading"
- fn="fne"
- . ./getfile
+ tdir=`pwd`; cd $rsrc; $ls -C $dldir/dl*.xs; cd $tdir
+ rp="Source file to use for dynamic loading"
+ fn="fne"
+ # XXX This getfile call will fail the existence check if you try
+ # building away from $src (this is not supported yet).
+ . ./getfile
usedl="$define"
: emulate basename
dlsrc=`echo $ans | $sed -e 's@.*/\([^/]*\)$@\1@'`
- $cat << EOM
+ $cat << EOM
Some systems may require passing special flags to $cc -c to
compile modules that will be used to create a shared library.
@@ -5135,11 +4793,11 @@ EOM
# Why does next4 have to be so different?
case "${osname}${osvers}" in
next4*) xxx='DYLD_LIBRARY_PATH' ;;
+ os2*) xxx='' ;; # Nothing special needed.
*) xxx='LD_LIBRARY_PATH' ;;
esac
- case "$osname" in
- os2) ;;
- *) $cat <<EOM | $tee -a ../config.msg >&4
+ if test X"$xxx" != "X"; then
+ $cat <<EOM | $tee -a ../config.msg >&4
To build perl, you must add the current working directory to your
$xxx environment variable before running make. You can do
@@ -5150,7 +4808,7 @@ for Bourne-style shells, or
for Csh-style shells. You *MUST* do this before running make.
EOM
- esac
+ fi
;;
*) useshrplib='false' ;;
esac
@@ -5296,6 +4954,250 @@ 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"
+ 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
+
: 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
@@ -5658,6 +5560,149 @@ 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
+
+: determine where site specific libraries go.
+set sitelib sitelib
+eval $prefixit
+case "$sitelib" in
+'')
+ prog=`echo $package | $sed 's/-*[0-9.]*$//'`
+ dflt="$privlib/site_$prog" ;;
+*) dflt="$sitelib" ;;
+esac
+$cat <<EOM
+
+The installation process will also create a directory for
+site-specific extensions and modules. Some users find it convenient
+to place all local files in this directory rather than in the main
+distribution directory.
+
+EOM
+fn=d~+
+rp='Pathname for the site-specific library files?'
+. ./getfile
+if $test "X$sitelibexp" != "X$ansexp"; then
+ installsitelib=''
+fi
+sitelib="$ans"
+sitelibexp="$ansexp"
+if $afs; then
+ $cat <<EOM
+
+Since you are running AFS, I need to distinguish the directory in
+which site-specific files 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 "$installsitelib" in
+ '') dflt=`echo $sitelibexp | sed 's#^/afs/#/afs/.#'`;;
+ *) dflt="$installsitelib";;
+ esac
+ fn=de~
+ rp='Where will site-specific files be installed?'
+ . ./getfile
+ installsitelib="$ans"
+else
+ installsitelib="$sitelibexp"
+fi
+
+: determine where site specific architecture-dependent libraries go.
+xxx=`echo $sitelib/$archname | sed 's!^$prefix!!'`
+: xxx is usuually lib/site_perl/archname.
+set sitearch sitearch none
+eval $prefixit
+case "$sitearch" in
+'') dflt="$sitelib/$archname" ;;
+*) dflt="$sitearch" ;;
+esac
+$cat <<EOM
+
+The installation process will also create a directory for
+architecture-dependent site-specific extensions and modules.
+
+EOM
+fn=nd~+
+rp='Pathname for the site-specific architecture-dependent library files?'
+. ./getfile
+if $test "X$sitearchexp" != "X$ansexp"; then
+ installsitearch=''
+fi
+sitearch="$ans"
+sitearchexp="$ansexp"
+if $afs; then
+ $cat <<EOM
+
+Since you are running AFS, I need to distinguish the directory in
+which site-specific architecture-dependent library files 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 "$installsitearch" in
+ '') dflt=`echo $sitearchexp | sed 's#^/afs/#/afs/.#'`;;
+ *) dflt="$installsitearch";;
+ esac
+ fn=de~
+ rp='Where will site-specific architecture-dependent files be installed?'
+ . ./getfile
+ installsitearch="$ans"
+else
+ installsitearch="$sitearchexp"
+fi
+
cat <<EOM
Previous version of $package used the standard IO mechanisms as defined
@@ -6010,7 +6055,7 @@ main()
}
EOCP
set intsize
- if eval $compile && ./intsize > /dev/null; then
+ if eval $compile_ok && ./intsize > /dev/null; then
eval `./intsize`
echo "Your integers are $intsize bytes long."
echo "Your long integers are $longsize bytes long."
@@ -6120,7 +6165,7 @@ main()
}
EOCP
set try
-if eval $compile; then
+if eval $compile_ok; then
./try
yyy=$?
else
@@ -6208,7 +6253,7 @@ main()
}
EOCP
set try
-if eval $compile; then
+if eval $compile_ok; then
./try
castflags=$?
else
@@ -6662,7 +6707,7 @@ main() {
}
EOCP
set try
- if eval $compile; then
+ if eval $compile_ok; then
o_nonblock=`./try`
case "$o_nonblock" in
'') echo "I can't figure it out, assuming O_NONBLOCK will do.";;
@@ -6686,7 +6731,9 @@ case "$eagain" in
#include <sys/types.h>
#include <signal.h>
#define MY_O_NONBLOCK $o_nonblock
+#ifndef errno /* XXX need better Configure test */
extern int errno;
+#endif
$signal_t blech(x) int x; { exit(3); }
EOCP
$cat >> try.c <<'EOCP'
@@ -6741,7 +6788,7 @@ main()
}
EOCP
set try
- if eval $compile; then
+ if eval $compile_ok; then
echo "$startsh" >mtry
echo "./try >try.out 2>try.ret 3>try.err || exit 4" >>mtry
chmod +x mtry
@@ -6852,6 +6899,34 @@ eval $inlibc
set gethostent d_gethent
eval $inlibc
+hasproto='varname=$1; func=$2; shift; shift;
+while $test $# -ge 2; do
+ case "$1" in
+ $define) echo "#include <$2>";;
+ esac ;
+ shift 2;
+done > try.c;
+$cppstdin $cppflags $cppminus < try.c > tryout.c 2>/dev/null;
+if $contains "$func.*(" tryout.c >/dev/null 2>&1; then
+ echo "$func() prototype found.";
+ val="$define";
+else
+ echo "$func() prototype NOT found.";
+ val="$undef";
+fi;
+set $varname;
+eval $setvar;
+$rm -f try.c tryout.c'
+
+: see if this is a netdb.h system
+set netdb.h i_netdb
+eval $inhdr
+
+: see if prototypes for various gethostxxx netdb.h functions are available
+echo " "
+set d_gethostprotos gethostent $i_netdb netdb.h
+eval $hasproto
+
: see if getlogin exists
set getlogin d_getlogin
eval $inlibc
@@ -6868,6 +6943,11 @@ eval $inlibc
set getnetent d_getnent
eval $inlibc
+: see if prototypes for various getnetxxx netdb.h functions are available
+echo " "
+set d_getnetprotos getnetent $i_netdb netdb.h
+eval $hasproto
+
: see if getprotobyname exists
set getprotobyname d_getpbyname
@@ -6897,6 +6977,11 @@ eval $inlibc
set getpriority d_getprior
eval $inlibc
+: see if prototypes for various getprotoxxx netdb.h functions are available
+echo " "
+set d_getprotoprotos getprotoent $i_netdb netdb.h
+eval $hasproto
+
: see if getservbyname exists
set getservbyname d_getsbyname
@@ -6910,6 +6995,11 @@ eval $inlibc
set getservent d_getsent
eval $inlibc
+: see if prototypes for various getservxxx netdb.h functions are available
+echo " "
+set d_getservprotos getservent $i_netdb netdb.h
+eval $hasproto
+
: see if gettimeofday or ftime exists
set gettimeofday d_gettimeod
eval $inlibc
@@ -7071,7 +7161,7 @@ eval $inlibc
echo " "
echo $n "Checking to see if your system supports long doubles...$c" >&4
echo 'long double foo() { long double x; x = 7.0; return x; }' > try.c
-if $cc $optimize $ccflags -c try.c; then
+if $cc $optimize $ccflags -c try.c >/dev/null 2>&1; then
val="$define"
echo " Yup, it does." >&4
else
@@ -7083,10 +7173,9 @@ set d_longdbl
eval $setvar
: check for length of long double
-echo " "
-
case "${d_longdbl}${longdblsize}" in
$define)
+ echo " "
$echo $n "Checking to see how big your long doubles are...$c" >&4
$cat >try.c <<'EOCP'
#include <stdio.h>
@@ -7096,16 +7185,60 @@ main()
}
EOCP
set try
- if eval $compile; then
+ if eval $compile_ok; then
longdblsize=`./try`
+ $echo " $longdblsize bytes." >&4
else
dflt='8'
+ echo " "
echo "(I can't seem to compile the test program. Guessing...)"
rp="What is the size of a long double (in bytes)?"
. ./myread
longdblsize="$ans"
fi
- $echo " $longdblsize bytes."
+ ;;
+esac
+$rm -f try.c try
+
+: check for long long
+echo " "
+echo $n "Checking to see if your system supports long long...$c" >&4
+echo 'long long foo() { long long x; x = 7; return x; }' > try.c
+if $cc $optimize $ccflags -c try.c >/dev/null 2>&1; then
+ val="$define"
+ echo " Yup, it does." >&4
+else
+ val="$undef"
+ echo " Nope, it doesn't." >&4
+fi
+$rm try.*
+set d_longlong
+eval $setvar
+
+: check for length of long long
+case "${d_longlong}${longlongsize}" in
+$define)
+ echo " "
+ $echo $n "Checking to see how big your long longs are...$c" >&4
+ $cat >try.c <<'EOCP'
+#include <stdio.h>
+main()
+{
+ printf("%d\n", sizeof(long long));
+}
+EOCP
+ set try
+ if eval $compile_ok; then
+ longlongsize=`./try`
+ $echo " $longlongsize bytes." >&4
+ else
+ dflt='8'
+ echo " "
+ echo "(I can't seem to compile the test program. Guessing...)"
+ rp="What is the size of a long long (in bytes)?"
+ . ./myread
+ longlongsize="$ans"
+ fi
;;
esac
$rm -f try.c try
@@ -7538,7 +7671,7 @@ exit(0);
}
EOCP
set try
- if eval $compile; then
+ if eval $compile_ok; then
if ./try 2>/dev/null; then
echo "Yes, it can."
val="$define"
@@ -7616,7 +7749,7 @@ exit(0);
}
EOCP
set try
- if eval $compile; then
+ if eval $compile_ok; then
if ./try 2>/dev/null; then
echo "Yes, it can."
val="$define"
@@ -7676,7 +7809,7 @@ exit(0);
}
EOCP
set try
- if eval $compile; then
+ if eval $compile_ok; then
if ./try 2>/dev/null; then
echo "Yes, it can."
val="$define"
@@ -7916,12 +8049,7 @@ echo " "
: see if we have sigaction
if set sigaction val -f d_sigaction; eval $csym; $val; then
echo 'sigaction() found.' >&4
- val="$define"
-else
- echo 'sigaction NOT found.' >&4
- val="$undef"
-fi
-$cat > try.c <<'EOP'
+ $cat > try.c <<'EOP'
#include <stdio.h>
#include <sys/types.h>
#include <signal.h>
@@ -7930,11 +8058,15 @@ main()
struct sigaction act, oact;
}
EOP
-set try
-if eval $compile; then
- :
+ set try
+ if eval $compile_ok; then
+ val="$define"
+ else
+ echo "But you don't seem to have a useable struct sigaction." >&4
+ val="$undef"
+ fi
else
- echo "But you don't seem to have a useable struct sigaction." >&4
+ echo 'sigaction NOT found.' >&4
val="$undef"
fi
set d_sigaction; eval $setvar
@@ -8008,7 +8140,7 @@ else
else
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) || \
+ ( ($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
@@ -8310,6 +8442,34 @@ case "$varval" in
*) eval "$var=\$varval";;
esac'
+: define an is-a-typedef? function that prompts if the type is not available.
+typedef_ask='type=$1; var=$2; def=$3; shift; shift; shift; inclist=$@;
+case "$inclist" in
+"") inclist="sys/types.h";;
+esac;
+eval "varval=\$$var";
+case "$varval" in
+"")
+ $rm -f temp.c;
+ for inc in $inclist; do
+ echo "#include <$inc>" >>temp.c;
+ done;
+ $cppstdin $cppflags $cppminus < temp.c >temp.E 2>/dev/null;
+ echo " " ;
+ echo "$rp" | $sed -e "s/What is/Looking for/" -e "s/?/./";
+ if $contains $type temp.E >/dev/null 2>&1; then
+ echo "$type found." >&4;
+ eval "$var=\$type";
+ else
+ echo "$type NOT found." >&4;
+ dflt="$def";
+ . ./myread ;
+ eval "$var=\$ans";
+ fi;
+ $rm -f temp.?;;
+*) eval "$var=\$varval";;
+esac'
+
: see if this is a sys/times.h system
set sys/times.h i_systimes
eval $inhdr
@@ -8323,13 +8483,9 @@ if set times val -f d_times; eval $csym; $val; then
case "$i_systimes" in
"$define") inc='sys/times.h';;
esac
+ rp="What is the type returned by times() on this system?"
set clock_t clocktype long stdio.h sys/types.h $inc
- eval $typedef
- dflt="$clocktype"
- echo " "
- rp="What type is returned by times() on this system?"
- . ./myread
- clocktype="$ans"
+ eval $typedef_ask
else
echo 'times() NOT found, hope that will do.' >&4
d_times="$undef"
@@ -8472,7 +8628,7 @@ case "$d_closedir" in
int main() { return closedir(opendir(".")); }
EOM
set closedir
- if eval $compile; then
+ if eval $compile_ok; then
if ./closedir > /dev/null 2>&1 ; then
echo "Yes, it does."
val="$undef"
@@ -8561,7 +8717,7 @@ main()
}
EOCP
set try
- if eval $compile; then
+ if eval $compile_ok; then
dflt=`./try`
else
dflt='8'
@@ -8673,51 +8829,6 @@ 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 " "
@@ -8795,6 +8906,51 @@ 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
+ $cat try.out >&4
+ 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
@@ -8828,6 +8984,7 @@ EOCP
else
db_prefixtype='size_t'
: XXX Maybe we should just give up here.
+ $cat try.out >&4
echo "Help: I can't seem to compile the db test program." >&4
echo "Something's wrong, but I'll assume you use $db_prefixtype." >&4
fi
@@ -8946,7 +9103,7 @@ main()
}
EOCP
set try
- if eval $compile; then
+ if eval $compile_ok; then
doublesize=`./try`
$echo $doublesize >&4
else
@@ -8961,13 +9118,9 @@ esac
$rm -f try.c try
: see what type file positions are declared as in the library
-set fpos_t fpostype long stdio.h sys/types.h
-eval $typedef
-echo " "
-dflt="$fpostype"
rp="What is the type for file position used by fsetpos()?"
-. ./myread
-fpostype="$ans"
+set fpos_t fpostype long stdio.h sys/types.h
+eval $typedef_ask
: get csh whereabouts
case "$csh" in
@@ -8985,6 +9138,8 @@ esac
full_sed=$sed
: see what type gids are declared as in the kernel
+echo " "
+echo "Looking for the type for group ids returned by getgid()."
set gid_t gidtype xxx stdio.h sys/types.h
eval $typedef
case "$gidtype" in
@@ -8998,10 +9153,13 @@ xxx)
;;
*) dflt="$gidtype";;
esac
-echo " "
-rp="What is the type for group ids returned by getgid()?"
-. ./myread
-gidtype="$ans"
+case "$gidtype" in
+gid_t) echo "gid_t found." ;;
+*) rp="What is the type for group ids returned by getgid()?"
+ . ./myread
+ gidtype="$ans"
+ ;;
+esac
: see if getgroups exists
set getgroups d_getgrps
@@ -9021,11 +9179,11 @@ case "$d_getgrps$d_setgrps" in
*) dflt="$groupstype" ;;
esac
$cat <<EOM
-What is the type of the second argument to getgroups() and setgroups()?
+What type of pointer is the second argument to getgroups() and setgroups()?
Usually this is the same as group ids, $gidtype, but not always.
EOM
- rp='What type is the second argument to getgroups() and setgroups()?'
+ rp='What type pointer is the second argument to getgroups() and setgroups()?'
. ./myread
groupstype="$ans"
;;
@@ -9033,13 +9191,9 @@ EOM
esac
: see what type lseek is declared as in the kernel
+rp="What is the type used for lseek's offset on this system?"
set off_t lseektype long stdio.h sys/types.h
-eval $typedef
-echo " "
-dflt="$lseektype"
-rp="What type is lseek's offset on this system declared as?"
-. ./myread
-lseektype="$ans"
+eval $typedef_ask
echo " "
echo "Checking if your $make program sets \$(MAKE)..." >&4
@@ -9062,13 +9216,9 @@ case "$make_set_make" in
esac
: see what type is used for mode_t
+rp="What is the type used for file modes for system calls (e.g. fchmod())?"
set mode_t modetype int stdio.h sys/types.h
-eval $typedef
-dflt="$modetype"
-echo " "
-rp="What type is used for file modes?"
-. ./myread
-modetype="$ans"
+eval $typedef_ask
: Cruising for prototypes
echo " "
@@ -9129,18 +9279,10 @@ EOSH
chmod +x protochk
$eunicefix protochk
-: see if this is a netdb.h system
-set netdb.h i_netdb
-eval $inhdr
-
: see what type is used for size_t
+rp="What is the type used for the length parameter for string functions?"
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"
+eval $typedef_ask
: check for type of arguments to gethostbyaddr.
if test "X$netdb_host_type" = X -o "X$netdb_hlen_type" = X; then
@@ -9295,19 +9437,15 @@ rp='What pager is used on your system?'
pager="$ans"
: see what type pids are declared as in the kernel
+rp="What is the type of process ids on this system?"
set pid_t pidtype int stdio.h sys/types.h
-eval $typedef
-dflt="$pidtype"
-echo " "
-rp="What type are process ids on this system declared as?"
-. ./myread
-pidtype="$ans"
+eval $typedef_ask
: check for length of pointer
echo " "
case "$ptrsize" in
'')
- echo "Checking to see how big your pointers are..." >&4
+ $echo $n "Checking to see how big your pointers are...$c" >&4
if test "$voidflags" -gt 7; then
echo '#define VOID_PTR char *' > try.c
else
@@ -9322,8 +9460,9 @@ main()
}
EOCP
set try
- if eval $compile; then
+ if eval $compile_ok; then
ptrsize=`./try`
+ $echo " $ptrsize bytes." >&4
else
dflt='4'
echo "(I can't seem to compile the test program. Guessing...)" >&4
@@ -9368,7 +9507,7 @@ main()
}
EOCP
set try
- if eval $compile; then
+ if eval $compile_ok; then
dflt=`./try$_exe`
else
dflt='?'
@@ -9665,9 +9804,10 @@ xxx="$xxx LOST PHONE PIPE POLL PROF PWR QUIT SEGV STKFLT STOP SYS TERM TRAP"
xxx="$xxx TSTP TTIN TTOU URG USR1 USR2 USR3 USR4 VTALRM"
xxx="$xxx WINCH WIND WINDOW XCPU XFSZ"
: generate a few handy files for later
-$cat > signal.c <<'EOP'
+$cat > signal.c <<'EOCP'
#include <sys/types.h>
#include <signal.h>
+#include <stdio.h>
int main() {
/* Strange style to avoid deeply-nested #if/#else/#endif */
@@ -9722,7 +9862,10 @@ int main() {
printf("NSIG %d\n", NSIG);
-EOP
+#ifndef JUST_NSIG
+
+EOCP
+
echo $xxx | $tr ' ' '\012' | $sort | $uniq | $awk '
{
printf "#ifdef SIG"; printf $1; printf "\n"
@@ -9731,6 +9874,7 @@ echo $xxx | $tr ' ' '\012' | $sort | $uniq | $awk '
printf "#endif\n"
}
END {
+ printf "#endif /* JUST_NSIG */\n";
printf "}\n";
}
' >>signal.c
@@ -9767,22 +9911,69 @@ END {
EOP
$cat >signal_cmd <<EOS
$startsh
-$test -s signal.lst && exit 0
-if $cc $optimize $ccflags $ldflags -o signal signal.c $libs >/dev/null 2>&1; then
+if $test -s signal.lst; then
+ echo "Using your existing signal.lst file"
+ exit 0
+fi
+xxx="$xxx"
+EOS
+$cat >>signal_cmd <<'EOS'
+
+set signal
+if eval $compile_ok; 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 "(I can't seem be able to compile the whole test program)" >&4
+ echo "(I'll try it in little pieces.)" >&4
+ set signal -DJUST_NSIG
+ if eval $compile_ok; then
+ ./signal$_exe > signal.nsg
+ $cat signal.nsg
+ else
+ echo "I can't seem to figure out how many signals you have." >&4
+ echo "Guessing 50." >&4
+ echo 'NSIG 50' > signal.nsg
+ fi
+ : Now look at all the signal names, one at a time.
+ for xx in `echo $xxx | $tr ' ' '\012' | $sort | $uniq`; do
+ $cat > signal.c <<EOCP
+#include <sys/types.h>
+#include <signal.h>
+#include <stdio.h>
+int main() {
+printf("$xx %d\n", SIG${xx});
+return 0;
+}
+EOCP
+ set signal
+ if eval $compile; then
+ echo "SIG${xx} found."
+ ./signal$_exe >> signal.ls1
+ else
+ echo "SIG${xx} NOT found."
+ fi
+ done
+ if $test -s signal.ls1; then
+ $cat signal.nsg signal.ls1 |
+ $sort -n +1 | $uniq | $awk -f signal.awk >signal.lst
+ fi
+
+fi
+if $test -s signal.lst; then
+ :
+else
+ echo "(AAK! I can't compile the test programs -- Guessing)" >&4
echo 'kill -l' >signal
- set X \`csh -f <signal\`
+ set X `csh -f <signal`
$rm -f signal
shift
- case \$# in
+ case $# in
0) set HUP INT QUIT ILL TRAP ABRT EMT FPE KILL BUS SEGV SYS PIPE ALRM TERM;;
esac
- echo \$@ | $tr ' ' '\012' | \
- $awk '{ printf \$1; printf " %d\n", ++s; }' >signal.lst
+ 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$_exe signal$_o signal.nsg signal.ls1
EOS
chmod a+x signal_cmd
$eunicefix signal_cmd
@@ -9792,7 +9983,7 @@ echo " "
case "$sig_name_init" in
'')
echo "Generating a list of signal names and numbers..." >&4
- ./signal_cmd
+ . ./signal_cmd
sig_name=`$awk '{printf "%s ", $1}' signal.lst`
sig_name="ZERO $sig_name"
sig_name_init=`$awk 'BEGIN { printf "\"ZERO\", " }
@@ -9843,7 +10034,7 @@ main()
EOM
echo " "
set ssize
-if eval $compile && ./ssize > /dev/null; then
+if eval $compile_ok && ./ssize > /dev/null; then
ssizetype=`./ssize`
echo "I'll be using $ssizetype for functions returning a byte count." >&4
else
@@ -9877,13 +10068,9 @@ echo " "
if set time val -f d_time; eval $csym; $val; then
echo 'time() found.' >&4
val="$define"
+ rp="What is the type returned by time() on this system?"
set time_t timetype long stdio.h sys/types.h
- eval $typedef
- dflt="$timetype"
- echo " "
- rp="What type is returned by time() on this system?"
- . ./myread
- timetype="$ans"
+ eval $typedef_ask
else
echo 'time() not found, hope that will do.' >&4
val="$undef"
@@ -9893,6 +10080,8 @@ set d_time
eval $setvar
: see what type uids are declared as in the kernel
+echo " "
+echo "Looking for the type for user ids returned by getuid()."
set uid_t uidtype xxx stdio.h sys/types.h
eval $typedef
case "$uidtype" in
@@ -9906,10 +10095,13 @@ xxx)
;;
*) dflt="$uidtype";;
esac
-echo " "
-rp="What is the type for user ids returned by getuid()?"
-. ./myread
-uidtype="$ans"
+case "$uidtype" in
+uid_t) echo "uid_t found." ;;
+*) rp="What is the type for user ids returned by getuid()?"
+ . ./myread
+ uidtype="$ans"
+ ;;
+esac
: see if dbm.h is available
: see if dbmclose exists
@@ -10405,7 +10597,8 @@ eval $setvar
echo " "
echo "Looking for extensions..." >&4
-cd ../ext
+tdir=`pwd`
+cd $rsrc/ext
: If we are using the old config.sh, known_extensions may contain
: old or inaccurate or duplicate values.
known_extensions=''
@@ -10426,7 +10619,7 @@ for xxx in * ; do
known_extensions="$known_extensions $xxx/$yyy"
fi
done
- cd ..
+ cd ..
fi
fi
;;
@@ -10435,7 +10628,7 @@ done
set X $known_extensions
shift
known_extensions="$*"
-cd ../UU
+cd $tdir
: Now see which are supported on this system.
avail_ext=''
@@ -10779,10 +10972,12 @@ d_gethbyaddr='$d_gethbyaddr'
d_gethbyname='$d_gethbyname'
d_gethent='$d_gethent'
d_gethname='$d_gethname'
+d_gethostprotos='$d_gethostprotos'
d_getlogin='$d_getlogin'
d_getnbyaddr='$d_getnbyaddr'
d_getnbyname='$d_getnbyname'
d_getnent='$d_getnent'
+d_getnetprotos='$d_getnetprotos'
d_getpbyname='$d_getpbyname'
d_getpbynumber='$d_getpbynumber'
d_getpent='$d_getpent'
@@ -10791,9 +10986,11 @@ d_getpgrp2='$d_getpgrp2'
d_getpgrp='$d_getpgrp'
d_getppid='$d_getppid'
d_getprior='$d_getprior'
+d_getprotoprotos='$d_getprotoprotos'
d_getsbyname='$d_getsbyname'
d_getsbyport='$d_getsbyport'
d_getsent='$d_getsent'
+d_getservprotos='$d_getservprotos'
d_gettimeod='$d_gettimeod'
d_gnulibc='$d_gnulibc'
d_htonl='$d_htonl'
@@ -10805,6 +11002,7 @@ d_link='$d_link'
d_locconv='$d_locconv'
d_lockf='$d_lockf'
d_longdbl='$d_longdbl'
+d_longlong='$d_longlong'
d_lstat='$d_lstat'
d_mblen='$d_mblen'
d_mbstowcs='$d_mbstowcs'
@@ -10953,7 +11151,6 @@ fpostype='$fpostype'
freetype='$freetype'
full_csh='$full_csh'
full_sed='$full_sed'
-gcc='$gcc'
gccversion='$gccversion'
gidtype='$gidtype'
glibpth='$glibpth'
@@ -11051,6 +11248,7 @@ lns='$lns'
locincpth='$locincpth'
loclibpth='$loclibpth'
longdblsize='$longdblsize'
+longlongsize='$longlongsize'
longsize='$longsize'
lp='$lp'
lpr='$lpr'
diff --git a/INSTALL b/INSTALL
index 7a4faec229..2454fd7374 100644
--- a/INSTALL
+++ b/INSTALL
@@ -6,7 +6,7 @@ Install - Build and Installation guide for perl5.
The basic steps to build and install perl5 on a Unix system are:
- rm -f config.sh
+ rm -f config.sh Policy.sh
sh Configure
make
make test
@@ -70,10 +70,10 @@ pod/perldelta.pod for a description of what's changed.
=head1 Space Requirements
-The complete perl5 source tree takes up about 7 MB of disk space. The
-complete tree after completing make takes roughly 15 MB, though the
+The complete perl5 source tree takes up about 10 MB of disk space. The
+complete tree after completing make takes roughly 20 MB, though the
actual total is likely to be quite system-dependent. The installation
-directories need something on the order of 7 MB, though again that
+directories need something on the order of 10 MB, though again that
value is system-dependent.
=head1 Start with a Fresh Distribution
@@ -81,13 +81,20 @@ value is system-dependent.
If you have built perl before, you should clean out the build directory
with the command
+ make distclean
+
+or
+
make realclean
-The results of a Configure run are stored in the config.sh file. If
-you are upgrading from a previous version of perl, or if you change
-systems or compilers or make other significant changes, or if you are
-experiencing difficulties building perl, you should probably not
-re-use your old config.sh. Simply remove it or rename it, e.g.
+The only difference between the two is that make distclean also removes
+your old config.sh and Policy.sh files.
+
+The results of a Configure run are stored in the config.sh and Policy.sh
+files. If you are upgrading from a previous version of perl, or if you
+change systems or compilers or make other significant changes, or if
+you are experiencing difficulties building perl, you should probably
+not re-use your old config.sh. Simply remove it or rename it, e.g.
mv config.sh config.sh.old
@@ -108,6 +115,11 @@ pick up a precompiled binary, it might not use the same name.
In short, if you wish to use your old config.sh, I recommend running
Configure interactively rather than blindly accepting the defaults.
+If your reason to reuse your old config.sh is to save your
+particular installation choices, then you can probably achieve the
+same effect by using the new Policy.sh file. See the section on
+L<"Site-wide Policy settings"> below.
+
=head1 Run Configure
Configure will figure out various things about your system. Some
@@ -167,11 +179,11 @@ For my Solaris system, I usually use
=head2 GNU-style configure
If you prefer the GNU-style configure command line interface, you can
-use the supplied configure command, e.g.
+use the supplied configure.gnu command, e.g.
CC=gcc ./configure.gnu
-The configure script emulates a few of the more common configure
+The configure.gnu script emulates a few of the more common configure
options. Try
./configure.gnu --help
@@ -180,7 +192,7 @@ for a listing.
Cross compiling is not supported.
-(The file is called configugre.gnu to avoid problems on systems
+(The file is called configure.gnu to avoid problems on systems
that would not distinguish the files "Configure" and "configure".)
=head2 Extensions
@@ -236,6 +248,11 @@ Note: The DB_File module will only work with version 1.x of Berkeley
DB or newer releases of version 2. Configure will automatically detect
this for you and refuse to try to build DB_File with version 2.
+If you re-use your old config.sh but change your system (e.g. by
+adding libgdbm) Configure will still offer your old choices of extensions
+for the default answer, but it will also point out the discrepancy to
+you.
+
Finally, if you have dynamic loading (most modern Unix systems do)
remember that these extensions do not increase the size of your perl
executable, nor do they impact start-up time, so you probably might as
@@ -457,7 +474,7 @@ installed on multiple systems. Here's one way to do that:
cd /usr/local # Or wherever you specified as $prefix
tar xvf perl5-archive.tar
-=head2 Site-wide "Policy" settings
+=head2 Site-wide Policy settings
After Configure runs, it stores a number of common site-wide "policy"
answers (such as installation directories and the local perl contact
@@ -466,6 +483,15 @@ system using the same policy defaults, simply copy the Policy.sh file
to the new system and Configure will use it along with the appropriate
hint file for your system.
+Alternatively, if you wish to change some or all of those policy
+answers, you should
+
+ rm -f Policy.sh
+
+to ensure that Configure doesn't re-use them.
+
+Further information is in the Policy_sh.SH file itself.
+
=head2 Configure-time Options
There are several different ways to Configure and build perl for your
@@ -962,8 +988,8 @@ at Perl startup.
=item malloc duplicates
-If you get duplicates upon linking for malloc et al, add -DHIDEMYMALLOC
-or -DEMBEDMYMALLOC to your ccflags variable in config.sh.
+If you get duplicates upon linking for malloc et al, add -DEMBEDMYMALLOC
+to your ccflags variable in config.sh.
=item varargs
@@ -1300,7 +1326,7 @@ In general, you can usually safely upgrade from one version of Perl (e.g.
all of your add-on extensions. You can also safely leave the old version
around in case the new version causes you problems for some reason.
For example, if you want to be sure that your script continues to run
-with 5.004_04, simplly replace the '#!/usr/local/bin/perl' line at the
+with 5.004_04, simply replace the '#!/usr/local/bin/perl' line at the
top of the script with the particular version you want to run, e.g.
#!/usr/local/bin/perl5.00404.
@@ -1376,7 +1402,7 @@ to be recompiled to be used with 5.004_50 and later.
If you wish to continue using those extensions under 5.004_04, for
example, then you need to move those extensions from their current
-direcotries, which are something like
+directories, which are something like
/usr/local/lib/perl5/site_perl/
/usr/local/lib/perl5/site_perl/archname
@@ -1509,4 +1535,4 @@ above.
=head1 LAST MODIFIED
-$Id: INSTALL,v 1.31 1998/03/03 18:08:52 doughera Released $
+$Id: INSTALL,v 1.32 1998/03/20 19:20:08 doughera Released $
diff --git a/Policy_sh.SH b/Policy_sh.SH
index b2ea8e95bc..acac3ed8af 100644
--- a/Policy_sh.SH
+++ b/Policy_sh.SH
@@ -13,70 +13,59 @@ $startsh
#
# 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
+# to be "sticky". 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
+# 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.
+# Allow Configure command-line overrides; usually these won't be
+# needed, but something like -Dprefix=/test/location can be quite
+# useful for testing out new versions.
-# Site-specific values
+#Site-specific values:
-perladmin='$perladmin'
+case "\$perladmin" in
+'') perladmin='$perladmin' ;;
+esac
+
+# Installation prefix. Allow a Configure -D override. You
+# may wish to reinstall perl under a different prefix, perhaps
+# in order to test a different configuration.
+case "\$prefix" in
+'') prefix='$prefix' ;;
+esac
# 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.
+# 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.
-
-# Installation Prefix.
-prefix='$prefix'
-
-bin='$bin'
-installbin='$installbin'
-
-scriptdir='$scriptdir'
-installscript='$installscript'
-
-privlib='$privlib'
-installprivlib='$installprivlib'
-
-sitelib='$sitelib'
-installsitelib='$installsitelib'
-
-# man1 and man3 manpage directories and extensions.
-man1dir='$man1dir'
-man1ext='$man1ext'
-installman1dir='$installman1dir'
-man3dir='$man3dir'
-man3ext='$man3ext'
-installman3dir='$installman3dir'
-
-# NOTE: Be careful about architecture-dependent names. If you have
-# accepted the default, the following definitions will be commented out.
-# That way you can carry this file to another architecture and this file
-# won't mistakenly set architecture-dependent names to the wrong value.
+#
+# In each case, if your previous value was the default, leave it commented
+# out. That way, if you override prefix, all of these will be
+# automatically adjusted.
#
-# If you have not accepted the default, then be sure to check the
-# following lines before copying this file to another system.
+# NOTE: Be especially careful about architecture-dependent and
+# version-dependent names, particularly if you reuse this file for
+# different versions of perl.
!GROK!THIS!
if test 0 -eq "$subversion"; then
version=`LC_ALL=C; export LC_ALL; \
- echo $baserev $patchlevel |
+ echo $baserev $patchlevel |
$awk '{ printf "%.3f\n", $1 + $2/1000.0 }'`
else
version=`LC_ALL=C; export LC_ALL; \
@@ -84,34 +73,68 @@ else
$awk '{ printf "%.5f\n", $1 + $2/1000.0 + $3/100000.0 }'`
fi
-dflt="$privlib/$archname/$version"
-if test X"$archlib" = X"$dflt"; then
- echo "# archlib='$archlib'"
- echo "# installarchlib='$installarchlib'"
-else
- echo '# NOTE: Preserving your custom archlib.'
- echo "archlib='$archlib'"
- echo "installarchlib='$installarchlib'"
-fi >> Policy.sh
-echo >> Policy.sh
-
-# Now consider sitearch.
-dflt="$sitelib/$archname"
-if test X"$sitearch" = X"$dflt"; then
- echo "# sitearch='$sitearch'"
- echo "# installsitearch='$installsitearch'"
-else
- echo '# NOTE: Preserving your custom sitearch.'
- echo "sitearch='$sitearch'"
- echo "installsitearch='$installsitearch'"
-fi >> Policy.sh
+for var in bin scriptdir privlib archlib \
+ man1dir man3dir sitelib sitearch \
+ installbin installscript installprivlib installarchlib \
+ installman1dir installman3dir installsitelib installsitearch \
+ man1ext man3ext; do
+
+ case "$var" in
+ bin) dflt=$prefix/bin ;;
+ # The scriptdir test is more complex, but this is probably usually ok.
+ scriptdir) dflt=$prefix/script ;;
+ privlib)
+ case "$prefix" in
+ *perl*) dflt=$prefix/lib ;;
+ *) dflt=$prefix/lib/$package ;;
+ esac
+ ;;
+ archlib) dflt="$privlib/$archname/$version" ;;
+ sitelib) dflt="$privlib/site_perl" ;;
+ sitearch) dflt="$sitelib/$archname" ;;
+ man1dir) dflt="$prefix/man/man1" ;;
+ man3dir)
+ case "$prefix" in
+ *perl*) dflt=`echo $man1dir |
+ sed -e 's/man1/man3/g' -e 's/man\.1/man\.3/g'` ;;
+ *) dflt=$privlib/man3 ;;
+ esac
+ ;;
+
+ # Can we assume all sed's have greedy matching?
+ man1ext) dflt=`echo $man1dir | sed -e 's!.*man!!' -e 's!^\.!!'` ;;
+ man3ext) dflt=`echo $man3dir | sed -e 's!.*man!!' -e 's!^\.!!'` ;;
+
+ # It might be possible to fool these next tests. Please let
+ # me know if they don't work right for you.
+ installbin) dflt=`echo $binexp | sed 's#^/afs/#/afs/.#'`;;
+ installscript) dflt=`echo $scriptdirexp | sed 's#^/afs/#/afs/.#'`;;
+ installprivlib) dflt=`echo $privlibexp | sed 's#^/afs/#/afs/.#'`;;
+ installarchlib) dflt=`echo $archlibexp | sed 's#^/afs/#/afs/.#'`;;
+ installsitelib) dflt=`echo $sitelibexp | sed 's#^/afs/#/afs/.#'`;;
+ installsitearch) dflt=`echo $sitearchexp | sed 's#^/afs/#/afs/.#'`;;
+ installman1dir) dflt=`echo $man1direxp | sed 's#^/afs/#/afs/.#'`;;
+ installman3dir) dflt=`echo $man3direxp | sed 's#^/afs/#/afs/.#'`;;
+ esac
+
+ eval val="\$$var"
+ if test X"$val" = X"$dflt"; then
+ echo "# $var='$dflt'"
+ else
+ echo "# Preserving custom $var"
+ eval val=$var
+ echo "$var='$val'"
+ fi
+
+done >> Policy.sh
$spitshell <<!GROK!THIS! >>Policy.sh
-# Lastly, you may add additional items here. For example, to set the
+# Lastly, you may add additional items here. For example, to set the
# pager to your local favorite value, uncomment the following line in
# the original Policy_sh.SH file and re-run sh Policy_sh.SH.
-# pager='$pager'
+#
+# pager='$pager'
#
# A full Glossary of all the config.sh variables is in the file
# Porting/Glossary.
diff --git a/Porting/Glossary b/Porting/Glossary
index b0840a990d..6a37060020 100644
--- a/Porting/Glossary
+++ b/Porting/Glossary
@@ -184,6 +184,11 @@ d_archlib (archlib.U):
of architecture-dependent library files for $package. If
$archlib is the same as $privlib, then this is set to undef.
+d_attribut (d_attribut.U):
+ This variable conditionally defines HASATTRIBUTE, which
+ indicates the C compiler can check for function attributes,
+ such as printf formats.
+
d_bcmp (d_bcmp.U):
This variable conditionally defines the HAS_BCMP symbol if
the bcmp() routine is available to compare strings.
@@ -200,6 +205,11 @@ d_bsdgetpgrp (d_getpgrp.U):
This variable conditionally defines USE_BSD_GETPGRP if
getpgrp needs one 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.
@@ -384,6 +394,11 @@ d_gethbyaddr (d_gethbyad.U):
indicates to the C program that the gethostbyaddr() routine is available
to look up hosts by their IP addresses.
+d_gethbyname (d_gethbynm.U):
+ This variable conditionally defines the HAS_GETHOSTBYNAME symbol, which
+ indicates to the C program that the gethostbyname() routine is available
+ to look up host names in some data base or other.
+
d_gethent (d_gethent.U):
This variable conditionally defines HAS_GETHOSTENT if gethostent() is
available to look up host names in some data base or another.
@@ -393,6 +408,12 @@ d_gethname (d_gethname.U):
indicates to the C program that the gethostname() routine may be
used to derive the host name.
+d_gethostprotos (d_gethostprotos.U):
+ This variable conditionally defines the HAS_GETHOST_PROTOS symbol,
+ which indicates to the C program that <netdb.h> supplies
+ prototypes for the various gethost*() functions.
+ See also netdbtype.U for probing for various netdb types.
+
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
@@ -412,6 +433,12 @@ d_getnent (d_getnent.U):
This variable conditionally defines HAS_GETNETENT if getnetent() is
available to look up network names in some data base or another.
+d_getnetprotos (d_getnetprotos.U):
+ This variable conditionally defines the HAS_GETNET_PROTOS symbol,
+ which indicates to the C program that <netdb.h> supplies
+ prototypes for the various getnet*() functions.
+ See also netdbtype.U for probing for various netdb types.
+
d_getpbyname (d_getprotby.U):
This variable conditionally defines the HAS_GETPROTOBYNAME
symbol, which indicates to the C program that the
@@ -451,6 +478,12 @@ d_getprior (d_getprior.U):
This variable conditionally defines HAS_GETPRIORITY if getpriority()
is available to get a process's priority.
+d_getprotoprotos (d_getprotoprotos.U):
+ This variable conditionally defines the HAS_GETPROTO_PROTOS symbol,
+ which indicates to the C program that <netdb.h> supplies
+ prototypes for the various getproto*() functions.
+ See also netdbtype.U for probing for various netdb types.
+
d_getsbyname (d_getsrvby.U):
This variable conditionally defines the HAS_GETSERVBYNAME
symbol, which indicates to the C program that the
@@ -467,6 +500,12 @@ d_getsent (d_getsent.U):
This variable conditionally defines HAS_GETSERVENT if getservent() is
available to look up network services in some data base or another.
+d_getservprotos (d_getservprotos.U):
+ This variable conditionally defines the HAS_GETSERV_PROTOS symbol,
+ which indicates to the C program that <netdb.h> supplies
+ prototypes for the various getserv*() functions.
+ See also netdbtype.U for probing for various netdb types.
+
d_gettimeod (d_ftime.U):
This variable conditionally defines the HAS_GETTIMEOFDAY symbol, which
indicates that the gettimeofday() system call exists (to obtain a
@@ -513,6 +552,10 @@ d_longdbl (d_longdbl.U):
This variable conditionally defines HAS_LONG_DOUBLE if
the long double type is supported.
+d_longlong (d_longlong.U):
+ This variable conditionally defines HAS_LONG_LONG if
+ the long long type is supported.
+
d_lstat (d_lstat.U):
This variable conditionally defines HAS_LSTAT if lstat() is
available to do file stats on symbolic links.
@@ -1205,6 +1248,11 @@ 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_dbm (i_dbm.U):
+ This variable conditionally defines the I_DBM symbol, which
+ indicates to the C program that <dbm.h> exists and should
+ be included.
+
i_dirent (i_dirent.U):
This variable conditionally defines I_DIRENT, which indicates
to the C program that it should include <dirent.h>.
@@ -1228,6 +1276,11 @@ i_float (i_float.U):
whether a C program may include <float.h> to get symbols like DBL_MAX
or DBL_MIN, i.e. machine dependent floating point values.
+i_gdbm (i_gdbm.U):
+ This variable conditionally defines the I_GDBM symbol, which
+ indicates to the C program that <gdbm.h> exists and should
+ be included.
+
i_grp (i_grp.U):
This variable conditionally defines the I_GRP symbol, and indicates
whether a C program should include <grp.h>.
@@ -1253,6 +1306,11 @@ i_memory (i_memory.U):
This variable conditionally defines the I_MEMORY symbol, and indicates
whether a C program should include <memory.h>.
+i_ndbm (i_ndbm.U):
+ This variable conditionally defines the I_NDBM symbol, which
+ indicates to the C program that <ndbm.h> exists and should
+ be included.
+
i_netdb (i_netdb.U):
This variable conditionally defines the I_NETDB symbol, and indicates
whether a C program should include <netdb.h>.
@@ -1547,6 +1605,11 @@ longdblsize (d_longdbl.U):
indicates to the C program how many bytes there are in a long double,
if this system supports long doubles.
+longlongsize (d_longlong.U):
+ This variable contains the value of the LONGLONGSIZE symbol, which
+ indicates to the C program how many bytes there are in a long long,
+ if this system supports long long.
+
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.
@@ -1643,6 +1706,12 @@ mydomain (myhostname.U):
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.
+myhostname (myhostname.U):
+ This variable contains the eventual value of the MYHOSTNAME symbol,
+ which is the name of the host the program is going to run on.
+ The domain is not kept with hostname, but must be gotten from mydomain.
+ 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
@@ -1949,6 +2018,11 @@ split (models.U):
machines that support separation of instruction and data space. It is
up to the Makefile to use this.
+src (src.U):
+ This variable holds the path to the package source. It is up to
+ the Makefile to use this variable and set VPATH accordingly to
+ find the sources remotely.
+
ssizetype (ssizetype.U):
This variable defines ssizetype to be something like ssize_t,
long or int. It is used by functions that return a count
diff --git a/Porting/config.sh b/Porting/config.sh
index b709411220..ff4f72528b 100644
--- a/Porting/config.sh
+++ b/Porting/config.sh
@@ -8,7 +8,7 @@
# Package name : perl5
# Source directory : .
-# Configuration time: Mon Mar 9 14:20:14 EST 1998
+# Configuration time: Tue Mar 31 15:51:58 EST 1998
# Configured by : doughera
# Target system : linux fractal 2.0.33 #1 tue feb 3 10:11:46 est 1998 i686 unknown
@@ -30,8 +30,8 @@ afs='false'
alignbytes='4'
aphostname=''
ar='ar'
-archlib='/opt/perl/lib/i686-linux-thread/5.00462'
-archlibexp='/opt/perl/lib/i686-linux-thread/5.00462'
+archlib='/opt/perl/lib/i686-linux-thread/5.00463'
+archlibexp='/opt/perl/lib/i686-linux-thread/5.00463'
archname='i686-linux-thread'
archobjs=''
awk='awk'
@@ -51,7 +51,7 @@ ccdlflags='-rdynamic'
ccflags='-D_REENTRANT -Dbool=char -DHAS_BOOL -I/usr/local/include'
cf_by='doughera'
cf_email='yourname@yourhost.yourplace.com'
-cf_time='Mon Mar 9 14:20:14 EST 1998'
+cf_time='Tue Mar 31 15:51:58 EST 1998'
chgrp=''
chmod=''
chown=''
@@ -124,10 +124,12 @@ d_gethbyaddr='define'
d_gethbyname='define'
d_gethent='define'
d_gethname='undef'
+d_gethostprotos='define'
d_getlogin='define'
d_getnbyaddr='define'
d_getnbyname='define'
d_getnent='define'
+d_getnetprotos='define'
d_getpbyname='define'
d_getpbynumber='define'
d_getpent='define'
@@ -136,9 +138,11 @@ d_getpgrp2='undef'
d_getpgrp='define'
d_getppid='define'
d_getprior='define'
+d_getprotoprotos='define'
d_getsbyname='define'
d_getsbyport='define'
d_getsent='define'
+d_getservprotos='define'
d_gettimeod='define'
d_gnulibc='define'
d_htonl='define'
@@ -150,6 +154,7 @@ d_link='define'
d_locconv='define'
d_lockf='define'
d_longdbl='define'
+d_longlong='define'
d_lstat='define'
d_mblen='define'
d_mbstowcs='define'
@@ -298,7 +303,6 @@ 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 '
@@ -366,7 +370,7 @@ i_varhdr='stdarg.h'
i_vfork='undef'
incpath=''
inews=''
-installarchlib='/opt/perl/lib/i686-linux-thread/5.00462'
+installarchlib='/opt/perl/lib/i686-linux-thread/5.00463'
installbin='/opt/perl/bin'
installman1dir='/opt/perl/man/man1'
installman3dir='/opt/perl/man/man3'
@@ -396,6 +400,7 @@ 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'
longdblsize='12'
+longlongsize='8'
longsize='4'
lp=''
lpr=''
@@ -511,7 +516,7 @@ stdio_filbuf=''
stdio_ptr='((fp)->_IO_read_ptr)'
strings='/usr/include/string.h'
submit=''
-subversion='62'
+subversion='63'
sysman='/usr/man/man1'
tail=''
tar=''
@@ -544,5 +549,5 @@ xlibpth='/usr/lib/386 /lib/386'
zcat=''
zip='zip'
PATCHLEVEL=4
-SUBVERSION=62
+SUBVERSION=63
CONFIG=true
diff --git a/Porting/config_H b/Porting/config_H
index 52acfdc8e1..2f07d01ee4 100644
--- a/Porting/config_H
+++ b/Porting/config_H
@@ -17,7 +17,7 @@
/*
* Package name : perl5
* Source directory : .
- * Configuration time: Mon Mar 9 14:20:14 EST 1998
+ * Configuration time: Tue Mar 31 15:51:58 EST 1998
* Configured by : doughera
* Target system : linux fractal 2.0.33 #1 tue feb 3 10:11:46 est 1998 i686 unknown
*/
@@ -641,17 +641,6 @@
#define Shmat_t void * /**/
#define HAS_SHMAT_PROTOTYPE /**/
-/* HAS_SOCKET:
- * This symbol, if defined, indicates that the BSD socket interface is
- * supported.
- */
-/* HAS_SOCKETPAIR:
- * This symbol, if defined, indicates that the BSD socketpair() call is
- * supported.
- */
-#define HAS_SOCKET /**/
-#define HAS_SOCKETPAIR /**/
-
/* USE_STAT_BLOCKS:
* This symbol is defined if this system has a stat structure declaring
* st_blksize and st_blocks.
@@ -762,20 +751,6 @@
*/
#define HAS_TCSETPGRP /**/
-/* Time_t:
- * This symbol holds the type returned by time(). It can be long,
- * or time_t on BSD sites (in which case <sys/types.h> should be
- * included).
- */
-#define Time_t time_t /* Time type */
-
-/* HAS_TIMES:
- * This symbol, if defined, indicates that the times() routine exists.
- * Note that this became obsolete on some systems (SUNOS), which now
- * use getrusage(). It may be necessary to include <sys/times.h>.
- */
-#define HAS_TIMES /**/
-
/* HAS_TRUNCATE:
* This symbol, if defined, indicates that the truncate routine is
* available to truncate files.
@@ -831,22 +806,6 @@
*/
#define HAS_WCTOMB /**/
-/* Fpos_t:
- * This symbol holds the type used to declare file positions in libc.
- * It can be fpos_t, long, uint, etc... It may be necessary to include
- * <sys/types.h> to get any typedef'ed information.
- */
-#define Fpos_t fpos_t /* File position type */
-
-/* Gid_t:
- * This symbol holds the return type of getgid() and the type of
- * argument to setrgid() and related functions. Typically,
- * it is the type of group ids in the kernel. It can be int, ushort,
- * uid_t, etc... It may be necessary to include <sys/types.h> to get
- * any typedef'ed information.
- */
-#define Gid_t gid_t /* Type for getgid(), etc... */
-
/* I_DBM:
* This symbol, if defined, indicates that <dbm.h> exists and should
* be included.
@@ -1059,12 +1018,6 @@
*/
#define I_SYS_TIMES /**/
-/* I_SYS_TYPES:
- * This symbol, if defined, indicates to the C program that it should
- * include <sys/types.h>.
- */
-#define I_SYS_TYPES /**/
-
/* I_SYS_UN:
* This symbol, if defined, indicates to the C program that it should
* include <sys/un.h> to get UNIX domain socket definitions.
@@ -1134,13 +1087,6 @@
*/
/*#define I_VFORK / **/
-/* 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
- * <sys/types.h> to get any typedef'ed information.
- */
-#define Off_t off_t /* <offset> type */
-
/* Free_t:
* This variable contains the return type of free(). It is usually
* void, but occasionally int.
@@ -1156,21 +1102,6 @@
*/
/*#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
- * int or unsigned short. It may be necessary to include <sys/types.h>
- * to get any typedef'ed information.
- */
-#define Mode_t mode_t /* file mode parameter for system calls */
-
-/* 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 Pid_t pid_t /* PID type */
-
/* CAN_PROTOTYPE:
* If defined, this macro indicates that the C compiler can handle
* function prototypes.
@@ -1198,27 +1129,12 @@
*/
#define SH_PATH "/bin/sh" /**/
-/* Size_t:
- * This symbol holds the type used to declare length parameters
- * for string functions. It is usually size_t, but may be
- * unsigned long, int, etc. It may be necessary to include
- * <sys/types.h> to get any typedef'ed information.
- */
-#define Size_t size_t /* length paramater for string functions */
-
/* 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 char /**/
-/* Uid_t:
- * This symbol holds the type used to declare user ids in the kernel.
- * It can be int, ushort, uid_t, etc... It may be necessary to include
- * <sys/types.h> to get any typedef'ed information.
- */
-#define Uid_t uid_t /* UID type */
-
/* VOIDFLAGS:
* This symbol indicates how much support of the void type is given by this
* compiler. What various bits mean:
@@ -1574,8 +1490,8 @@
* 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 "/opt/perl/lib/i686-linux-thread/5.00462" /**/
-#define ARCHLIB_EXP "/opt/perl/lib/i686-linux-thread/5.00462" /**/
+#define ARCHLIB "/opt/perl/lib/i686-linux-thread/5.00463" /**/
+#define ARCHLIB_EXP "/opt/perl/lib/i686-linux-thread/5.00463" /**/
/* CAT2:
* This macro catenates 2 tokens together.
@@ -1713,6 +1629,20 @@
#define LONG_DOUBLESIZE 12 /**/
#endif
+/* HAS_LONG_LONG:
+ * This symbol will be defined if the C compiler supports
+ * long long.
+ */
+/* LONGLONGSIZE:
+ * This symbol contains the size of a long long, so that the
+ * C preprocessor can make decisions based on it. It is only
+ * defined if the system supports long long.
+ */
+#define HAS_LONG_LONG /**/
+#ifdef HAS_LONG_LONG
+#define LONGLONGSIZE 8 /**/
+#endif
+
/* HAS_MKSTEMP:
* This symbol, if defined, indicates that the mkstemp routine is
* available to create and open a unique temporary file.
@@ -1757,6 +1687,17 @@
*/
#define HAS_SETVBUF /**/
+/* HAS_SOCKET:
+ * This symbol, if defined, indicates that the BSD socket interface is
+ * supported.
+ */
+/* HAS_SOCKETPAIR:
+ * This symbol, if defined, indicates that the BSD socketpair() call is
+ * supported.
+ */
+#define HAS_SOCKET /**/
+#define HAS_SOCKETPAIR /**/
+
/* 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
@@ -1784,6 +1725,12 @@
*/
#define I_NETDB /**/
+/* I_SYS_TYPES:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <sys/types.h>.
+ */
+#define I_SYS_TYPES /**/
+
/* PRIVLIB:
* This symbol contains the name of the private library for this package.
* The library is private in the sense that it needn't be in anyone's
@@ -1797,37 +1744,6 @@
#define PRIVLIB "/opt/perl/lib" /**/
#define PRIVLIB_EXP "/opt/perl/lib" /**/
-/* SIG_NAME:
- * This symbol contains a list of signal names in order of
- * signal number. This is intended
- * to be used as a static array initialization, like this:
- * char *sig_name[] = { SIG_NAME };
- * The signals in the list are separated with commas, and each signal
- * is surrounded by double quotes. There is no leading SIG in the signal
- * name, i.e. SIGQUIT is known as "QUIT".
- * Gaps in the signal numbers (up to NSIG) are filled in with NUMnn,
- * etc., where nn is the actual signal number (e.g. NUM37).
- * The signal number for sig_name[i] is stored in sig_num[i].
- * The last element is 0 to terminate the list with a NULL. This
- * corresponds to the 0 at the end of the sig_num list.
- */
-/* SIG_NUM:
- * This symbol contains a list of signal numbers, in the same order as the
- * SIG_NAME list. It is suitable for static array initialization, as in:
- * int sig_num[] = { SIG_NUM };
- * The signals in the list are separated with commas, and the indices
- * within that list and the SIG_NAME list match, so it's easy to compute
- * the signal name from a number or vice versa at the price of a small
- * dynamic linear lookup.
- * Duplicates are allowed, but are moved to the end of the list.
- * The signal number corresponding to sig_name[i] is sig_number[i].
- * if (i < NSIG) then sig_number[i] == i.
- * 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", "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.
* The library is private in the sense that it needn't be in anyone's
@@ -1907,6 +1823,38 @@
*/
/*#define USE_PERLIO / **/
+/* HAS_GETHOST_PROTOS:
+ * This symbol, if defined, indicates that <netdb.h> includes
+ * prototypes for gethostent(), gethostbyname(), and
+ * gethostbyaddr(). Otherwise, it is up to the program to guess
+ * them. See netdbtype.U for probing for various Netdb_xxx_t types.
+ */
+#define HAS_GETHOST_PROTOS /**/
+
+/* HAS_GETNET_PROTOS:
+ * This symbol, if defined, indicates that <netdb.h> includes
+ * prototypes for getnetent(), getnetbyname(), and
+ * getnetbyaddr(). Otherwise, it is up to the program to guess
+ * them. See netdbtype.U for probing for various Netdb_xxx_t types.
+ */
+#define HAS_GETNET_PROTOS /**/
+
+/* HAS_GETPROTO_PROTOS:
+ * This symbol, if defined, indicates that <netdb.h> includes
+ * prototypes for getprotoent(), getprotobyname(), and
+ * getprotobyaddr(). Otherwise, it is up to the program to guess
+ * them. See netdbtype.U for probing for various Netdb_xxx_t types.
+ */
+#define HAS_GETPROTO_PROTOS /**/
+
+/* HAS_GETSERV_PROTOS:
+ * This symbol, if defined, indicates that <netdb.h> includes
+ * prototypes for getservent(), getservbyname(), and
+ * getservbyaddr(). Otherwise, it is up to the program to guess
+ * them. See netdbtype.U for probing for various Netdb_xxx_t types.
+ */
+#define HAS_GETSERV_PROTOS /**/
+
/* Netdb_host_t:
* This symbol holds the type used for the 1st argument
* to gethostbyaddr().
@@ -1936,6 +1884,37 @@
*/
#define Select_fd_set_t fd_set * /**/
+/* SIG_NAME:
+ * This symbol contains a list of signal names in order of
+ * signal number. This is intended
+ * to be used as a static array initialization, like this:
+ * char *sig_name[] = { SIG_NAME };
+ * The signals in the list are separated with commas, and each signal
+ * is surrounded by double quotes. There is no leading SIG in the signal
+ * name, i.e. SIGQUIT is known as "QUIT".
+ * Gaps in the signal numbers (up to NSIG) are filled in with NUMnn,
+ * etc., where nn is the actual signal number (e.g. NUM37).
+ * The signal number for sig_name[i] is stored in sig_num[i].
+ * The last element is 0 to terminate the list with a NULL. This
+ * corresponds to the 0 at the end of the sig_num list.
+ */
+/* SIG_NUM:
+ * This symbol contains a list of signal numbers, in the same order as the
+ * SIG_NAME list. It is suitable for static array initialization, as in:
+ * int sig_num[] = { SIG_NUM };
+ * The signals in the list are separated with commas, and the indices
+ * within that list and the SIG_NAME list match, so it's easy to compute
+ * the signal name from a number or vice versa at the price of a small
+ * dynamic linear lookup.
+ * Duplicates are allowed, but are moved to the end of the list.
+ * The signal number corresponding to sig_name[i] is sig_number[i].
+ * if (i < NSIG) then sig_number[i] == i.
+ * 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", "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 /**/
+
/* ARCHNAME:
* This symbol holds a string representing the architecture name.
* It may be used to construct an architecture-dependant pathname
@@ -1968,4 +1947,71 @@
#define USE_THREADS /**/
/*#define OLD_PTHREADS_API / **/
+/* Time_t:
+ * This symbol holds the type returned by time(). It can be long,
+ * or time_t on BSD sites (in which case <sys/types.h> should be
+ * included).
+ */
+#define Time_t time_t /* Time type */
+
+/* HAS_TIMES:
+ * This symbol, if defined, indicates that the times() routine exists.
+ * Note that this became obsolete on some systems (SUNOS), which now
+ * use getrusage(). It may be necessary to include <sys/times.h>.
+ */
+#define HAS_TIMES /**/
+
+/* Fpos_t:
+ * This symbol holds the type used to declare file positions in libc.
+ * It can be fpos_t, long, uint, etc... It may be necessary to include
+ * <sys/types.h> to get any typedef'ed information.
+ */
+#define Fpos_t fpos_t /* File position type */
+
+/* Gid_t:
+ * This symbol holds the return type of getgid() and the type of
+ * argument to setrgid() and related functions. Typically,
+ * it is the type of group ids in the kernel. It can be int, ushort,
+ * uid_t, etc... It may be necessary to include <sys/types.h> to get
+ * any typedef'ed information.
+ */
+#define Gid_t gid_t /* Type for getgid(), etc... */
+
+/* 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
+ * <sys/types.h> to get any typedef'ed information.
+ */
+#define Off_t off_t /* <offset> type */
+
+/* Mode_t:
+ * This symbol holds the type used to declare file modes
+ * for systems calls. It is usually mode_t, but may be
+ * int or unsigned short. It may be necessary to include <sys/types.h>
+ * to get any typedef'ed information.
+ */
+#define Mode_t mode_t /* file mode parameter for system calls */
+
+/* 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 Pid_t pid_t /* PID type */
+
+/* Size_t:
+ * This symbol holds the type used to declare length parameters
+ * for string functions. It is usually size_t, but may be
+ * unsigned long, int, etc. It may be necessary to include
+ * <sys/types.h> to get any typedef'ed information.
+ */
+#define Size_t size_t /* length paramater for string functions */
+
+/* Uid_t:
+ * This symbol holds the type used to declare user ids in the kernel.
+ * It can be int, ushort, uid_t, etc... It may be necessary to include
+ * <sys/types.h> to get any typedef'ed information.
+ */
+#define Uid_t uid_t /* UID type */
+
#endif
diff --git a/config_h.SH b/config_h.SH
index 77750cd98c..1d3a13d209 100644
--- a/config_h.SH
+++ b/config_h.SH
@@ -655,17 +655,6 @@ sed <<!GROK!THIS! >config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un-
#define Shmat_t $shmattype /**/
#$d_shmatprototype HAS_SHMAT_PROTOTYPE /**/
-/* HAS_SOCKET:
- * This symbol, if defined, indicates that the BSD socket interface is
- * supported.
- */
-/* HAS_SOCKETPAIR:
- * This symbol, if defined, indicates that the BSD socketpair() call is
- * supported.
- */
-#$d_socket HAS_SOCKET /**/
-#$d_sockpair HAS_SOCKETPAIR /**/
-
/* USE_STAT_BLOCKS:
* This symbol is defined if this system has a stat structure declaring
* st_blksize and st_blocks.
@@ -776,20 +765,6 @@ sed <<!GROK!THIS! >config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un-
*/
#$d_tcsetpgrp HAS_TCSETPGRP /**/
-/* Time_t:
- * This symbol holds the type returned by time(). It can be long,
- * or time_t on BSD sites (in which case <sys/types.h> should be
- * included).
- */
-#define Time_t $timetype /* Time type */
-
-/* HAS_TIMES:
- * This symbol, if defined, indicates that the times() routine exists.
- * Note that this became obsolete on some systems (SUNOS), which now
- * use getrusage(). It may be necessary to include <sys/times.h>.
- */
-#$d_times HAS_TIMES /**/
-
/* HAS_TRUNCATE:
* This symbol, if defined, indicates that the truncate routine is
* available to truncate files.
@@ -845,22 +820,6 @@ sed <<!GROK!THIS! >config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un-
*/
#$d_wctomb HAS_WCTOMB /**/
-/* Fpos_t:
- * This symbol holds the type used to declare file positions in libc.
- * It can be fpos_t, long, uint, etc... It may be necessary to include
- * <sys/types.h> to get any typedef'ed information.
- */
-#define Fpos_t $fpostype /* File position type */
-
-/* Gid_t:
- * This symbol holds the return type of getgid() and the type of
- * argument to setrgid() and related functions. Typically,
- * it is the type of group ids in the kernel. It can be int, ushort,
- * uid_t, etc... It may be necessary to include <sys/types.h> to get
- * any typedef'ed information.
- */
-#define Gid_t $gidtype /* Type for getgid(), etc... */
-
/* I_DBM:
* This symbol, if defined, indicates that <dbm.h> exists and should
* be included.
@@ -1073,12 +1032,6 @@ sed <<!GROK!THIS! >config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un-
*/
#$i_systimes I_SYS_TIMES /**/
-/* I_SYS_TYPES:
- * This symbol, if defined, indicates to the C program that it should
- * include <sys/types.h>.
- */
-#$i_systypes I_SYS_TYPES /**/
-
/* I_SYS_UN:
* This symbol, if defined, indicates to the C program that it should
* include <sys/un.h> to get UNIX domain socket definitions.
@@ -1148,13 +1101,6 @@ sed <<!GROK!THIS! >config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un-
*/
#$i_vfork I_VFORK /**/
-/* 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
- * <sys/types.h> to get any typedef'ed information.
- */
-#define Off_t $lseektype /* <offset> type */
-
/* Free_t:
* This variable contains the return type of free(). It is usually
* void, but occasionally int.
@@ -1170,21 +1116,6 @@ sed <<!GROK!THIS! >config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un-
*/
#$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
- * int or unsigned short. It may be necessary to include <sys/types.h>
- * to get any typedef'ed information.
- */
-#define Mode_t $modetype /* file mode parameter for system calls */
-
-/* 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 Pid_t $pidtype /* PID type */
-
/* CAN_PROTOTYPE:
* If defined, this macro indicates that the C compiler can handle
* function prototypes.
@@ -1212,27 +1143,12 @@ sed <<!GROK!THIS! >config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un-
*/
#define SH_PATH "$sh" /**/
-/* Size_t:
- * This symbol holds the type used to declare length parameters
- * for string functions. It is usually size_t, but may be
- * unsigned long, int, etc. It may be necessary to include
- * <sys/types.h> to get any typedef'ed information.
- */
-#define Size_t $sizetype /* length paramater for string functions */
-
/* 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 $stdchar /**/
-/* Uid_t:
- * This symbol holds the type used to declare user ids in the kernel.
- * It can be int, ushort, uid_t, etc... It may be necessary to include
- * <sys/types.h> to get any typedef'ed information.
- */
-#define Uid_t $uidtype /* UID type */
-
/* VOIDFLAGS:
* This symbol indicates how much support of the void type is given by this
* compiler. What various bits mean:
@@ -1727,6 +1643,20 @@ sed <<!GROK!THIS! >config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un-
#define LONG_DOUBLESIZE $longdblsize /**/
#endif
+/* HAS_LONG_LONG:
+ * This symbol will be defined if the C compiler supports
+ * long long.
+ */
+/* LONGLONGSIZE:
+ * This symbol contains the size of a long long, so that the
+ * C preprocessor can make decisions based on it. It is only
+ * defined if the system supports long long.
+ */
+#$d_longlong HAS_LONG_LONG /**/
+#ifdef HAS_LONG_LONG
+#define LONGLONGSIZE $longlongsize /**/
+#endif
+
/* HAS_MKSTEMP:
* This symbol, if defined, indicates that the mkstemp routine is
* available to create and open a unique temporary file.
@@ -1771,6 +1701,17 @@ sed <<!GROK!THIS! >config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un-
*/
#$d_setvbuf HAS_SETVBUF /**/
+/* HAS_SOCKET:
+ * This symbol, if defined, indicates that the BSD socket interface is
+ * supported.
+ */
+/* HAS_SOCKETPAIR:
+ * This symbol, if defined, indicates that the BSD socketpair() call is
+ * supported.
+ */
+#$d_socket HAS_SOCKET /**/
+#$d_sockpair HAS_SOCKETPAIR /**/
+
/* 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
@@ -1798,6 +1739,12 @@ sed <<!GROK!THIS! >config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un-
*/
#$i_netdb I_NETDB /**/
+/* I_SYS_TYPES:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <sys/types.h>.
+ */
+#$i_systypes I_SYS_TYPES /**/
+
/* PRIVLIB:
* This symbol contains the name of the private library for this package.
* The library is private in the sense that it needn't be in anyone's
@@ -1811,37 +1758,6 @@ sed <<!GROK!THIS! >config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un-
#define PRIVLIB "$privlib" /**/
#define PRIVLIB_EXP "$privlibexp" /**/
-/* SIG_NAME:
- * This symbol contains a list of signal names in order of
- * signal number. This is intended
- * to be used as a static array initialization, like this:
- * char *sig_name[] = { SIG_NAME };
- * The signals in the list are separated with commas, and each signal
- * is surrounded by double quotes. There is no leading SIG in the signal
- * name, i.e. SIGQUIT is known as "QUIT".
- * Gaps in the signal numbers (up to NSIG) are filled in with NUMnn,
- * etc., where nn is the actual signal number (e.g. NUM37).
- * The signal number for sig_name[i] is stored in sig_num[i].
- * The last element is 0 to terminate the list with a NULL. This
- * corresponds to the 0 at the end of the sig_num list.
- */
-/* SIG_NUM:
- * This symbol contains a list of signal numbers, in the same order as the
- * SIG_NAME list. It is suitable for static array initialization, as in:
- * int sig_num[] = { SIG_NUM };
- * The signals in the list are separated with commas, and the indices
- * within that list and the SIG_NAME list match, so it's easy to compute
- * the signal name from a number or vice versa at the price of a small
- * dynamic linear lookup.
- * Duplicates are allowed, but are moved to the end of the list.
- * The signal number corresponding to sig_name[i] is sig_number[i].
- * if (i < NSIG) then sig_number[i] == i.
- * The last element is 0, corresponding to the 0 at the end of
- * the sig_name list.
- */
-#define SIG_NAME $sig_name_init /**/
-#define SIG_NUM $sig_num /**/
-
/* SITEARCH:
* This symbol contains the name of the private library for this package.
* The library is private in the sense that it needn't be in anyone's
@@ -1921,6 +1837,38 @@ sed <<!GROK!THIS! >config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un-
*/
#$useperlio USE_PERLIO /**/
+/* HAS_GETHOST_PROTOS:
+ * This symbol, if defined, indicates that <netdb.h> includes
+ * prototypes for gethostent(), gethostbyname(), and
+ * gethostbyaddr(). Otherwise, it is up to the program to guess
+ * them. See netdbtype.U for probing for various Netdb_xxx_t types.
+ */
+#$d_gethostprotos HAS_GETHOST_PROTOS /**/
+
+/* HAS_GETNET_PROTOS:
+ * This symbol, if defined, indicates that <netdb.h> includes
+ * prototypes for getnetent(), getnetbyname(), and
+ * getnetbyaddr(). Otherwise, it is up to the program to guess
+ * them. See netdbtype.U for probing for various Netdb_xxx_t types.
+ */
+#$d_getnetprotos HAS_GETNET_PROTOS /**/
+
+/* HAS_GETPROTO_PROTOS:
+ * This symbol, if defined, indicates that <netdb.h> includes
+ * prototypes for getprotoent(), getprotobyname(), and
+ * getprotobyaddr(). Otherwise, it is up to the program to guess
+ * them. See netdbtype.U for probing for various Netdb_xxx_t types.
+ */
+#$d_getprotoprotos HAS_GETPROTO_PROTOS /**/
+
+/* HAS_GETSERV_PROTOS:
+ * This symbol, if defined, indicates that <netdb.h> includes
+ * prototypes for getservent(), getservbyname(), and
+ * getservbyaddr(). Otherwise, it is up to the program to guess
+ * them. See netdbtype.U for probing for various Netdb_xxx_t types.
+ */
+#$d_getservprotos HAS_GETSERV_PROTOS /**/
+
/* Netdb_host_t:
* This symbol holds the type used for the 1st argument
* to gethostbyaddr().
@@ -1950,6 +1898,37 @@ sed <<!GROK!THIS! >config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un-
*/
#define Select_fd_set_t $selecttype /**/
+/* SIG_NAME:
+ * This symbol contains a list of signal names in order of
+ * signal number. This is intended
+ * to be used as a static array initialization, like this:
+ * char *sig_name[] = { SIG_NAME };
+ * The signals in the list are separated with commas, and each signal
+ * is surrounded by double quotes. There is no leading SIG in the signal
+ * name, i.e. SIGQUIT is known as "QUIT".
+ * Gaps in the signal numbers (up to NSIG) are filled in with NUMnn,
+ * etc., where nn is the actual signal number (e.g. NUM37).
+ * The signal number for sig_name[i] is stored in sig_num[i].
+ * The last element is 0 to terminate the list with a NULL. This
+ * corresponds to the 0 at the end of the sig_num list.
+ */
+/* SIG_NUM:
+ * This symbol contains a list of signal numbers, in the same order as the
+ * SIG_NAME list. It is suitable for static array initialization, as in:
+ * int sig_num[] = { SIG_NUM };
+ * The signals in the list are separated with commas, and the indices
+ * within that list and the SIG_NAME list match, so it's easy to compute
+ * the signal name from a number or vice versa at the price of a small
+ * dynamic linear lookup.
+ * Duplicates are allowed, but are moved to the end of the list.
+ * The signal number corresponding to sig_name[i] is sig_number[i].
+ * if (i < NSIG) then sig_number[i] == i.
+ * The last element is 0, corresponding to the 0 at the end of
+ * the sig_name list.
+ */
+#define SIG_NAME $sig_name_init /**/
+#define SIG_NUM $sig_num /**/
+
/* ARCHNAME:
* This symbol holds a string representing the architecture name.
* It may be used to construct an architecture-dependant pathname
@@ -1982,5 +1961,72 @@ sed <<!GROK!THIS! >config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un-
#$usethreads USE_THREADS /**/
#$d_oldpthreads OLD_PTHREADS_API /**/
+/* Time_t:
+ * This symbol holds the type returned by time(). It can be long,
+ * or time_t on BSD sites (in which case <sys/types.h> should be
+ * included).
+ */
+#define Time_t $timetype /* Time type */
+
+/* HAS_TIMES:
+ * This symbol, if defined, indicates that the times() routine exists.
+ * Note that this became obsolete on some systems (SUNOS), which now
+ * use getrusage(). It may be necessary to include <sys/times.h>.
+ */
+#$d_times HAS_TIMES /**/
+
+/* Fpos_t:
+ * This symbol holds the type used to declare file positions in libc.
+ * It can be fpos_t, long, uint, etc... It may be necessary to include
+ * <sys/types.h> to get any typedef'ed information.
+ */
+#define Fpos_t $fpostype /* File position type */
+
+/* Gid_t:
+ * This symbol holds the return type of getgid() and the type of
+ * argument to setrgid() and related functions. Typically,
+ * it is the type of group ids in the kernel. It can be int, ushort,
+ * uid_t, etc... It may be necessary to include <sys/types.h> to get
+ * any typedef'ed information.
+ */
+#define Gid_t $gidtype /* Type for getgid(), etc... */
+
+/* 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
+ * <sys/types.h> to get any typedef'ed information.
+ */
+#define Off_t $lseektype /* <offset> type */
+
+/* Mode_t:
+ * This symbol holds the type used to declare file modes
+ * for systems calls. It is usually mode_t, but may be
+ * int or unsigned short. It may be necessary to include <sys/types.h>
+ * to get any typedef'ed information.
+ */
+#define Mode_t $modetype /* file mode parameter for system calls */
+
+/* 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 Pid_t $pidtype /* PID type */
+
+/* Size_t:
+ * This symbol holds the type used to declare length parameters
+ * for string functions. It is usually size_t, but may be
+ * unsigned long, int, etc. It may be necessary to include
+ * <sys/types.h> to get any typedef'ed information.
+ */
+#define Size_t $sizetype /* length paramater for string functions */
+
+/* Uid_t:
+ * This symbol holds the type used to declare user ids in the kernel.
+ * It can be int, ushort, uid_t, etc... It may be necessary to include
+ * <sys/types.h> to get any typedef'ed information.
+ */
+#define Uid_t $uidtype /* UID type */
+
#endif
!GROK!THIS!
diff --git a/ext/POSIX/POSIX.xs b/ext/POSIX/POSIX.xs
index 817ef1130b..922438dca5 100644
--- a/ext/POSIX/POSIX.xs
+++ b/ext/POSIX/POSIX.xs
@@ -268,7 +268,13 @@ init_tm(ptm) /* see mktime, strftime and asctime */
#endif
-#ifndef HAS_LONG_DOUBLE /* XXX What to do about long doubles? */
+#ifdef HAS_LONG_DOUBLE
+# if LONG_DOUBLESIZE > DOUBLESIZE
+# undef HAS_LONG_DOUBLE /* XXX until we figure out how to use them */
+# endif
+#endif
+
+#ifndef HAS_LONG_DOUBLE
#ifdef LDBL_MAX
#undef LDBL_MAX
#endif
diff --git a/handy.h b/handy.h
index b9d3462940..233304b1f2 100644
--- a/handy.h
+++ b/handy.h
@@ -82,31 +82,27 @@
expecting an int), but the disadvantage that an I32 is not 32 bits.
Andy Dougherty August 1996
- In the future, we may perhaps want to think about something like
- #if INTSIZE == 4
- typedef I32 int;
- #else
- # if LONGSIZE == 4
- typedef I32 long;
- # else
- # if SHORTSIZE == 4
- typedef I32 short;
- # else
- typedef I32 int;
- # endif
- # endif
- #endif
-
- except that still won't work if a system has no integral type
- with a size that is 32 bytes.
-
- Further, we need to know about PTRSIZE == sizeof(void *) and
- DOUBLESIZE == sizeof(double) if we really want to try to handle
- 32/64-bit combinations. Finally, we might also need to know
- HAS_LONG_DOUBLE and LONG_DOUBLESIZE.
-
- For the moment, these are only mentioned here so metaconfig will
- construct Configure to figure out the various sizes.
+ There is no guarantee that there is *any* integral type with
+ exactly 32 bits. It is perfectly legal for a system to have
+ sizeof(short) == sizeof(int) == sizeof(long) == 8.
+
+ Similarly, there is no guarantee that I16 and U16 have exactly 16
+ bits.
+
+ For dealing with issues that may arise from various 32/64-bit
+ systems, we will ask Configure to check out
+ SHORTSIZE == sizeof(short)
+ INTSIZE == sizeof(int)
+ LONGSIZE == sizeof(long)
+ LONGLONGSIZE == sizeof(long long) (if HAS_LONG_LONG)
+ PTRSIZE == sizeof(void *)
+ DOUBLESIZE == sizeof(double)
+ LONG_DOUBLESIZE == sizeof(long double) (if HAS_LONG_DOUBLE).
+ Most of these are currently unused, but they are mentioned here so
+ metaconfig will include the appropriate tests in Configure and
+ we can then start to consider how best to deal with long long
+ variables.
+ Andy Dougherty April 1998
*/
typedef char I8;
diff --git a/hints/hpux.sh b/hints/hpux.sh
index cbf80cc669..9b272aef76 100644
--- a/hints/hpux.sh
+++ b/hints/hpux.sh
@@ -169,6 +169,11 @@ case "$prefix" in
'') prefix='/opt/perl5' ;;
esac
+# HP-UX can't do setuid emulation offered by Configure
+case "$d_dosuid" in
+'') d_dosuid="$undef" ;;
+esac
+
# Date: Fri, 6 Sep 96 23:15:31 CDT
# From: "Daniel S. Lewart" <d-lewart@uiuc.edu>
# I looked through the gcc.info and found this:
diff --git a/myconfig b/myconfig
index 16327c2d6f..3fff7efc31 100755
--- a/myconfig
+++ b/myconfig
@@ -17,7 +17,6 @@ fi
# Note that the text lines /^Summary of/ .. /^\s*$/ are copied into Config.pm.
$spitshell <<!GROK!THIS!
-
Summary of my $package ($baserev patchlevel $PATCHLEVEL subversion $SUBVERSION) configuration:
Platform:
osname=$osname, osvers=$osvers, archname=$archname
@@ -30,15 +29,14 @@ Summary of my $package ($baserev patchlevel $PATCHLEVEL subversion $SUBVERSION)
ccflags ='$ccflags'
stdchar='$stdchar', d_stdstdio=$d_stdstdio, usevfork=$usevfork
intsize=$intsize, longsize=$longsize, ptrsize=$ptrsize, doublesize=$doublesize
+ d_longlong=$d_longlong, longlongsize=$longlongsize, d_longdbl=$d_longdbl, longdblsize=$longdblsize
alignbytes=$alignbytes, usemymalloc=$usemymalloc, prototype=$prototype
Linker and Libraries:
ld='$ld', ldflags ='$ldflags'
libpth=$libpth
libs=$libs
- libc=$libc, so=$so
- useshrplib=$useshrplib, libperl=$libperl
+ libc=$libc, so=$so, useshrplib=$useshrplib, libperl=$libperl
Dynamic Linking:
dlsrc=$dlsrc, dlext=$dlext, d_dlsymun=$d_dlsymun, ccdlflags='$ccdlflags'
cccdlflags='$cccdlflags', lddlflags='$lddlflags'
-
!GROK!THIS!
diff --git a/perlsock.h b/perlsock.h
index 1a147f9479..dc1a374f71 100644
--- a/perlsock.h
+++ b/perlsock.h
@@ -10,17 +10,30 @@
#define PerlSock_accept(s, a, l) accept(s, a, l)
#define PerlSock_bind(s, n, l) bind(s, n, l)
#define PerlSock_connect(s, n, l) connect(s, n, l)
+
#define PerlSock_gethostbyaddr(a, l, t) gethostbyaddr(a, l, t)
#define PerlSock_gethostbyname(n) gethostbyname(n)
-#define PerlSock_gethostent() gethostent()
+#define PerlSock_gethostent gethostent
+#define PerlSock_endhostent endhostent
#define PerlSock_gethostname(n, l) gethostname(n, l)
+
+#define PerlSock_getnetbyaddr(n, t) getnetbyaddr(n, t)
+#define PerlSock_getnetbyname(n) getnetbyname(n)
+#define PerlSock_getnetent getnetent
+#define PerlSock_endnetent endnetent
+
#define PerlSock_getpeername(s, n, l) getpeername(s, n, l)
+
#define PerlSock_getprotobyname(n) getprotobyname(n)
#define PerlSock_getprotobynumber(n) getprotobynumber(n)
-#define PerlSock_getprotoent() getprotoent()
+#define PerlSock_getprotoent getprotoent
+#define PerlSock_endprotoent endprotoent
+
#define PerlSock_getservbyname(n, p) getservbyname(n, p)
#define PerlSock_getservbyport(port, p) getservbyport(port, p)
-#define PerlSock_getservent() getservent()
+#define PerlSock_getservent getservent
+#define PerlSock_endservent endservent
+
#define PerlSock_getsockname(s, n, l) getsockname(s, n, l)
#define PerlSock_getsockopt(s, l, n, v, i) getsockopt(s, l, n, v, i)
#define PerlSock_listen(s, b) listen(s, b)
diff --git a/pp.c b/pp.c
index b266cb2579..249b909833 100644
--- a/pp.c
+++ b/pp.c
@@ -69,7 +69,11 @@ typedef unsigned UBW;
* If they're not right on your machine, then pack() and unpack()
* wouldn't work right anyway; you'll need to apply the Cray hack.
* (I'd like to check them with #if, but you can't use sizeof() in
- * the preprocessor.)
+ * the preprocessor.) --???
+ */
+/*
+ The appropriate SHORTSIZE, INTSIZE, LONGSIZE, and LONGLONGSIZE
+ defines are now in config.h. --Andy Dougherty April 1998
*/
#define SIZE16 2
#define SIZE32 4
diff --git a/pp_sys.c b/pp_sys.c
index c2fcb6f0d6..5cfb74bd61 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -54,7 +54,11 @@ extern "C" int syscall(unsigned long,...);
#endif
#endif
-#ifdef HOST_NOT_FOUND
+/* XXX Configure test needed.
+ h_errno might not be a simple 'int', especially for multi-threaded
+ applications. HOST_NOT_FOUND is typically defined in <netdb.h>.
+*/
+#if defined(HOST_NOT_FOUND) && !defined(h_errno)
extern int h_errno;
#endif
@@ -3607,33 +3611,38 @@ PP(pp_ghostent)
I32 which = op->op_type;
register char **elem;
register SV *sv;
-#if defined(HAS_GETHOSTENT) && !defined(DONT_DECLARE_STD)
+#ifndef HAS_GETHOST_PROTOS /* XXX Do we need individual probes? */
struct hostent *PerlSock_gethostbyaddr(Netdb_host_t, Netdb_hlen_t, int);
struct hostent *PerlSock_gethostbyname(Netdb_name_t);
-#ifndef PerlSock_gethostent
struct hostent *PerlSock_gethostent(void);
#endif
-#endif
struct hostent *hent;
unsigned long len;
EXTEND(SP, 10);
- if (which == OP_GHBYNAME) {
+ if (which == OP_GHBYNAME)
+#ifdef HAS_GETHOSTBYNAME
hent = PerlSock_gethostbyname(POPp);
- }
+#else
+ DIE(no_sock_func, "gethostbyname");
+#endif
else if (which == OP_GHBYADDR) {
+#ifdef HAS_GETHOSTBYADDR
int addrtype = POPi;
SV *addrsv = POPs;
STRLEN addrlen;
Netdb_host_t addr = (Netdb_host_t) SvPV(addrsv, addrlen);
hent = PerlSock_gethostbyaddr(addr, (Netdb_hlen_t) addrlen, addrtype);
+#else
+ DIE(no_sock_func, "gethostbyaddr");
+#endif
}
else
#ifdef HAS_GETHOSTENT
hent = PerlSock_gethostent();
#else
- DIE("gethostent not implemented");
+ DIE(no_sock_func, "gethostent");
#endif
#ifdef HOST_NOT_FOUND
@@ -3710,22 +3719,34 @@ PP(pp_gnetent)
I32 which = op->op_type;
register char **elem;
register SV *sv;
-#ifdef NETDB_H_OMITS_GETNET
- struct netent *getnetbyaddr(Netdb_net_t, int);
- struct netent *getnetbyname(Netdb_name_t);
- struct netent *getnetent(void);
+#ifndef HAS_GETNET_PROTOS /* XXX Do we need individual probes? */
+ struct netent *PerlSock_getnetbyaddr(Netdb_net_t, int);
+ struct netent *PerlSock_getnetbyname(Netdb_name_t);
+ struct netent *PerlSock_getnetent(void);
#endif
struct netent *nent;
if (which == OP_GNBYNAME)
- nent = getnetbyname(POPp);
+#ifdef HAS_GETNETBYNAME
+ nent = PerlSock_getnetbyname(POPp);
+#else
+ DIE(no_sock_func, "getnetbyname");
+#endif
else if (which == OP_GNBYADDR) {
+#ifdef HAS_GETNETBYADDR
int addrtype = POPi;
Netdb_net_t addr = (Netdb_net_t) U_L(POPn);
- nent = getnetbyaddr(addr, addrtype);
+ nent = PerlSock_getnetbyaddr(addr, addrtype);
+#else
+ DIE(no_sock_func, "getnetbyaddr");
+#endif
}
else
- nent = getnetent();
+#ifdef HAS_GETNETENT
+ nent = PerlSock_getnetent();
+#else
+ DIE(no_sock_func, "getnetent");
+#endif
EXTEND(SP, 4);
if (GIMME != G_ARRAY) {
@@ -3785,13 +3806,11 @@ PP(pp_gprotoent)
I32 which = op->op_type;
register char **elem;
register SV *sv;
-#ifndef DONT_DECLARE_STD
+#ifndef HAS_GETPROTO_PROTOS /* XXX Do we need individual probes? */
struct protoent *PerlSock_getprotobyname(Netdb_name_t);
struct protoent *PerlSock_getprotobynumber(int);
-#ifndef PerlSock_getprotoent
struct protoent *PerlSock_getprotoent(void);
#endif
-#endif
struct protoent *pent;
if (which == OP_GPBYNAME)
@@ -3869,16 +3888,15 @@ PP(pp_gservent)
I32 which = op->op_type;
register char **elem;
register SV *sv;
-#ifndef DONT_DECLARE_STD
+#ifndef HAS_GETSERV_PROTOS /* XXX Do we need individual probes? */
struct servent *PerlSock_getservbyname(Netdb_name_t, Netdb_name_t);
struct servent *PerlSock_getservbyport(int, Netdb_name_t);
-#ifndef PerlSock_getservent
struct servent *PerlSock_getservent(void);
#endif
-#endif
struct servent *sent;
if (which == OP_GSBYNAME) {
+#ifdef HAS_GETSERVBYNAME
char *proto = POPp;
char *name = POPp;
@@ -3886,8 +3904,12 @@ PP(pp_gservent)
proto = Nullch;
sent = PerlSock_getservbyname(name, proto);
+#else
+ DIE(no_sock_func, "getservbyname");
+#endif
}
else if (which == OP_GSBYPORT) {
+#ifdef HAS_GETSERVBYPORT
char *proto = POPp;
unsigned short port = POPu;
@@ -3895,6 +3917,9 @@ PP(pp_gservent)
port = PerlSock_htons(port);
#endif
sent = PerlSock_getservbyport(port, proto);
+#else
+ DIE(no_sock_func, "getservbyport");
+#endif
}
else
#ifdef HAS_GETSERVENT
@@ -3993,7 +4018,7 @@ PP(pp_ehostent)
{
djSP;
#ifdef HAS_ENDHOSTENT
- endhostent();
+ PerlSock_endhostent();
EXTEND(SP,1);
RETPUSHYES;
#else
@@ -4005,7 +4030,7 @@ PP(pp_enetent)
{
djSP;
#ifdef HAS_ENDNETENT
- endnetent();
+ PerlSock_endnetent();
EXTEND(SP,1);
RETPUSHYES;
#else
@@ -4017,7 +4042,7 @@ PP(pp_eprotoent)
{
djSP;
#ifdef HAS_ENDPROTOENT
- endprotoent();
+ PerlSock_endprotoent();
EXTEND(SP,1);
RETPUSHYES;
#else
@@ -4029,7 +4054,7 @@ PP(pp_eservent)
{
djSP;
#ifdef HAS_ENDSERVENT
- endservent();
+ PerlSock_endservent();
EXTEND(SP,1);
RETPUSHYES;
#else
diff --git a/regexec.c b/regexec.c
index b11bb9af86..250704c228 100644
--- a/regexec.c
+++ b/regexec.c
@@ -1313,7 +1313,7 @@ regmatch(regnode *prog)
*reglastparen = paren;
}
#endif
- scan = NEXTOPER(scan) + 4/sizeof(regnode);
+ scan = NEXTOPER(scan) + NODE_STEP_REGNODE;
if (paren)
scan += NEXT_OFF(scan); /* Skip former OPEN. */
reginput = locinput;
@@ -1427,13 +1427,13 @@ regmatch(regnode *prog)
*reglastparen = paren;
ln = ARG1(scan); /* min to match */
n = ARG2(scan); /* max to match */
- scan = regnext(NEXTOPER(scan) + 4/sizeof(regnode));
+ scan = regnext(NEXTOPER(scan) + NODE_STEP_REGNODE);
goto repeat;
case CURLY:
paren = 0;
ln = ARG1(scan); /* min to match */
n = ARG2(scan); /* max to match */
- scan = NEXTOPER(scan) + 4/sizeof(regnode);
+ scan = NEXTOPER(scan) + NODE_STEP_REGNODE;
goto repeat;
case STAR:
ln = 0;