[PATCH for 5.004_64] Configure patch Config_64-01
Andy Dougherty [Tue, 14 Apr 1998 13:04:58 +0000 (09:04 -0400)]
Date: Tue, 14 Apr 1998 13:04:58 -0400 (EDT)
Subject: [PATCH for 5.004_64] Configure patch Config_64-01-02.diff
Date: Fri, 17 Apr 1998 11:01:13 -0400 (EDT)
Subject: [PATCH for 5.004_64] Configure patch Config_64-02-03.diff
Date: Thu, 23 Apr 1998 15:03:20 -0400 (EDT)
Subject: [PATCH 5.004_64] Config_64-03-04.diff
Date: Wed, 13 May 1998 14:33:30 -0400 (EDT)

p4raw-id: //depot/perl@948

38 files changed:
Configure
INSTALL
MANIFEST
Makefile.SH
Policy_sh.SH
Porting/Glossary
Porting/config.sh
Porting/config_H
Porting/pumpkin.pod
README.beos [new file with mode: 0644]
Todo
beos/nm.c [new file with mode: 0644]
cflags.SH
config_h.SH
djgpp/djgppsed.sh
doop.c
handy.h
hints/beos.sh [new file with mode: 0644]
hints/dos_djgpp.sh
hints/netbsd.sh
hints/solaris_2.sh
hints/unicos.sh
hints/unicosmk.sh
hv.h
lib/Term/ReadLine.pm
perl.h
plan9/config.plan9
pod/perlfunc.pod
pp.c
pp_sys.c
sv.h
t/io/pipe.t
thread.h
vms/config.vms
win32/config.bc
win32/config.vc
win32/config_H.bc
win32/config_H.vc

index 4430ece..65b1872 100755 (executable)
--- 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 Thu Apr  2 09:30:50 EST 1998 [metaconfig 3.0 PL70]
+# Generated on Wed May 13 13:35:54 EDT 1998 [metaconfig 3.0 PL70]
 
 cat >/tmp/c1$$ <<EOF
 ARGGGHHHH!!!!!
@@ -63,7 +63,7 @@ if test -d c:/. ; then
                p_=\;
                PATH=`cmd /c "echo %PATH%" | tr '\\\\' / `
                OS2_SHELL=`cmd /c "echo %OS2_SHELL%" | tr '\\\\' / | tr '[A-Z]' '[a-z]'`
-       elif test -n "$DJDIR"; then
+       elif test -n "$DJGPP"; then
                p_=\;
        fi
 fi
@@ -109,7 +109,7 @@ if test -d /usr/lpp -a -f /usr/bin/bsh -a -f /usr/bin/uname; then
 fi
 case "$inksh/$needksh" in
 /[a-z]*)
-               unset ENV
+               ENV=''
                changesh=true
                reason="$needksh"
        ;;
@@ -140,7 +140,7 @@ esac
 
 : Configure runs within the UU subdirectory
 test -d UU || mkdir UU
-unset CDPATH
+CDPATH=''
 cd UU && rm -f ./*
 
 dynamic_ext=''
@@ -249,6 +249,7 @@ obj_ext=''
 path_sep=''
 afs=''
 alignbytes=''
+ansi2knr=''
 archlib=''
 archlibexp=''
 d_archlib=''
@@ -532,6 +533,7 @@ d_pwchange=''
 d_pwclass=''
 d_pwcomment=''
 d_pwexpire=''
+d_pwgecos=''
 d_pwquota=''
 i_pwd=''
 i_sfio=''
@@ -1551,8 +1553,12 @@ for dir in \$*; do
                echo \$thisthing
                exit 0
        elif test -f \$dir/\$thing.exe; then
-               : on Eunice apparently
-               echo \$dir/\$thing
+               if test -n "$DJGPP"; then
+                       echo \$dir/\$thing.exe
+               else
+                       : on Eunice apparently
+                       echo \$dir/\$thing
+               fi
                exit 0
        fi
        ;;
@@ -1873,6 +1879,12 @@ EOM
                                fi
                        fi
                        ;;
+               pc*)
+                       if test -n "$DJGPP"; then
+                               osname=dos
+                               osvers=djgpp
+                       fi
+                       ;;
                esac
 
                case "$1" in
@@ -2012,11 +2024,11 @@ EOM
                        *)      if test -f /etc/systemid; then
                                        osname=sco
                                        set `echo $3 | $sed 's/\./ /g'` $4
-                                       if $test -f sco_$1_$2_$3.sh; then
+                                       if $test -f $src/hints/sco_$1_$2_$3.sh; then
                                                osvers=$1.$2.$3
-                                       elif $test -f sco_$1_$2.sh; then
+                                       elif $test -f $src/hints/sco_$1_$2.sh; then
                                                osvers=$1.$2
-                                       elif $test -f sco_$1.sh; then
+                                       elif $test -f $src/hints/sco_$1.sh; then
                                                osvers=$1
                                        fi
                                else
@@ -2049,10 +2061,6 @@ EOM
                        set X $myuname
                        osname=os2
                        osvers="$5"
-                       if test -n "$DJDIR"; then
-                               osname=dos
-                               osvers=djgpp
-                       fi
                fi
        fi
        
@@ -3012,38 +3020,6 @@ esac
 set d_dosuid
 eval $setvar
 
-: determine where public executables go
-echo " "
-set dflt bin bin
-eval $prefixit
-fn=d~
-rp='Pathname where the public executables will reside?'
-. ./getfile
-if $test "X$ansexp" != "X$binexp"; then
-       installbin=''
-fi
-bin="$ans"
-binexp="$ansexp"
-if $afs; then
-       $cat <<EOM
-
-Since you are running AFS, I need to distinguish the directory in which
-executables reside from the directory in which they are installed (and from
-which they are presumably copied to the former directory by occult means).
-
-EOM
-       case "$installbin" in
-       '') dflt=`echo $binexp | sed 's#^/afs/#/afs/.#'`;;
-       *) dflt="$installbin";;
-       esac
-       fn=de~
-       rp='Where will public executables be installed?'
-       . ./getfile
-       installbin="$ans"
-else
-       installbin="$binexp"
-fi
-
 : determine where manual pages are on this system
 echo " "
 case "$sysman" in
@@ -3342,6 +3318,144 @@ y)      fn=d/
        ;;
 esac
 
+: see how we invoke the C preprocessor
+echo " "
+echo "Now, how can we feed standard input to your C preprocessor..." >&4
+cat <<'EOT' >testcpp.c
+#define ABC abc
+#define XYZ xyz
+ABC.XYZ
+EOT
+cd ..
+echo 'cat >.$$.c; '"$cc"' -E ${1+"$@"} .$$.c; rm .$$.c' >cppstdin
+chmod 755 cppstdin
+wrapper=`pwd`/cppstdin
+ok='false'
+cd UU
+
+if $test "X$cppstdin" != "X" && \
+       $cppstdin $cppminus <testcpp.c >testcpp.out 2>&1 && \
+       $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1
+then
+       echo "You used to use $cppstdin $cppminus so we'll use that again."
+       case "$cpprun" in
+       '') echo "But let's see if we can live without a wrapper..." ;;
+       *)
+               if $cpprun $cpplast <testcpp.c >testcpp.out 2>&1 && \
+                       $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1
+               then
+                       echo "(And we'll use $cpprun $cpplast to preprocess directly.)"
+                       ok='true'
+               else
+                       echo "(However, $cpprun $cpplast does not work, let's see...)"
+               fi
+               ;;
+       esac
+else
+       case "$cppstdin" in
+       '') ;;
+       *)
+               echo "Good old $cppstdin $cppminus does not seem to be of any help..."
+               ;;
+       esac
+fi
+
+if $ok; then
+       : nothing
+elif echo 'Maybe "'"$cc"' -E" will work...'; \
+       $cc -E <testcpp.c >testcpp.out 2>&1; \
+       $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
+       echo "Yup, it does."
+       x_cpp="$cc -E"
+       x_minus='';
+elif echo 'Nope...maybe "'"$cc"' -E -" will work...'; \
+       $cc -E - <testcpp.c >testcpp.out 2>&1; \
+       $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
+       echo "Yup, it does."
+       x_cpp="$cc -E"
+       x_minus='-';
+elif echo 'Nope...maybe "'"$cc"' -P" will work...'; \
+       $cc -P <testcpp.c >testcpp.out 2>&1; \
+       $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
+       echo "Yipee, that works!"
+       x_cpp="$cc -P"
+       x_minus='';
+elif echo 'Nope...maybe "'"$cc"' -P -" will work...'; \
+       $cc -P - <testcpp.c >testcpp.out 2>&1; \
+       $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
+       echo "At long last!"
+       x_cpp="$cc -P"
+       x_minus='-';
+elif echo 'No such luck, maybe "'$cpp'" will work...'; \
+       $cpp <testcpp.c >testcpp.out 2>&1; \
+       $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
+       echo "It works!"
+       x_cpp="$cpp"
+       x_minus='';
+elif echo 'Nixed again...maybe "'$cpp' -" will work...'; \
+       $cpp - <testcpp.c >testcpp.out 2>&1; \
+       $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
+       echo "Hooray, it works!  I was beginning to wonder."
+       x_cpp="$cpp"
+       x_minus='-';
+elif echo 'Uh-uh.  Time to get fancy.  Trying a wrapper...'; \
+       $wrapper <testcpp.c >testcpp.out 2>&1; \
+       $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
+       x_cpp="$wrapper"
+       x_minus=''
+       echo "Eureka!"
+else
+       dflt=''
+       rp="No dice.  I can't find a C preprocessor.  Name one:"
+       . ./myread
+       x_cpp="$ans"
+       x_minus=''
+       $x_cpp <testcpp.c >testcpp.out 2>&1
+       if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
+               echo "OK, that will do." >&4
+       else
+echo "Sorry, I can't get that to work.  Go find one and rerun Configure." >&4
+               exit 1
+       fi
+fi
+
+case "$ok" in
+false)
+       cppstdin="$x_cpp"
+       cppminus="$x_minus"
+       cpprun="$x_cpp"
+       cpplast="$x_minus"
+       set X $x_cpp
+       shift
+       case "$1" in
+       "$cpp")
+               echo "Perhaps can we force $cc -E using a wrapper..."
+               if $wrapper <testcpp.c >testcpp.out 2>&1; \
+                       $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1
+               then
+                       echo "Yup, we can."
+                       cppstdin="$wrapper"
+                       cppminus='';
+               else
+                       echo "Nope, we'll have to live without it..."
+               fi
+               ;;
+       esac
+       case "$cpprun" in
+       "$wrapper")
+               cpprun=''
+               cpplast=''
+               ;;
+       esac
+       ;;
+esac
+
+case "$cppstdin" in
+"$wrapper") ;;
+*) $rm -f $wrapper;;
+esac
+$rm -f testcpp.c testcpp.out
+
 : Set private lib path
 case "$plibpth" in
 '') if ./mips; then
@@ -3536,144 +3650,6 @@ none) libs=' ';;
 *) libs="$ans";;
 esac
 
-: see how we invoke the C preprocessor
-echo " "
-echo "Now, how can we feed standard input to your C preprocessor..." >&4
-cat <<'EOT' >testcpp.c
-#define ABC abc
-#define XYZ xyz
-ABC.XYZ
-EOT
-cd ..
-echo 'cat >.$$.c; '"$cc"' -E ${1+"$@"} .$$.c; rm .$$.c' >cppstdin
-chmod 755 cppstdin
-wrapper=`pwd`/cppstdin
-ok='false'
-cd UU
-
-if $test "X$cppstdin" != "X" && \
-       $cppstdin $cppminus <testcpp.c >testcpp.out 2>&1 && \
-       $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1
-then
-       echo "You used to use $cppstdin $cppminus so we'll use that again."
-       case "$cpprun" in
-       '') echo "But let's see if we can live without a wrapper..." ;;
-       *)
-               if $cpprun $cpplast <testcpp.c >testcpp.out 2>&1 && \
-                       $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1
-               then
-                       echo "(And we'll use $cpprun $cpplast to preprocess directly.)"
-                       ok='true'
-               else
-                       echo "(However, $cpprun $cpplast does not work, let's see...)"
-               fi
-               ;;
-       esac
-else
-       case "$cppstdin" in
-       '') ;;
-       *)
-               echo "Good old $cppstdin $cppminus does not seem to be of any help..."
-               ;;
-       esac
-fi
-
-if $ok; then
-       : nothing
-elif echo 'Maybe "'"$cc"' -E" will work...'; \
-       $cc -E <testcpp.c >testcpp.out 2>&1; \
-       $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
-       echo "Yup, it does."
-       x_cpp="$cc -E"
-       x_minus='';
-elif echo 'Nope...maybe "'"$cc"' -E -" will work...'; \
-       $cc -E - <testcpp.c >testcpp.out 2>&1; \
-       $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
-       echo "Yup, it does."
-       x_cpp="$cc -E"
-       x_minus='-';
-elif echo 'Nope...maybe "'"$cc"' -P" will work...'; \
-       $cc -P <testcpp.c >testcpp.out 2>&1; \
-       $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
-       echo "Yipee, that works!"
-       x_cpp="$cc -P"
-       x_minus='';
-elif echo 'Nope...maybe "'"$cc"' -P -" will work...'; \
-       $cc -P - <testcpp.c >testcpp.out 2>&1; \
-       $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
-       echo "At long last!"
-       x_cpp="$cc -P"
-       x_minus='-';
-elif echo 'No such luck, maybe "'$cpp'" will work...'; \
-       $cpp <testcpp.c >testcpp.out 2>&1; \
-       $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
-       echo "It works!"
-       x_cpp="$cpp"
-       x_minus='';
-elif echo 'Nixed again...maybe "'$cpp' -" will work...'; \
-       $cpp - <testcpp.c >testcpp.out 2>&1; \
-       $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
-       echo "Hooray, it works!  I was beginning to wonder."
-       x_cpp="$cpp"
-       x_minus='-';
-elif echo 'Uh-uh.  Time to get fancy.  Trying a wrapper...'; \
-       $wrapper <testcpp.c >testcpp.out 2>&1; \
-       $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
-       x_cpp="$wrapper"
-       x_minus=''
-       echo "Eureka!"
-else
-       dflt=''
-       rp="No dice.  I can't find a C preprocessor.  Name one:"
-       . ./myread
-       x_cpp="$ans"
-       x_minus=''
-       $x_cpp <testcpp.c >testcpp.out 2>&1
-       if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
-               echo "OK, that will do." >&4
-       else
-echo "Sorry, I can't get that to work.  Go find one and rerun Configure." >&4
-               exit 1
-       fi
-fi
-
-case "$ok" in
-false)
-       cppstdin="$x_cpp"
-       cppminus="$x_minus"
-       cpprun="$x_cpp"
-       cpplast="$x_minus"
-       set X $x_cpp
-       shift
-       case "$1" in
-       "$cpp")
-               echo "Perhaps can we force $cc -E using a wrapper..."
-               if $wrapper <testcpp.c >testcpp.out 2>&1; \
-                       $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1
-               then
-                       echo "Yup, we can."
-                       cppstdin="$wrapper"
-                       cppminus='';
-               else
-                       echo "Nope, we'll have to live without it..."
-               fi
-               ;;
-       esac
-       case "$cpprun" in
-       "$wrapper")
-               cpprun=''
-               cpplast=''
-               ;;
-       esac
-       ;;
-esac
-
-case "$cppstdin" in
-"$wrapper") ;;
-*) $rm -f $wrapper;;
-esac
-$rm -f testcpp.c testcpp.out
-
 : determine optimize, if desired, or use for debug flag also
 case "$optimize" in
 ' '|$undef) dflt='none';;
@@ -3957,16 +3933,89 @@ n) echo "OK, that should do.";;
 esac
 $rm -f try try.* core
 
+: Cruising for prototypes
+echo " "
+echo "Checking out function prototypes..." >&4
+$cat >prototype.c <<'EOCP'
+main(int argc, char *argv[]) {
+       exit(0);}
+EOCP
+if $cc $ccflags -c prototype.c >prototype.out 2>&1 ; then
+       echo "Your C compiler appears to support function prototypes."
+       val="$define"
+else
+       echo "Your C compiler doesn't seem to understand function prototypes."
+       val="$undef"
+fi
+set prototype
+eval $setvar
+$rm -f prototype*
+
+case "$prototype" in
+"$define") ;;
+*)     ansi2knr='ansi2knr'
+       echo " "
+       cat <<EOM >&4
+
+$me:  FATAL ERROR:
+This version of $package can only be compiled by a compiler that 
+understands function prototypes.  Unfortunately, your C compiler 
+       $cc $ccflags
+doesn't seem to understand them.  Sorry about that.
+
+If GNU cc is avaiable for your system, perhaps you could try that instead.  
+
+Eventually, we hope to support building Perl with pre-ANSI compilers.
+If you would like to help in that effort, please contact <perlbug@perl.org>.
+
+Aborting Configure now.
+EOM
+       exit 2
+       ;;
+esac
+
+: determine where public executables go
+echo " "
+set dflt bin bin
+eval $prefixit
+fn=d~
+rp='Pathname where the public executables will reside?'
+. ./getfile
+if $test "X$ansexp" != "X$binexp"; then
+       installbin=''
+fi
+bin="$ans"
+binexp="$ansexp"
+if $afs; then
+       $cat <<EOM
+
+Since you are running AFS, I need to distinguish the directory in which
+executables reside from the directory in which they are installed (and from
+which they are presumably copied to the former directory by occult means).
+
+EOM
+       case "$installbin" in
+       '') dflt=`echo $binexp | sed 's#^/afs/#/afs/.#'`;;
+       *) dflt="$installbin";;
+       esac
+       fn=de~
+       rp='Where will public executables be installed?'
+       . ./getfile
+       installbin="$ans"
+else
+       installbin="$binexp"
+fi
+
 : define a shorthand compile call
 compile='
 mc_file=$1;
 shift;
-$cc $optimize $ccflags $ldflags -o ${mc_file}$_exe $* ${mc_file}.c $libs > /dev/null 2>&1;'
+$cc $optimize $ccflags $ldflags -o ${mc_file} $* ${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;'
+$cc $optimize $ccflags $ldflags -o ${mc_file} $* ${mc_file}.c $libs;'
 
 echo " "
 echo "Checking for GNU C Library..." >&4
@@ -4012,7 +4061,7 @@ case "$usenm" in
                ;;
        esac
        case "$dflt" in
-       '') dflt=`egrep 'inlibc|csym' ../Configure | wc -l 2>/dev/null`
+       '') dflt=`$egrep 'inlibc|csym' $rsrc/Configure | wc -l 2>/dev/null`
                if $test $dflt -gt 20; then
                        dflt=y
                else
@@ -4758,10 +4807,6 @@ $undef)
                                ;;
                        esac
                        ;;
-               sunos)
-                       dflt=n
-                       also='Building a shared libperl will definitely not work on SunOS 4.'
-                       ;;
                *)      dflt=n
                        ;;
                esac
@@ -6504,7 +6549,7 @@ $define|y|true)
        $cat << EOM
 
 On a few systems, the dynamically loaded modules that perl generates and uses
-will need a different extension then shared libs. The default will probably
+will need a different extension than shared libs. The default will probably
 be appropriate.
 
 EOM
@@ -7185,13 +7230,13 @@ main()
 }
 EOCP
        set try
-       if eval $compile_ok; then
+       if eval $compile; then
                longdblsize=`./try`
                $echo " $longdblsize bytes." >&4
        else
                dflt='8'
                echo " "
-               echo "(I can't seem to compile the test program.  Guessing...)"
+               echo "(I can't seem to compile the test program.  Guessing...)" >&4
                rp="What is the size of a long double (in bytes)?"
                . ./myread
                longdblsize="$ans"
@@ -7558,6 +7603,14 @@ $define)
        set d_pwcomment
        eval $setvar
 
+       if $contains 'pw_gecos' $$.h >/dev/null 2>&1; then
+               val="$define"
+       else
+               val="$undef"
+       fi
+       set d_pwgecos
+       eval $setvar
+
        $rm -f $$.h
        ;;
 *)
@@ -7568,6 +7621,7 @@ $define)
        set d_pwclass; eval $setvar
        set d_pwexpire; eval $setvar
        set d_pwcomment; eval $setvar
+       set d_pwgecos; eval $setvar
        ;;
 esac
 
@@ -8432,6 +8486,9 @@ case "$varval" in
        for inc in $inclist; do
                echo "#include <$inc>" >>temp.c;
        done;
+       echo "#ifdef $type" >> temp.c;
+       echo "printf(\"We have $type\");" >> temp.c;
+       echo "#endif" >> temp.c;
        $cppstdin $cppflags $cppminus < temp.c >temp.E 2>/dev/null;
        if $contains $type temp.E >/dev/null 2>&1; then
                eval "$var=\$type";
@@ -8454,6 +8511,9 @@ case "$varval" in
        for inc in $inclist; do
                echo "#include <$inc>" >>temp.c;
        done;
+       echo "#ifdef $type" >> temp.c;
+       echo "printf(\"We have $type\");" >> temp.c;
+       echo "#endif" >> temp.c;
        $cppstdin $cppflags $cppminus < temp.c >temp.E 2>/dev/null;
        echo " " ;
        echo "$rp" | $sed -e "s/What is/Looking for/" -e "s/?/./";
@@ -9105,7 +9165,7 @@ EOCP
        set try
        if eval $compile_ok; then
                doublesize=`./try`
-               $echo $doublesize >&4
+               $echo " $doublesize bytes." >&4
        else
                dflt='8'
                echo "(I can't seem to compile the test program.  Guessing...)"
@@ -9220,24 +9280,6 @@ 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_ask
 
-: Cruising for prototypes
-echo " "
-echo "Checking out function prototypes..." >&4
-$cat >prototype.c <<'EOCP'
-main(int argc, char *argv[]) {
-       exit(0);}
-EOCP
-if $cc $ccflags -c prototype.c >prototype.out 2>&1 ; then
-       echo "Your C compiler appears to support function prototypes."
-       val="$define"
-else
-       echo "Your C compiler doesn't seem to understand function prototypes."
-       val="$undef"
-fi
-set prototype
-eval $setvar
-$rm -f prototype*
-
 : define a fucntion to check prototypes
 $cat > protochk <<EOSH
 $startsh
@@ -10699,7 +10741,7 @@ EOM
                # Perhaps we are reusing an old out-of-date config.sh.
                case "$hint" in
                previous)
-                       if test X"$dynamic_ext" != X$"avail_ext"; then
+                       if test X"$dynamic_ext" != X"$avail_ext"; then
                                $cat <<EOM
 NOTICE:  Your previous config.sh list may be incorrect. 
 The extensions now available to you are 
@@ -10764,7 +10806,7 @@ EOM
                # Perhaps we are reusing an old out-of-date config.sh.
                case "$hint" in
                previous)
-                       if test X"$static_ext" != X$"avail_ext"; then
+                       if test X"$static_ext" != X"$avail_ext"; then
                                $cat <<EOM
 NOTICE:  Your previous config.sh list may be incorrect. 
 The extensions now available to you are 
@@ -10837,7 +10879,9 @@ case "$d_portable" in
        echo " "
        echo "Stripping down executable paths..." >&4
        for file in $loclist $trylist; do
-               eval $file="\$file"
+               if test X$file != Xln -a X$file != Xar -o X$osname != Xos2; then
+                       eval $file="\$file"
+               fi
        done
        ;;
 esac
@@ -10876,6 +10920,7 @@ _exe='$_exe'
 _o='$_o'
 afs='$afs'
 alignbytes='$alignbytes'
+ansi2knr='$ansi2knr'
 aphostname='$aphostname'
 ar='$ar'
 archlib='$archlib'
@@ -11038,6 +11083,7 @@ d_pwchange='$d_pwchange'
 d_pwclass='$d_pwclass'
 d_pwcomment='$d_pwcomment'
 d_pwexpire='$d_pwexpire'
+d_pwgecos='$d_pwgecos'
 d_pwquota='$d_pwquota'
 d_readdir='$d_readdir'
 d_readlink='$d_readlink'
diff --git a/INSTALL b/INSTALL
index 2454fd7..0f2157a 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -1217,6 +1217,8 @@ Note that you can't run the tests in background if this disables
 opening of /dev/tty. You can use 'make test-notty' in that case but
 a few tty tests will be skipped.
 
+=head2 What if make test doesn't work?
+
 If make test bombs out, just cd to the t directory and run ./TEST
 by hand to see if it makes any difference.  If individual tests
 bomb, you can run them by hand, e.g.,
@@ -1234,6 +1236,10 @@ complicated constructs).
 You should also read the individual tests to see if there are any helpful
 comments that apply to your system.
 
+=over 4
+
+=item locale
+
 Note:  One possible reason for errors is that some external programs
 may be broken due to the combination of your environment and the way
 B<make test> exercises them.  For example, this may happen if you have
@@ -1257,6 +1263,29 @@ things like:  exec, `backquoted command`, system, open("|...") or
 open("...|").  All these mean that Perl is trying to run some
 external program.
 
+=item Out of memory
+
+On some systems, particularly those with smaller amounts of RAM, some
+of the tests in t/op/pat.t may fail with an "Out of memory" message.
+Specifically, in perl5.004_64, tests 74 and 78 have been reported to
+fail on some systems.  On my SparcStation IPC with 8 MB of RAM, test 78
+will fail if the system is running any other significant tasks at the
+same time.
+
+Try stopping other jobs on the system and then running the test by itself:
+
+       cd t; ./perl op/pat.t
+
+to see if you have any better luck.  If your perl still fails this
+test, it does not necessarily mean you have a broken perl.  This test
+tries to exercise the regular expression subsystem quite thoroughly,
+and may well be far more demanding than your normal usage.
+
+You may also be able to reduce perl's memory usage by using some of
+the ideas described above in L<"Malloc Performance Flags">.
+
+=back
+
 =head1 make install
 
 This will put perl into the public directory you specified to
@@ -1535,4 +1564,4 @@ above.
 
 =head1 LAST MODIFIED
 
-$Id: INSTALL,v 1.32 1998/03/20 19:20:08 doughera Released $
+$Id: INSTALL,v 1.34 1998/04/23 18:19:41 doughera Released $
index a37563a..567e852 100644 (file)
--- a/MANIFEST
+++ b/MANIFEST
@@ -21,6 +21,7 @@ Porting/patchls               Flexible patch file listing utility
 Porting/pumpkin.pod    Guidelines and hints for Perl maintainers
 README                 The Instructions
 README.amiga           Notes about AmigaOS port
+README.beos            Notes about BeOS port
 README.cygwin32                Notes about Cygwin32 port
 README.dos             Notes about dos/djgpp port
 README.os2             Notes about OS/2 port
@@ -35,6 +36,7 @@ XSUB.h                        Include file for extension subroutines
 atomic.h               Atomic refcount handling for multi-threading
 av.c                   Array value code
 av.h                   Array value header
+beos/nm.c              BeOS port
 bytecode.h             Bytecode header for compiler
 bytecode.pl            Produces byterun.h, byterun.c and ext/B/Asmdata.pm
 byterun.c              Runtime support for compiler-generated bytecode
@@ -319,6 +321,7 @@ hints/altos486.sh   Hints for named architecture
 hints/amigaos.sh       Hints for named architecture
 hints/apollo.sh                Hints for named architecture
 hints/aux_3.sh         Hints for named architecture
+hints/beos.sh          Hints for named architecture
 hints/broken-db.msg    Warning message for systems with broken DB library
 hints/bsdos.sh         Hints for named architecture
 hints/convexos.sh      Hints for named architecture
index c1689cd..b9c8cdb 100644 (file)
@@ -25,8 +25,13 @@ esac
 
 linklibperl='$(LIBPERL)'
 shrpldflags='$(LDDLFLAGS)'
+ldlibpth=''
 case "$useshrplib" in
 true)
+       # Prefix all runs of 'miniperl' and 'perl' with 
+       # $ldlibpth so that ./perl finds *this* libperl.so.
+       ldlibpth="LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH"
+
        pldlflags="$cccdlflags"
        # NeXT-4 specific stuff.  Can't we do this in the hint file?
        case "${osname}${osvers}" in
@@ -35,6 +40,11 @@ true)
                lddlflags="-dynamic -undefined warning -framework System \
                -compatibility_version 1 -current_version $patchlevel \
                -prebind -seg1addr 0x27000000 -install_name \$(shrpdir)/\$@"
+               # NeXT uses a different name.
+               ldlibpth="DYLD_LIBRARY_PATH=`pwd`:$DYLD_LIBRARY_PATH"
+               ;;
+       os2*)   # OS/2 doesn't need anything special for LD_LIBRARY_PATH.
+               ldlibpth=''
                ;;
        sunos*|freebsd[23]*|netbsd*)
                linklibperl="-lperl"
@@ -124,6 +134,10 @@ LIBPERL = $libperl
 LLIBPERL= $linklibperl
 SHRPENV = $shrpenv
 
+# The following is used to include the current directory in
+# LD_LIBRARY_PATH if you are building a shared libperl.so.
+LDLIBPTH = $ldlibpth
+
 dynamic_ext = $dynamic_list
 static_ext = $static_list
 ext = \$(dynamic_ext) \$(static_ext)
@@ -220,10 +234,10 @@ all: $(FIRSTMAKEFILE) miniperl $(private) $(plextract) $(public) $(dynamic_ext)
        @echo " "; echo "       Everything is up to date."
 
 translators:   miniperl lib/Config.pm FORCE
-       @echo " "; echo "       Making x2p stuff"; cd x2p; $(MAKE) all
+       @echo " "; echo "       Making x2p stuff"; cd x2p; $(LDLIBPTH) $(MAKE) all
 
 utilities:     miniperl lib/Config.pm FORCE
-       @echo " "; echo "       Making utilities"; cd utils; $(MAKE) all
+       @echo " "; echo "       Making utilities"; cd utils; $(LDLIBPTH) $(MAKE) all
 
 
 # This is now done by installman only if you actually want the man pages.
@@ -299,20 +313,20 @@ $(LIBPERL): $& perl$(OBJ_EXT) $(obj)
 # The Module used here must not depend on Config or any extensions.
 
 miniperl: $& miniperlmain$(OBJ_EXT) $(LIBPERL)
-       $(CC) $(LARGE) $(CLDFLAGS) -o miniperl miniperlmain$(OBJ_EXT) $(LLIBPERL) $(libs)
-       @./miniperl -w -Ilib -MExporter -e 0 || $(MAKE) minitest
+       $(LDLIBPTH) $(CC) $(LARGE) $(CLDFLAGS) -o miniperl miniperlmain$(OBJ_EXT) $(LLIBPERL) $(libs)
+       @ $(LDLIBPTH) ./miniperl -w -Ilib -MExporter -e 0 || $(MAKE) minitest
 
 perl: $& perlmain$(OBJ_EXT) $(LIBPERL) $(DYNALOADER) $(static_ext) ext.libs
-       $(SHRPENV) $(CC) $(LARGE) $(CLDFLAGS) $(CCDLFLAGS) -o perl perlmain$(OBJ_EXT) $(DYNALOADER) $(static_ext) $(LLIBPERL) `cat ext.libs` $(libs)
+       $(SHRPENV) $(LDLIBPTH) $(CC) $(LARGE) $(CLDFLAGS) $(CCDLFLAGS) -o perl perlmain$(OBJ_EXT) $(DYNALOADER) $(static_ext) $(LLIBPERL) `cat ext.libs` $(libs)
 
 pureperl: $& perlmain$(OBJ_EXT) $(LIBPERL) $(DYNALOADER) $(static_ext) ext.libs
-       $(SHRPENV) purify $(CC) $(LARGE) $(CLDFLAGS) $(CCDLFLAGS) -o pureperl perlmain$(OBJ_EXT) $(DYNALOADER) $(static_ext) $(LLIBPERL) `cat ext.libs` $(libs)
+       $(SHRPENV) $(LDLIBPTH) purify $(CC) $(LARGE) $(CLDFLAGS) $(CCDLFLAGS) -o pureperl perlmain$(OBJ_EXT) $(DYNALOADER) $(static_ext) $(LLIBPERL) `cat ext.libs` $(libs)
 
 purecovperl: $& perlmain$(OBJ_EXT) $(LIBPERL) $(DYNALOADER) $(static_ext) ext.libs
-       $(SHRPENV) purecov $(CC) $(LARGE) $(CLDFLAGS) $(CCDLFLAGS) -o purecovperl perlmain$(OBJ_EXT) $(DYNALOADER) $(static_ext) $(LLIBPERL) `cat ext.libs` $(libs)
+       $(SHRPENV) $(LDLIBPTH) purecov $(CC) $(LARGE) $(CLDFLAGS) $(CCDLFLAGS) -o purecovperl perlmain$(OBJ_EXT) $(DYNALOADER) $(static_ext) $(LLIBPERL) `cat ext.libs` $(libs)
 
 quantperl: $& perlmain$(OBJ_EXT) $(LIBPERL) $(DYNALOADER) $(static_ext) ext.libs
-       $(SHRPENV) quantify $(CC) $(LARGE) $(CLDFLAGS) $(CCDLFLAGS) -o quantperl perlmain$(OBJ_EXT) $(DYNALOADER) $(static_ext) $(LLIBPERL) `cat ext.libs` $(libs)
+       $(SHRPENV) $(LDLIBPTH) quantify $(CC) $(LARGE) $(CLDFLAGS) $(CCDLFLAGS) -o quantperl perlmain$(OBJ_EXT) $(DYNALOADER) $(static_ext) $(LLIBPERL) `cat ext.libs` $(libs)
 
 # This version, if specified in Configure, does ONLY those scripts which need
 # set-id emulation.  Suidperl must be setuid root.  It contains the "taint"
@@ -320,7 +334,7 @@ quantperl: $& perlmain$(OBJ_EXT) $(LIBPERL) $(DYNALOADER) $(static_ext) ext.libs
 # has been invoked correctly.
 
 suidperl: $& sperl$(OBJ_EXT) perlmain$(OBJ_EXT) $(LIBPERL) $(DYNALOADER) $(static_ext) ext.libs
-       $(SHRPENV) $(CC) $(LARGE) $(CLDFLAGS) $(CCDLFLAGS) -o suidperl perlmain$(OBJ_EXT) sperl$(OBJ_EXT) $(DYNALOADER) $(static_ext) $(LLIBPERL) `cat ext.libs` $(libs)
+       $(SHRPENV) $(LDLIBPTH) $(CC) $(LARGE) $(CLDFLAGS) $(CCDLFLAGS) -o suidperl perlmain$(OBJ_EXT) sperl$(OBJ_EXT) $(DYNALOADER) $(static_ext) $(LLIBPERL) `cat ext.libs` $(libs)
 
 !NO!SUBS!
 
@@ -340,34 +354,34 @@ sperl$(OBJ_EXT): perl.c perly.h patchlevel.h $(h)
 preplibrary: miniperl lib/Config.pm $(plextract)
        @sh ./makedir lib/auto
        @echo " AutoSplitting perl library"
-       @./miniperl -Ilib -e 'use AutoSplit; \
+       @$(LDLIBPTH) ./miniperl -Ilib -e 'use AutoSplit; \
                autosplit_lib_modules(@ARGV)' lib/*.pm lib/*/*.pm
 
 # Take care to avoid modifying lib/Config.pm without reason
 # (If trying to create a new port and having problems with the configpm script, 
 # try 'make minitest' and/or commenting out the tests at the end of configpm.)
 lib/Config.pm: config.sh miniperl configpm
-       ./miniperl configpm tmp
+       $(LDLIBPTH) ./miniperl configpm tmp
        sh mv-if-diff tmp lib/Config.pm
 
 lib/ExtUtils/Miniperl.pm: miniperlmain.c miniperl minimod.pl lib/Config.pm
-       ./miniperl minimod.pl > tmp && mv tmp $@
+       $(LDLIBPTH) ./miniperl minimod.pl > tmp && mv tmp $@
 
 $(plextract):  miniperl lib/Config.pm
-       `echo ./miniperl -Ilib $@.PL`
-
+       $(LDLIBPTH) ./miniperl -Ilib $@.PL
+       
 install: all install.perl install.man
 
 install.perl:  all installperl
-       ./perl installperl
+       $(LDLIBPTH) ./perl installperl
 
 install.man:   all installman
-       ./perl installman
+       $(LDLIBPTH) ./perl installman
 
 # XXX Experimental. Hardwired values, but useful for testing.
 # Eventually Configure could ask for some of these values.
 install.html: all installhtml
-       ./perl installhtml                   \
+       $(LDLIBPTH) ./perl installhtml                   \
       --podroot=. --podpath=. --recurse  \
       --htmldir=$(privlib)/html     \
       --htmlroot=$(privlib)/html    \
@@ -438,13 +452,13 @@ regen_headers:    FORCE
 # DynaLoader may be needed for extensions that use Makefile.PL.
 
 $(DYNALOADER): miniperl preplibrary FORCE
-       @sh ext/util/make_ext static $@ MAKE=$(MAKE) LIBPERL_A=$(LIBPERL)
+       @$(LDLIBPTH) sh ext/util/make_ext static $@ MAKE=$(MAKE) LIBPERL_A=$(LIBPERL)
 
 d_dummy $(dynamic_ext):        miniperl preplibrary $(DYNALOADER) FORCE
-       @sh ext/util/make_ext dynamic $@ MAKE=$(MAKE) LIBPERL_A=$(LIBPERL)
+       @$(LDLIBPTH) sh ext/util/make_ext dynamic $@ MAKE=$(MAKE) LIBPERL_A=$(LIBPERL)
 
 s_dummy $(static_ext): miniperl preplibrary $(DYNALOADER) FORCE
-       @sh ext/util/make_ext static $@ MAKE=$(MAKE) LIBPERL_A=$(LIBPERL)
+       @$(LDLIBPTH) sh ext/util/make_ext static $@ MAKE=$(MAKE) LIBPERL_A=$(LIBPERL)
 
 clean:         _tidy _mopup
 
@@ -528,11 +542,11 @@ test-prep: miniperl perl preplibrary $(dynamic_ext)
        cd t && (rm -f perl$(EXE_EXT); $(LNS) ../perl$(EXE_EXT) perl$(EXE_EXT))
 
 test check: test-prep
-       cd t && ./perl TEST </dev/tty
+       cd t && $(LDLIBPTH) ./perl TEST </dev/tty
 
 # For testing without a tty or controling terminal. See t/op/stat.t
 test-notty: test-prep
-       cd t && PERL_SKIP_TTY_TEST=1 ./perl TEST
+       cd t && PERL_SKIP_TTY_TEST=1 $(LDLIBPTH) ./perl TEST
 
 # Can't depend on lib/Config.pm because that might be where miniperl
 # is crashing.
@@ -540,14 +554,14 @@ minitest: miniperl
        @echo "You may see some irrelevant test failures if you have been unable"
        @echo "to build lib/Config.pm."
        - cd t && (rm -f perl$(EXE_EXT); $(LNS) ../miniperl$(EXE_EXT) perl$(EXE_EXT)) \
-               && ./perl TEST base/*.t comp/*.t cmd/*.t io/*.t op/*.t pragma/*.t </dev/tty
+               && $(LDLIBPTH) ./perl TEST base/*.t comp/*.t cmd/*.t io/*.t op/*.t pragma/*.t </dev/tty
 
 # Handy way to run perlbug -ok without having to install and run the
 # installed perlbug. We don't re-run the tests here - we trust the user.
 # Please *don't* use this unless all tests pass.
 # If you want to report test failures, just use "perlbug -Ilib".
 ok:    utilities
-       ./perl -Ilib utils/perlbug -ok -s '(UNINSTALLED)'
+       $(LBLIBPTH) ./perl -Ilib utils/perlbug -ok -s '(UNINSTALLED)'
 
 clist: $(c)
        echo $(c) | tr ' ' '\012' >.clist
index acac3ed..4ae0bb1 100644 (file)
@@ -46,7 +46,7 @@ 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
+# privlibexp is the same, except any '~' the user gave to Configure
 #     is expanded to the user's home directory.  This is figured
 #     out automatically by Configure, so you don't have to include it here.
 # installprivlib is for systems (such as those running AFS) that
@@ -82,7 +82,13 @@ for var in bin scriptdir privlib archlib \
     case "$var" in
     bin)       dflt=$prefix/bin ;;
     # The scriptdir test is more complex, but this is probably usually ok.
-    scriptdir) dflt=$prefix/script ;;
+    scriptdir)
+       if $test -d $prefix/script; then
+           dflt=$prefix/script
+       else
+           dflt=$bin
+       fi
+       ;;
     privlib)
        case "$prefix" in
        *perl*) dflt=$prefix/lib ;;
@@ -97,7 +103,7 @@ for var in bin scriptdir privlib archlib \
        case "$prefix" in
        *perl*) dflt=`echo $man1dir |
                    sed -e 's/man1/man3/g' -e 's/man\.1/man\.3/g'` ;;
-       *)      dflt=$privlib/man3 ;;
+       *)      dflt=$privlib/man/man3 ;;
        esac
        ;;
 
@@ -122,7 +128,6 @@ for var in bin scriptdir privlib archlib \
        echo "# $var='$dflt'"
     else
        echo "# Preserving custom $var"
-       eval val=$var
        echo "$var='$val'"
     fi
 
index 6a37060..15ca4f9 100644 (file)
@@ -26,6 +26,10 @@ alignbytes (alignbytes.U):
        This variable holds the number of bytes required to align a
        double. Usual values are 2, 4 and 8.
 
+ansi2knr (ansi2knr.U):
+       This variable is set if the user needs to run ansi2knr.  
+       Currently, this is not supported, so we just abort.
+
 aphostname (d_gethname.U):
        Thie variable contains the command which can be used to compute the
        host name. The command is fully qualified by its absolute path, to make
@@ -699,27 +703,31 @@ d_pthreads_created_joinable (d_pthreadj.U):
        state.
 
 d_pwage (i_pwd.U):
-       This varaible conditionally defines PWAGE, which indicates
+       This variable conditionally defines PWAGE, which indicates
        that struct passwd contains pw_age.
 
 d_pwchange (i_pwd.U):
-       This varaible conditionally defines PWCHANGE, which indicates
+       This variable conditionally defines PWCHANGE, which indicates
        that struct passwd contains pw_change.
 
 d_pwclass (i_pwd.U):
-       This varaible conditionally defines PWCLASS, which indicates
+       This variable conditionally defines PWCLASS, which indicates
        that struct passwd contains pw_class.
 
 d_pwcomment (i_pwd.U):
-       This varaible conditionally defines PWCOMMENT, which indicates
+       This variable conditionally defines PWCOMMENT, which indicates
        that struct passwd contains pw_comment.
 
 d_pwexpire (i_pwd.U):
-       This varaible conditionally defines PWEXPIRE, which indicates
+       This variable conditionally defines PWEXPIRE, which indicates
        that struct passwd contains pw_expire.
 
+d_pwgecos (i_pwd.U):
+       This variable conditionally defines PWGECOS, which indicates
+       that struct passwd contains pw_gecos.
+
 d_pwquota (i_pwd.U):
-       This varaible conditionally defines PWQUOTA, which indicates
+       This variable conditionally defines PWQUOTA, which indicates
        that struct passwd contains pw_quota.
 
 d_readdir (d_readdir.U):
index ff4f725..69da4a9 100644 (file)
@@ -8,7 +8,7 @@
 
 # Package name      : perl5
 # Source directory  : .
-# Configuration time: Tue Mar 31 15:51:58 EST 1998
+# Configuration time: Wed May 13 13:36:52 EDT 1998
 # Configured by     : doughera
 # Target system     : linux fractal 2.0.33 #1 tue feb 3 10:11:46 est 1998 i686 unknown 
 
@@ -28,10 +28,11 @@ _exe=''
 _o='.o'
 afs='false'
 alignbytes='4'
+ansi2knr=''
 aphostname=''
 ar='ar'
-archlib='/opt/perl/lib/i686-linux-thread/5.00463'
-archlibexp='/opt/perl/lib/i686-linux-thread/5.00463'
+archlib='/opt/perl/lib/i686-linux-thread/5.00464'
+archlibexp='/opt/perl/lib/i686-linux-thread/5.00464'
 archname='i686-linux-thread'
 archobjs=''
 awk='awk'
@@ -51,7 +52,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='Tue Mar 31 15:51:58 EST 1998'
+cf_time='Wed May 13 13:36:52 EDT 1998'
 chgrp=''
 chmod=''
 chown=''
@@ -190,6 +191,7 @@ d_pwchange='undef'
 d_pwclass='undef'
 d_pwcomment='undef'
 d_pwexpire='undef'
+d_pwgecos='define'
 d_pwquota='undef'
 d_readdir='define'
 d_readlink='define'
@@ -370,7 +372,7 @@ i_varhdr='stdarg.h'
 i_vfork='undef'
 incpath=''
 inews=''
-installarchlib='/opt/perl/lib/i686-linux-thread/5.00463'
+installarchlib='/opt/perl/lib/i686-linux-thread/5.00464'
 installbin='/opt/perl/bin'
 installman1dir='/opt/perl/man/man1'
 installman3dir='/opt/perl/man/man3'
@@ -516,7 +518,7 @@ stdio_filbuf=''
 stdio_ptr='((fp)->_IO_read_ptr)'
 strings='/usr/include/string.h'
 submit=''
-subversion='63'
+subversion='64'
 sysman='/usr/man/man1'
 tail=''
 tar=''
@@ -549,5 +551,5 @@ xlibpth='/usr/lib/386 /lib/386'
 zcat=''
 zip='zip'
 PATCHLEVEL=4
-SUBVERSION=63
+SUBVERSION=64
 CONFIG=true
index 2f07d01..de0cfd6 100644 (file)
@@ -17,7 +17,7 @@
 /*
  * Package name      : perl5
  * Source directory  : .
- * Configuration time: Tue Mar 31 15:51:58 EST 1998
+ * Configuration time: Wed May 13 13:36:52 EDT 1998
  * Configured by     : doughera
  * Target system     : linux fractal 2.0.33 #1 tue feb 3 10:11:46 est 1998 i686 unknown 
  */
  */
 #define I_NETINET_IN   /**/
 
-/* I_PWD:
- *     This symbol, if defined, indicates to the C program that it should
- *     include <pwd.h>.
- */
-/* PWQUOTA:
- *     This symbol, if defined, indicates to the C program that struct passwd
- *     contains pw_quota.
- */
-/* PWAGE:
- *     This symbol, if defined, indicates to the C program that struct passwd
- *     contains pw_age.
- */
-/* PWCHANGE:
- *     This symbol, if defined, indicates to the C program that struct passwd
- *     contains pw_change.
- */
-/* PWCLASS:
- *     This symbol, if defined, indicates to the C program that struct passwd
- *     contains pw_class.
- */
-/* PWEXPIRE:
- *     This symbol, if defined, indicates to the C program that struct passwd
- *     contains pw_expire.
- */
-/* PWCOMMENT:
- *     This symbol, if defined, indicates to the C program that struct passwd
- *     contains pw_comment.
- */
-#define I_PWD          /**/
-/*#define PWQUOTA      / **/
-/*#define PWAGE        / **/
-/*#define PWCHANGE     / **/
-/*#define PWCLASS      / **/
-/*#define PWEXPIRE     / **/
-/*#define PWCOMMENT    / **/
-
 /* I_SFIO:
  *     This symbol, if defined, indicates to the C program that it should
  *     include <sfio.h>.
  *     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.00463"              /**/
-#define ARCHLIB_EXP "/opt/perl/lib/i686-linux-thread/5.00463"          /**/
+#define ARCHLIB "/opt/perl/lib/i686-linux-thread/5.00464"              /**/
+#define ARCHLIB_EXP "/opt/perl/lib/i686-linux-thread/5.00464"          /**/
 
 /* CAT2:
  *     This macro catenates 2 tokens together.
  */
 #define I_NETDB                /**/
 
+/* I_PWD:
+ *     This symbol, if defined, indicates to the C program that it should
+ *     include <pwd.h>.
+ */
+/* PWQUOTA:
+ *     This symbol, if defined, indicates to the C program that struct passwd
+ *     contains pw_quota.
+ */
+/* PWAGE:
+ *     This symbol, if defined, indicates to the C program that struct passwd
+ *     contains pw_age.
+ */
+/* PWCHANGE:
+ *     This symbol, if defined, indicates to the C program that struct passwd
+ *     contains pw_change.
+ */
+/* PWCLASS:
+ *     This symbol, if defined, indicates to the C program that struct passwd
+ *     contains pw_class.
+ */
+/* PWEXPIRE:
+ *     This symbol, if defined, indicates to the C program that struct passwd
+ *     contains pw_expire.
+ */
+/* PWCOMMENT:
+ *     This symbol, if defined, indicates to the C program that struct passwd
+ *     contains pw_comment.
+ */
+/* PWGECOS:
+ *     This symbol, if defined, indicates to the C program that struct passwd
+ *     contains pw_gecos.
+ */
+#define I_PWD          /**/
+/*#define PWQUOTA      / **/
+/*#define PWAGE        / **/
+/*#define PWCHANGE     / **/
+/*#define PWCLASS      / **/
+/*#define PWEXPIRE     / **/
+/*#define PWCOMMENT    / **/
+#define PWGECOS        /**/
+
 /* I_SYS_TYPES:
  *     This symbol, if defined, indicates to the C program that it should
  *     include <sys/types.h>.
 #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
  */
 #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
  *     routine is available to yield the execution of the current
  *     thread.
  */
+/* HAS_SCHED_YIELD:
+ *     This symbol, if defined, indicates that the sched_yield
+ *     routine is available to yield the execution of the current
+ *     thread.
+ */
 /*#define HAS_PTHREAD_YIELD    / **/
+#define HAS_SCHED_YIELD        /**/
 
 /* PTHREADS_CREATED_JOINABLE:
  *     This symbol, if defined, indicates that pthreads are created
index 27cf119..724f1ba 100644 (file)
@@ -508,6 +508,9 @@ You might like, early in your pumpkin-holding career, to see if you
 can find champions for partiticular issues on the to-do list: an issue
 owned is an issue more likely to be resolved.
 
+There are also some more porting-specific L<Todo> items later in this
+file.
+
 =head2 OS/2-specific updates
 
 In the os2 directory is F<diff.configure>, a set of OS/2-specific
@@ -1071,6 +1074,62 @@ distribution modules.  If you do
 
 then perl.c will put /my/override ahead of ARCHLIB and PRIVLIB.
 
+=head2 Shared libperl.so location
+
+Why isn't the shared libperl.so installed in /usr/lib/ along
+with "all the other" shared libraries?  Instead, it is installed
+in $archlib, which is typically something like
+
+       /usr/local/lib/perl5/archname/5.00404
+
+and is architecture- and version-specific.
+
+The basic reason why a shared libperl.so gets put in $archlib is so that
+you can have more than one version of perl on the system at the same time,
+and have each refer to its own libperl.so.
+
+Three examples might help.  All of these work now; none would work if you
+put libperl.so in /usr/lib.
+
+=over
+
+=item 1.
+
+Suppose you want to have both threaded and non-threaded perl versions
+around.  Configure will name both perl libraries "libperl.so" (so that
+you can link to them with -lperl).  The perl binaries tell them apart
+by having looking in the appropriate $archlib directories.
+
+=item 2.
+
+Suppose you have perl5.004_04 installed and you want to try to compile
+it again, perhaps with different options or after applying a patch.
+If you already have libperl.so installed in /usr/lib/, then it may be
+either difficult or impossible to get ld.so to find the new libperl.so
+that you're trying to build.  If, instead, libperl.so is tucked away in
+$archlib, then you can always just change $archlib in the current perl
+you're trying to build so that ld.so won't find your old libperl.so.
+(The INSTALL file suggests you do this when building a debugging perl.)
+
+=item 3.
+
+The shared perl library is not a "well-behaved" shared library with
+proper major and minor version numbers, so you can't necessarily
+have perl5.004_04 and perl5.004_05 installed simultaneously.  Suppose
+perl5.004_04 were to install /usr/lib/libperl.so.4.4, and perl5.004_05
+were to install /usr/lib/libperl.so.4.5.  Now, when you try to run
+perl5.004_04, ld.so might try to load libperl.so.4.5, since it has
+the right "major version" number.  If this works at all, it almost
+certainly defeats the reason for keeping perl5.004_04 around.  Worse,
+with development subversions, you certaily can't guarantee that
+libperl.so.4.4 and libperl.so.4.55 will be compatible.
+
+Anyway, all this leads to quite obscure failures that are sure to drive
+casual users crazy.  Even experienced users will get confused :-).  Upon
+reflection, I'd say leave libperl.so in $archlib.
+
+=back
+
 =head1 Upload Your Work to CPAN
 
 You can upload your work to CPAN if you have a CPAN id.  Check out
@@ -1114,12 +1173,13 @@ described in F<INSTALL>.  AFS users also are treated specially.
 We should probably duplicate the metaconfig prefix stuff for an
 install prefix.
 
-=item Configure -Dsrcdir=/blah/blah
+=item Configure -Dsrc=/blah/blah
 
 We should be able to emulate B<configure --srcdir>.  Tom Tromey
 tromey@creche.cygnus.com has submitted some patches to
-the dist-users mailing list along these lines.  Eventually, they ought
-to get folded back into the main distribution.
+the dist-users mailing list along these lines.  They have been folded
+back into the main distribution, but various parts of the perl
+Configure/build/install process still assume src='.'.
 
 =item Hint file fixes
 
@@ -1131,6 +1191,47 @@ Configure so that most of them aren't needed.
 Some of the hint file information (particularly dynamic loading stuff)
 ought to be fed back into the main metaconfig distribution.
 
+=item Catch GNU Libc "Stub" functions
+
+Some functions (such as lchown()) are present in libc, but are
+unimplmented.  That is, they always fail and set errno=ENOSYS.
+
+Thomas Bushnell provided the following sample code and the explanation
+that follows:
+
+    /* System header to define __stub macros and hopefully few prototypes,
+       which can conflict with char FOO(); below.  */
+    #include <assert.h>
+    /* Override any gcc2 internal prototype to avoid an error.  */
+    /* We use char because int might match the return type of a gcc2
+       builtin and then its argument prototype would still apply.  */
+    char FOO();
+
+    int main() {
+
+    /* The GNU C library defines this for functions which it implements
+       to always fail with ENOSYS.  Some functions are actually named
+       something starting with __ and the normal name is an alias.  */
+    #if defined (__stub_FOO) || defined (__stub___FOO)
+    choke me
+    #else
+    FOO();
+    #endif
+
+    ; return 0; }
+
+The choice of <assert.h> is essentially arbitrary.  The GNU libc
+macros are found in <gnu/stubs.h>.  You can include that file instead
+of <assert.h> (which itself includes <gnu/stubs.h>) if you test for
+its existence first.  <assert.h> is assumed to exist on every system,
+which is why it's used here.  Any GNU libc header file will include
+the stubs macros.  If either __stub_NAME or __stub___NAME is defined,
+then the function doesn't actually exist.  Tests using <assert.h> work
+on every system around.
+
+The declaration of FOO is there to override builtin prototypes for
+ANSI C functions.
+
 =back
 
 =head2 Probably good ideas waiting for round tuits
@@ -1176,12 +1277,6 @@ Get some of the Macintosh stuff folded back into the main distribution.
 Maybe include a replacement function that doesn't lose data in rare
 cases of coercion between string and numerical values.
 
-=item long long
-
-Can we support C<long long> on systems where C<long long> is larger
-than what we've been using for C<IV>?  What if you can't C<sprintf>
-a C<long long>?
-
 =item Improve makedepend
 
 The current makedepend process is clunky and annoyingly slow, but it
@@ -1218,4 +1313,4 @@ All opinions expressed herein are those of the authorZ<>(s).
 
 =head1 LAST MODIFIED
 
-$Id: pumpkin.pod,v 1.14 1998/03/03 17:14:47 doughera Released $
+$Id: pumpkin.pod,v 1.15 1998/04/23 17:03:48 doughera Released $
diff --git a/README.beos b/README.beos
new file mode 100644 (file)
index 0000000..8c24393
--- /dev/null
@@ -0,0 +1,75 @@
+$Id: README.beos,v 1.2 1998/05/02 01:55:04 dogcow Exp dogcow $
+
+Notes on building perl under BeOS:
+
+GENERAL ISSUES
+--------------
+perl will almost compile straight out of the box with ./Configure -d, but
+there are a few gotchas:
+
+Currently, you have to edit config.sh and remove SDBM_File from the
+dynamic_ext= and extensions= lines. SDBM_File does not build properly
+at this time. You need to run ./Configure -S after editing config.sh.
+
+In addition, with mwcc, after doing `make depend`, you need to edit
+makefile and x2p/makefile and remove the lines that mention 'Bletch:'.
+This is not necessary if you're using gnu cpp.
+
+in short:
+./Configure -d
+remove SDBM_File from config.sh
+./Configure -S
+make depend
+remove Bletch: from makefile and x2p/makefile
+make
+
+Other than that, perl should build without problems. There are some
+technical comments in hints/beos.sh.
+
+OS RELEASE-SPECIFIC NOTES
+-------------------------
+
+PR1/PPC:
+See R3/X86. Same bug, different form.
+
+PR2/PPC:
+Signals are somewhat unreliable, but they can work. Use caution.
+The POSIX module is still somewhat buggy.
+
+R3/X86:
+Under R3 x86, there are some serious problems with the math routines
+such that numbers are incorrectly printed. This causes problems with
+modules that encode their version numbers - in particular, IO.pm will
+probably not work properly. This should be fixed under R3.1.
+
+The problem has manifested itself if you see something similar to the
+following during the compile:
+
+cc -c  -I/usr/local/include -O    -DVERSION=\"1.1504\" -DXS_VERSION=\"1.1499999999\" -fpic -I../..  IO.c
+(lots of 9's are the indication of the problem.)
+
+In the meantime, you can use the following workaround:
+
+make perl
+cd ext/IO
+cc -c  -I/usr/local/include -O    -DVERSION=\"1.1504\" -DXS_VERSION=\"1.15\" -fpic -I../..  IO.c
+cd ..
+make
+
+(Substitute the correct numbers if IO has been updated.)
+
+R3/PPC-
+There's math problems, but of a different kind. In particular,
+perl -e 'print (240000 - (3e4<<3))' gives a non-zero answer.
+I'm looking into this. There is no workaround as yet. Hopefully,
+this will be fixed in R3.1.
+
+CONTACT INFORMATION
+-------------------
+If you have comments, problem reports, or even patches or bugfixes (gasp!)
+please email me.
+
+1 May 1998
+Tom Spindler
+dogcow@merit.edu
+
diff --git a/Todo b/Todo
index ab28e00..4752030 100644 (file)
--- a/Todo
+++ b/Todo
@@ -21,7 +21,7 @@ Would be nice to have
        reference to compiled regexp
        lexically scoped functions: my sub foo { ... }
        lvalue functions
-       Full 64 bit support
+       Full 64 bit support (i.e. "long long")
 
 Possible pragmas
        debugger
diff --git a/beos/nm.c b/beos/nm.c
new file mode 100644 (file)
index 0000000..4f53f74
--- /dev/null
+++ b/beos/nm.c
@@ -0,0 +1,53 @@
+/* nm.c - a feeble shared-lib library parser
+ * Copyright 1997, 1998 Tom Spindler
+ * This software is covered under perl's Artistic license.
+ */
+
+/* $Id: nm.c,v 1.1 1998/02/16 03:51:26 dogcow Exp $ */
+
+#include <be/kernel/image.h>
+#include <malloc.h>
+#include <string.h>
+#include <unistd.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+main(int argc, char **argv) {
+char *path, *symname;
+image_id img;
+int32 n = 0;
+volatile int32 symnamelen, symtype;
+void *symloc;
+
+if (argc != 2) { printf("more args, bozo\n"); exit(1); }
+
+path = (void *) malloc((size_t) 2048);
+symname = (void *) malloc((size_t) 2048);
+
+if (!getcwd(path, 2048)) { printf("aiee!\n"); exit(1); }
+if (!strcat(path, "/"))  {printf("naah.\n"); exit (1); }
+/*printf("%s\n",path);*/
+
+if ('/' != argv[1][0]) {
+       if (!strcat(path, argv[1])) { printf("feh1\n"); exit(1); }
+} else {
+       if (!strcpy(path, argv[1])) { printf("gah!\n"); exit(1); }
+}
+/*printf("%s\n",path);*/
+
+img = load_add_on(path);
+if (B_ERROR == img) {printf("Couldn't load_add_on() %s.\n", path); exit(2); }
+
+symnamelen=2047;
+
+while (B_BAD_INDEX != get_nth_image_symbol(img, n++, symname, &symnamelen,
+                        &symtype, &symloc)) {
+       printf("%s |%s |GLOB %Lx | \n", symname,
+         ((B_SYMBOL_TYPE_ANY == symtype) || (B_SYMBOL_TYPE_TEXT == symtype)) ? "FUNC" : "VAR ", symloc);
+       symnamelen=2047;
+}
+printf("number of symbols: %d\n", n);
+if (B_ERROR == unload_add_on(img)) {printf("err while closing.\n"); exit(3); }
+free(path);
+return(0);
+}
index 6d46102..8a1ba82 100755 (executable)
--- a/cflags.SH
+++ b/cflags.SH
@@ -124,6 +124,7 @@ for file do
                optimize="$optdebug"
        fi
 
+    : Can we perhaps use $ansi2knr here
     echo "$cc -c -DPERL_CORE $ccflags $optimize $perltype $large $split"
     eval "$also "'"$cc -DPERL_CORE -c $ccflags $optimize $perltype $large $split"'
 
index 1d3a13d..5d4cffc 100644 (file)
@@ -918,42 +918,6 @@ sed <<!GROK!THIS! >config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un-
  */
 #$i_niin I_NETINET_IN  /**/
 
-/* I_PWD:
- *     This symbol, if defined, indicates to the C program that it should
- *     include <pwd.h>.
- */
-/* PWQUOTA:
- *     This symbol, if defined, indicates to the C program that struct passwd
- *     contains pw_quota.
- */
-/* PWAGE:
- *     This symbol, if defined, indicates to the C program that struct passwd
- *     contains pw_age.
- */
-/* PWCHANGE:
- *     This symbol, if defined, indicates to the C program that struct passwd
- *     contains pw_change.
- */
-/* PWCLASS:
- *     This symbol, if defined, indicates to the C program that struct passwd
- *     contains pw_class.
- */
-/* PWEXPIRE:
- *     This symbol, if defined, indicates to the C program that struct passwd
- *     contains pw_expire.
- */
-/* PWCOMMENT:
- *     This symbol, if defined, indicates to the C program that struct passwd
- *     contains pw_comment.
- */
-#$i_pwd I_PWD          /**/
-#$d_pwquota PWQUOTA    /**/
-#$d_pwage PWAGE        /**/
-#$d_pwchange PWCHANGE  /**/
-#$d_pwclass PWCLASS    /**/
-#$d_pwexpire PWEXPIRE  /**/
-#$d_pwcomment PWCOMMENT        /**/
-
 /* I_SFIO:
  *     This symbol, if defined, indicates to the C program that it should
  *     include <sfio.h>.
@@ -1739,6 +1703,47 @@ sed <<!GROK!THIS! >config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un-
  */
 #$i_netdb I_NETDB              /**/
 
+/* I_PWD:
+ *     This symbol, if defined, indicates to the C program that it should
+ *     include <pwd.h>.
+ */
+/* PWQUOTA:
+ *     This symbol, if defined, indicates to the C program that struct passwd
+ *     contains pw_quota.
+ */
+/* PWAGE:
+ *     This symbol, if defined, indicates to the C program that struct passwd
+ *     contains pw_age.
+ */
+/* PWCHANGE:
+ *     This symbol, if defined, indicates to the C program that struct passwd
+ *     contains pw_change.
+ */
+/* PWCLASS:
+ *     This symbol, if defined, indicates to the C program that struct passwd
+ *     contains pw_class.
+ */
+/* PWEXPIRE:
+ *     This symbol, if defined, indicates to the C program that struct passwd
+ *     contains pw_expire.
+ */
+/* PWCOMMENT:
+ *     This symbol, if defined, indicates to the C program that struct passwd
+ *     contains pw_comment.
+ */
+/* PWGECOS:
+ *     This symbol, if defined, indicates to the C program that struct passwd
+ *     contains pw_gecos.
+ */
+#$i_pwd I_PWD          /**/
+#$d_pwquota PWQUOTA    /**/
+#$d_pwage PWAGE        /**/
+#$d_pwchange PWCHANGE  /**/
+#$d_pwclass PWCLASS    /**/
+#$d_pwexpire PWEXPIRE  /**/
+#$d_pwcomment PWCOMMENT        /**/
+#$d_pwgecos PWGECOS    /**/
+
 /* I_SYS_TYPES:
  *     This symbol, if defined, indicates to the C program that it should
  *     include <sys/types.h>.
@@ -1758,6 +1763,37 @@ 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
@@ -1898,37 +1934,6 @@ 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
@@ -1942,7 +1947,13 @@ sed <<!GROK!THIS! >config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un-
  *     routine is available to yield the execution of the current
  *     thread.
  */
+/* HAS_SCHED_YIELD:
+ *     This symbol, if defined, indicates that the sched_yield
+ *     routine is available to yield the execution of the current
+ *     thread.
+ */
 #$d_pthread_yield HAS_PTHREAD_YIELD    /**/
+#$d_sched_yield HAS_SCHED_YIELD        /**/
 
 /* PTHREADS_CREATED_JOINABLE:
  *     This symbol, if defined, indicates that pthreads are created
index 5acf0ce..96a6885 100644 (file)
@@ -25,7 +25,7 @@ SSTAT='s=\.\(stat\.\)=_\1=g'
 STMP2='s=tmp2=tm2=g'
 SPACKLIST='s=\.\(packlist\)=_\1=g'
 
-sed -e $SCONFIG -e $SGREPTMP -e $SECHOTMP -e $SDDC -e $SOUT Configure |tr -d '\r' >s; mv -f s Configure
+sed -e $SCONFIG -e $SGREPTMP -e $SECHOTMP -e $SDDC -e $SOUT -e 's=\.\( \./\$file\)$=sh\1=g' Configure |tr -d '\r' >s; mv -f s Configure
 sed -e $SEXISTS -e $SLIST -e $SCONFIG Makefile.SH |tr -d '\r' >s; mv -f s Makefile.SH
 sed -e $SEXISTS -e $SPACKLIST lib/ExtUtils/Install.pm |tr -d '\r' >s; mv -f s lib/ExtUtils/Install.pm
 sed -e $SEXISTS -e $SPACKLIST lib/ExtUtils/MM_Unix.pm |tr -d '\r' >s; mv -f s lib/ExtUtils/MM_Unix.pm
diff --git a/doop.c b/doop.c
index 2de9376..11dc837 100644 (file)
--- a/doop.c
+++ b/doop.c
@@ -474,7 +474,7 @@ do_kv(ARGSproto)
        RETURN;
 
     if (gimme == G_SCALAR) {
-       I32 i;
+       IV i;
        dTARGET;
 
        if (op->op_flags & OPf_MOD) {   /* lvalue */
diff --git a/handy.h b/handy.h
index 443c229..e74a306 100644 (file)
--- a/handy.h
+++ b/handy.h
@@ -119,7 +119,7 @@ typedef unsigned short      U16;
 #define U16_MAX PERL_USHORT_MAX
 #define U16_MIN PERL_USHORT_MIN
 
-#if BYTEORDER > 0x4321
+#if LONGSIZE > 4
   typedef int          I32;
   typedef unsigned int U32;
 # define I32_MAX PERL_INT_MAX
diff --git a/hints/beos.sh b/hints/beos.sh
new file mode 100644 (file)
index 0000000..d8d4fd0
--- /dev/null
@@ -0,0 +1,45 @@
+# BeOS hints file
+# $Id: beos.sh,v 1.1 1998/02/16 03:51:45 dogcow Exp $
+
+if [ ! -f ../beos/nm ]; then mwcc -w all -o ../beos/nm ../beos/nm.c; fi
+
+prefix="/boot/home/config"
+
+cpp="mwcc -e"
+
+libpth='/boot/beos/system/lib /boot/home/config/lib'
+usrinc='/boot/develop/headers/posix'
+locinc='/boot/develop/headers/ /boot/home/config/include'
+
+libc='/boot/beos/system/lib/libroot.so'
+libs=' '
+
+d_bcmp='define'
+d_bcopy='define'
+d_bzero='define'
+d_index='define'
+#d_htonl='define' # It exists, but much hackery would be required to support.
+# a bunch of extra includes would have to be added, and it's only used at
+# one place in the non-socket perl code.
+
+#these are all in libdll.a, which my version of nm doesn't know how to parse.
+#if I can get it to both do that, and scan multiple library files, perhaps
+#these can be gotten rid of.
+
+usemymalloc='n'
+# Hopefully, Be's malloc knows better than perl's.
+
+d_link='undef'
+dont_use_nlink='define'
+# no posix (aka hard) links for us!
+
+d_syserrlst='undef'
+# the array syserrlst[] is useless for the most part.
+# large negative numbers really kind of suck in arrays.
+
+#d_socket='undef'
+# Sockets really don't work with the current version of perl and the
+# current BeOS sockets; I suspect that a new module a la GSAR's WIN32 port
+# will be required.
+
+export PATH="$PATH:$PWD/beos"
index ae6a7ca..73bae63 100644 (file)
@@ -7,7 +7,7 @@
 archname='dos-djgpp'
 archobjs='djgpp.o'
 path_sep=\;
-startsh="#!sh"
+startsh="#! /bin/sh"
 
 cc='gcc'
 ld='gcc'
@@ -23,8 +23,6 @@ firstmakefile='GNUmakefile'
 exe_ext='.exe'
 
 randbits=31
-
-ln='cp'             # no REAL ln on dos
 lns='cp'
 
 usenm='true'
@@ -54,17 +52,6 @@ sitearch=$sitelib
 eagain='EAGAIN'
 rd_nodata='-1'
 
-: set up the translation script tr
-
-cat > UU/tr <<EOSC
-$startsh
-case "\$1\$2" in
-'[A-Z][a-z]') exec tr.exe '[:upper:]' '[:lower:]';;
-'[a-z][A-Z]') exec tr.exe '[:lower:]' '[:upper:]';;
-esac
-exec tr.exe "\$@"
-EOSC
-
 if [ "X$usethreads" = "X$define" ]; then
     set `echo X "$libswanted "| sed -e 's/ c / gthreads c /'`
     shift
index 787f0f1..8bc6c12 100644 (file)
@@ -64,3 +64,8 @@ case "$osvers" in
        d_setruid="$undef"
        ;;
 esac
+
+# vfork is ok on NetBSD.
+case "$usevfork" in
+'') usevfork=true ;;
+esac
index 047e4cf..744b131 100644 (file)
@@ -123,8 +123,10 @@ cat > UU/cc.cbu <<'EOSH'
 # If the C compiler is gcc:
 #   - check the fixed-includes
 #   - check as(1) and ld(1), they should not be GNU
+#      (GNU ad and ld 2.8.1 and later are reportedly ok, however.)
 # If the C compiler is not gcc:
 #   - check as(1) and ld(1), they should not be GNU
+#      (GNU ad and ld 2.8.1 and later are reportedly ok, however.)
 #
 # Watch out in case they have not set $cc.
 
@@ -236,9 +238,25 @@ if [ "X$usethreads" = "X$define" ]; then
     # as -lgdbm and such like. We assume here that -lc is present in
     # libswanted. If that fails to be true in future, then this can be
     # changed to add pthread to the very end of libswanted.
-    set `echo X "$libswanted "| sed -e 's/ c / pthread c /'`
+    # sched_yield is in -lposix4
+    set `echo X "$libswanted "| sed -e 's/ c / posix4 pthread c /'`
     shift
     libswanted="$*"
+
+    # On Solaris 2.6 x86 there is a bug with sigsetjmp() and siglongjmp()
+    # when linked with the threads library, such that whatever positive value
+    # you pass to siglongjmp(), sigsetjmp() returns 1.
+    # Thanks to Simon Parsons <S.Parsons@ftel.co.uk> for this report.
+    if test "`arch`" = i86pc -a "$osvers" = 2.6; then
+       d_sigaction=$undef
+       cat << 'EOM' >&2
+
+You will see a *** WHOA THERE!!! ***  message from Configure for
+d_sigaction.  Keep the recommended value.  See hints/solaris_2.sh
+for more information.
+
+EOM
+    fi
 fi
 
 # This is just a trick to include some useful notes.
index 7579eed..111cbb9 100644 (file)
@@ -1,10 +1,13 @@
 case `uname -r` in
 6.1*) shellflags="-m+65536" ;;
 esac
-optimize="-O1"
+case "$optimize" in
+'') optimize="-O1" ;;
+esac
 d_setregid='undef'
 d_setreuid='undef'
 case "$usemymalloc" in
-'') usemymalloc='y' ;;
+'') usemymalloc='y'
+    ccflags="$ccflags -DNO_RCHECK"
+    ;;
 esac
-
index 90784b5..f0b63cb 100644 (file)
@@ -1,3 +1,10 @@
-optimize="-O1"
+case "$optimize" in
+'') optimize="-O1" ;;
+esac
 d_setregid='undef'
 d_setreuid='undef'
+case "$usemymalloc" in
+'') usemymalloc='y'
+    ccflags="$ccflags -DNO_RCHECK"
+    ;;
+esac
diff --git a/hv.h b/hv.h
index 20af4ea..91b6fec 100644 (file)
--- a/hv.h
+++ b/hv.h
@@ -22,11 +22,12 @@ struct hek {
     char       hek_key[1];
 };
 
+/* This structure must match the beginning of struct xpvmg in sv.h. */
 struct xpvhv {
     char *     xhv_array;      /* pointer to malloced string */
     STRLEN     xhv_fill;       /* how full xhv_array currently is */
     STRLEN     xhv_max;        /* subscript of last element of xhv_array */
-    I32                xhv_keys;       /* how many elements in the array */
+    IV         xhv_keys;       /* how many elements in the array */
     double     xnv_nv;         /* numeric value, if any */
     MAGIC*     xmg_magic;      /* magic for scalar array */
     HV*                xmg_stash;      /* class package */
index 6b0b5e7..2183c8d 100644 (file)
@@ -193,7 +193,7 @@ sub findConsole {
        $console = "sys\$command";
     }
 
-    if ($^O eq 'amigaos') {
+    if (($^O eq 'amigaos') || ($^O eq 'beos')) {
        $console = undef;
     }
     elsif ($^O eq 'os2') {
diff --git a/perl.h b/perl.h
index cd0f2bb..64cd4ce 100644 (file)
--- a/perl.h
+++ b/perl.h
@@ -91,7 +91,7 @@ register struct op *op asm(stringify(OP_IN_REGISTER));
 #define SOFT_CAST(type)        (type)
 #endif
 
-#ifndef BYTEORDER
+#ifndef BYTEORDER  /* Should never happen -- byteorder is in config.h */
 #   define BYTEORDER 0x1234
 #endif
 
@@ -695,12 +695,21 @@ Free_t   Perl_free _((Malloc_t where));
 #   ifdef convex
 #      define Quad_t long long
 #   else
-#      if BYTEORDER > 0xFFFF
+#      if LONGSIZE == 8
 #          define Quad_t long
 #      endif
 #   endif
 #endif
 
+/* XXX Experimental set-up for long long.  Just add -DUSE_LONG_LONG
+   to your ccflags.  --Andy Dougherty   4/1998
+*/
+#ifdef USE_LONG_LONG
+#  if defined(HAS_LONG_LONG) && LONGLONGSIZE == 8
+#    define Quad_t long long
+#  endif
+#endif
+
 #ifdef Quad_t
 #   define HAS_QUAD
     typedef Quad_t IV;
index 463c094..6916622 100644 (file)
  *     This symbol, if defined, indicates to the C program that struct passwd
  *     contains pw_comment.
  */
+/* PWGECOS:
+ *     This symbol, if defined, indicates to the C program that struct passwd
+ *     contains pw_gecos.
+ */
 #define I_PWD          /**/
 #undef PWQUOTA /**/
 #undef PWAGE   /**/
 #undef PWCHANGE        /**/
 #undef PWCLASS /**/
 #undef PWEXPIRE        /**/
+#define PWGECOS        /**/
 #undef PWCOMMENT       /**/
 
 /* I_STDDEF:
index f509f61..6ccada6 100644 (file)
@@ -1463,6 +1463,22 @@ lookup by name, in which case you get the other thing, whatever it is.
     $name = getgrent
     etc.
 
+In I<getpw*()> the fields $quota, $comment, and $expire are special
+cases in the sense that in many systems they are unsupported.  If the
+$quota is unsupported, it is an empty scalar.  If it is supported, it
+usually encodes the disk quota.  If the $comment field is unsupported,
+it is an empty scalar.  If it is supported it usually encodes some
+administrative comment about the user.  In some systems the $quota
+field may be $change or $age, fields that have to do with password
+aging.  In some systems the $comment field may be $class.  The $expire
+field, if present, encodes the expiration period of the account or the
+password.  For the availability and the exact meaning of these fields
+in your system, please consult your getpwnam(3) documentation and your
+<pwd.h> file.  You can also find out from within Perl which meaning
+your $quota and $comment fields have and whether you have the $expire
+field by using the Config module and the values d_pwquota, d_pwage,
+d_pwchange, d_pwcomment, and d_pwexpire.
+
 The $members value returned by I<getgr*()> is a space separated list of
 the login names of the members of the group.
 
diff --git a/pp.c b/pp.c
index 3dc5a72..9be14eb 100644 (file)
--- a/pp.c
+++ b/pp.c
@@ -46,7 +46,7 @@ typedef unsigned UBW;
  * have an integral type (except char) small enough to be represented
  * in a double without loss; that is, it has no 32-bit type.
  */
-#if BYTEORDER > 0xFFFF && defined(_CRAY) && !defined(_CRAYMPP)
+#if LONGSIZE > 4  && defined(_CRAY) && !defined(_CRAYMPP)
 #  define BW_BITS  32
 #  define BW_MASK  ((1 << BW_BITS) - 1)
 #  define BW_SIGN  (1 << (BW_BITS - 1))
index ce32fc5..e630e1f 100644 (file)
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -4124,41 +4124,55 @@ PP(pp_gpwent)
     if (pwent) {
        PUSHs(sv = sv_mortalcopy(&sv_no));
        sv_setpv(sv, pwent->pw_name);
+
        PUSHs(sv = sv_mortalcopy(&sv_no));
        sv_setpv(sv, pwent->pw_passwd);
+
        PUSHs(sv = sv_mortalcopy(&sv_no));
        sv_setiv(sv, (IV)pwent->pw_uid);
+
        PUSHs(sv = sv_mortalcopy(&sv_no));
        sv_setiv(sv, (IV)pwent->pw_gid);
+
+       /* pw_change, pw_quota, and pw_age are mutually exclusive. */
        PUSHs(sv = sv_mortalcopy(&sv_no));
 #ifdef PWCHANGE
        sv_setiv(sv, (IV)pwent->pw_change);
 #else
-#ifdef PWQUOTA
+#   ifdef PWQUOTA
        sv_setiv(sv, (IV)pwent->pw_quota);
-#else
-#ifdef PWAGE
+#   else
+#       ifdef PWAGE
        sv_setpv(sv, pwent->pw_age);
+#       endif
+#   endif
 #endif
-#endif
-#endif
+
+       /* pw_class and pw_comment are mutually exclusive. */
        PUSHs(sv = sv_mortalcopy(&sv_no));
 #ifdef PWCLASS
        sv_setpv(sv, pwent->pw_class);
 #else
-#ifdef PWCOMMENT
+#   ifdef PWCOMMENT
        sv_setpv(sv, pwent->pw_comment);
+#   endif
 #endif
-#endif
+
        PUSHs(sv = sv_mortalcopy(&sv_no));
+#ifdef PWGECOS
        sv_setpv(sv, pwent->pw_gecos);
+#endif
 #ifndef INCOMPLETE_TAINTS
+       /* pw_gecos is tainted. */
        SvTAINTED_on(sv);
 #endif
+
        PUSHs(sv = sv_mortalcopy(&sv_no));
        sv_setpv(sv, pwent->pw_dir);
+
        PUSHs(sv = sv_mortalcopy(&sv_no));
        sv_setpv(sv, pwent->pw_shell);
+
 #ifdef PWEXPIRE
        PUSHs(sv = sv_mortalcopy(&sv_no));
        sv_setiv(sv, (IV)pwent->pw_expire);
diff --git a/sv.h b/sv.h
index 0b3adea..6b4a125 100644 (file)
--- a/sv.h
+++ b/sv.h
@@ -199,6 +199,7 @@ struct xpvnv {
     double     xnv_nv;         /* numeric value, if any */
 };
 
+/* These structure must match the beginning of struct xpvhv in hv.h. */
 struct xpvmg {
     char *     xpv_pv;         /* pointer to malloced string */
     STRLEN     xpv_cur;        /* length of xpv_pv as a C string */
index efeda80..0387e55 100755 (executable)
@@ -74,10 +74,11 @@ if ($^O eq 'VMS') {
     exit;
 }
 
-if ($Config{d_sfio} || $^O eq machten) {
+if ($Config{d_sfio} || $^O eq machten || $^O eq beos) {
     # Sfio doesn't report failure when closing a broken pipe
     # that has pending output.  Go figure.  MachTen doesn't either,
     # but won't write to broken pipes, so nothing's pending at close.
+    # BeOS will not write to broken pipes, either.
     print "ok 9\n";
 }
 else {
index a252285..6141cf3 100644 (file)
--- a/thread.h
+++ b/thread.h
 #endif
 
 #ifndef YIELD
-#  ifdef HAS_PTHREAD_YIELD
-#    define YIELD pthread_yield()
-#  else
+#  ifdef HAS_SCHED_YIELD
 #    define YIELD sched_yield()
+#  else
+#    ifdef HAS_PTHREAD_YIELD
+#      define YIELD pthread_yield()
+#    endif
 #  endif
 #endif
 
index 35abbdb..bac3197 100644 (file)
 #undef PWCHANGE        /**/
 #undef PWCLASS /**/
 #undef PWEXPIRE        /**/
+#define PWGECOS        /**/
 #define PWCOMMENT      /**/
 
 /* I_STDDEF:
index f0429bb..dd66406 100644 (file)
@@ -181,6 +181,7 @@ d_pwchange='undef'
 d_pwclass='undef'
 d_pwcomment='undef'
 d_pwexpire='undef'
+d_pwgecos='undef'
 d_pwquota='undef'
 d_readdir='define'
 d_readlink='undef'
index a59cede..d409bae 100644 (file)
@@ -181,6 +181,7 @@ d_pwchange='undef'
 d_pwclass='undef'
 d_pwcomment='undef'
 d_pwexpire='undef'
+d_pwgecos='undef'
 d_pwquota='undef'
 d_readdir='define'
 d_readlink='undef'
index e1b8543..fccb2fe 100644 (file)
  *     This symbol, if defined, indicates to the C program that struct passwd
  *     contains pw_expire.
  */
+/* PWGECOS:
+ *     This symbol, if defined, indicates to the C program that struct passwd
+ *     contains pw_gecos.
+ */
 /* PWCOMMENT:
  *     This symbol, if defined, indicates to the C program that struct passwd
  *     contains pw_comment.
 /*#define PWCHANGE     /**/
 /*#define PWCLASS      /**/
 /*#define PWEXPIRE     /**/
+/*#define PWGECOS      /**/
 /*#define PWCOMMENT    /**/
 
 /* I_SFIO:
index 1652fa5..93f2332 100644 (file)
  *     This symbol, if defined, indicates to the C program that struct passwd
  *     contains pw_expire.
  */
+/* PWGECOS:
+ *     This symbol, if defined, indicates to the C program that struct passwd
+ *     contains pw_gecos.
+ */
 /* PWCOMMENT:
  *     This symbol, if defined, indicates to the C program that struct passwd
  *     contains pw_comment.
 /*#define PWCHANGE     /**/
 /*#define PWCLASS      /**/
 /*#define PWEXPIRE     /**/
+/*#define PWGECOS      /**/
 /*#define PWCOMMENT    /**/
 
 /* I_SFIO: