perl 4.0 patch #3

Larry Wall lwall at jpl-devvax.jpl.nasa.gov
Sun Apr 14 04:36:31 AEST 1991


System: perl version 4.0
Patch #: 3
Priority: HIGH

Subject: Patch 1 continued

Fix:	From rn, say "| patch -p -N -d DIR", where DIR is your perl source
	directory.  Outside of rn, say "cd DIR; patch -p -N <thisarticle".
	If you don't have the patch program, apply the following by hand,
	or get patch (version 2.0, latest patchlevel).

	After patching:
		mv config.sh config.sh.old	# at your discretion
		Configure
		make depend
		make
		make test
		make install

If you move config.sh out of the way, Configure will now look in the
hints subdirectory for defaults for your architecture and OS.

Index: patchlevel.h
Prereq: 2
1c1
< #define PATCHLEVEL 2
---
> #define PATCHLEVEL 3

Index: Configure
Prereq: 2.11
*** Configure.old	Fri Apr 12 09:29:14 1991
--- Configure	Fri Apr 12 09:29:16 1991
***************
*** 8,22 ****
  # and edit it to reflect your system.  Some packages may include samples
  # of config.h for certain machines, so you might look for one of those.)
  #
! # $Id: Head.U,v 2.11 90/09/17 17:04:47 hokey Exp Locker: hokey $
  #
  # Yes, you may rip this off to use in other distribution packages.
  # (Note: this Configure script was generated automatically.  Rather than
  # working with this copy of Configure, you may wish to get metaconfig.)
  
! : sanity checks
  PATH=".:$PATH:/bin:/usr/bin:/usr/local/bin:/usr/ucb:/usr/local:/usr/lbin:/etc:/usr/new:/usr/new/bin:/usr/nbin"
- export PATH || (echo "OOPS, this isn't sh.  Desperation time.  I will feed myself to sh."; sh $0; kill $$)
  
  if test ! -t 0; then
      echo "Say 'sh Configure', not 'sh <Configure'"
--- 8,45 ----
  # and edit it to reflect your system.  Some packages may include samples
  # of config.h for certain machines, so you might look for one of those.)
  #
! # $RCSfile: Configure,v $$Revision: 4.0.1.1 $$Date: 91/04/11 17:26:42 $
  #
  # Yes, you may rip this off to use in other distribution packages.
  # (Note: this Configure script was generated automatically.  Rather than
  # working with this copy of Configure, you may wish to get metaconfig.)
  
! cat >/tmp/c1$$ <<EOF
! ARGGGHHHH!!!!!
! 
! SCO csh still thinks true is false.  Write to SCO today and tell them that next
! year Configure ought to "rm /bin/csh" unless they fix their blasted shell. :-)
! 
! (Actually, Configure ought to just patch csh in place.  Hmm.  Hmmmmm.  All
! we'd have to do is go in and swap the && and || tokens, wherever they are.)
! 
! [End of diatribe.  We now return you to your regularly scheduled programming...]
! 
! EOF
! cat >/tmp/c2$$ <<EOF
! OOPS!  You naughty creature!  You didn't run Configure with sh!
! I will attempt to remedy the situation by running sh for you...
! 
! EOF
! 
! true || cat /tmp/c1$$ /tmp/c2$$
! true || exec sh $0
! 
! export PATH || cat /tmp/c2$$
! export PATH || exec sh $0
! rm -f /tmp/c1$$ /tmp/c2$$
! 
  PATH=".:$PATH:/bin:/usr/bin:/usr/local/bin:/usr/ucb:/usr/local:/usr/lbin:/etc:/usr/new:/usr/new/bin:/usr/nbin"
  
  if test ! -t 0; then
      echo "Say 'sh Configure', not 'sh <Configure'"
***************
*** 38,44 ****
  -d) shift; fastread='yes';;
  esac
  
- kit_has_binaries=''
  d_eunice=''
  define=''
  eunicefix=''
--- 61,66 ----
***************
*** 101,106 ****
--- 123,129 ----
  Log=''
  Header=''
  Id=''
+ lastuname=''
  alignbytes=''
  bin=''
  installbin=''
***************
*** 189,194 ****
--- 212,218 ----
  d_wait4=''
  d_waitpid=''
  gidtype=''
+ groupstype=''
  i_fcntl=''
  i_gdbm=''
  i_grp=''
***************
*** 225,230 ****
--- 249,255 ----
  mallocsrc=''
  mallocobj=''
  usemymalloc=''
+ mallocptrtype=''
  mansrc=''
  manext=''
  models=''
***************
*** 289,295 ****
      eunicefix=/etc/unixtovms.exe
  fi
  
- kit_has_binaries=false
  attrlist="DGUX M_I186 M_I286 M_I386 M_I8086 M_XENIX UTS __DGUX__"
  attrlist="$attrlist __STDC__ __m88k__ ansi bsd4_2 gcos gimpel"
  attrlist="$attrlist hp9000s300 hp9000s500 hp9000s800 hpux"
--- 314,319 ----
***************
*** 313,340 ****
  serve_unix_tcp=""
  d_ndir=ndir
  voidwant=1
! libswanted="net_s net nsl_s nsl socket nm ndir ndbm dbm sun m bsd BSD x c_s"
  inclwanted='/usr/include /usr/netinclude /usr/include/sun /usr/include/bsd /usr/include/lan'
  
  : Now test for existence of everything in MANIFEST
  
  echo "First let's make sure your kit is complete.  Checking..."
! if $kit_has_binaries; then
! ( cd ..
!   bad=false
!   for i in `awk '$1 !~ /PACKINGLIST/ {print $1}' MANIFEST`
!   do
!     if test ! -f $i ; then
!       echo Missing $i
!       bad=true
!     fi
!   done
!   if $bad; then
      kill $$
-   fi
- )
- else
-     (cd ..; awk '{}' `awk '$1 !~ /PACKINGLIST/ {print $1}' MANIFEST` >/dev/null || kill $$)
  fi
  echo "Looks good..."
  
--- 337,357 ----
  serve_unix_tcp=""
  d_ndir=ndir
  voidwant=1
! voidwant=7
! libswanted="net_s net nsl_s nsl socket nm ndir ndbm dbm malloc sun m bsd BSD x c_s posix"
  inclwanted='/usr/include /usr/netinclude /usr/include/sun /usr/include/bsd /usr/include/lan'
  
  : Now test for existence of everything in MANIFEST
  
  echo "First let's make sure your kit is complete.  Checking..."
! awk '$1 !~ /PACKINGLIST/ {print $1}' ../MANIFEST | split -200
! rm -f missing
! for filelist in x??; do
!     (cd ..; ls `cat UU/$filelist` >/dev/null 2>>UU/missing)
! done
! if test -s missing; then
!     cat missing
      kill $$
  fi
  echo "Looks good..."
  
***************
*** 488,494 ****
  
  Much effort has been expended to ensure that this shell script will run on any
  Unix system.  If despite that it blows up on you, your best bet is to edit
! Configure and run it again. Also, let me (lwall at jpl-devvax.jpl.nasa.gov)
  know how I blew it.  If you can't run Configure for some reason, you'll have
  to generate a config.sh file by hand.
  
--- 505,511 ----
  
  Much effort has been expended to ensure that this shell script will run on any
  Unix system.  If despite that it blows up on you, your best bet is to edit
! Configure and run it again. Also, let me (lwall at netlabs.com)
  know how I blew it.  If you can't run Configure for some reason, you'll have
  to generate a config.sh file by hand.
  
***************
*** 506,530 ****
  echo $n "$rp $c"
  . myread
  
- : get old answers, if there is a config file out there
- if test -f ../config.sh; then
-     echo " "
-     dflt=y
-     rp="I see a config.sh file.  Did Configure make it on THIS system? [$dflt]"
-     echo $n "$rp $c"
-     . myread
-     case "$ans" in
-     n*) echo "OK, I'll ignore it.";;
-     *)  echo "Fetching default answers from your old config.sh file..."
- 	tmp="$n"
- 	ans="$c"
-         . ../config.sh
- 	n="$tmp"
- 	c="$ans"
- 	;;
-     esac
- fi
- 
  : find out where common programs are
  echo " "
  echo "Locating common programs..."
--- 523,528 ----
***************
*** 710,715 ****
--- 708,836 ----
  chmod +x filexp
  $eunicefix filexp
  
+ : get old answers, if there is a config file out there
+ hint=default
+ if test -f ../config.sh; then
+     echo " "
+     eval `grep lastuname ../config.sh`
+     uname=`(uname -a || hostname) 2>&1`
+     if test "X$uname" = "X$lastuname"; then
+ 	dflt=y
+     else
+ 	dflt=n
+     fi
+     lastuname="$uname"
+     rp="I see a config.sh file.  Did Configure make it on THIS system? [$dflt]"
+     echo $n "$rp $c"
+     . myread
+     case "$ans" in
+     n*) echo "OK, I'll ignore it."; mv ../config.sh ../config.sh.old;;
+     *)  echo "Fetching default answers from your old config.sh file..."
+ 	tmp="$n"
+ 	ans="$c"
+         . ../config.sh
+ 	n="$tmp"
+ 	c="$ans"
+ 	hint=previous
+ 	;;
+     esac
+ fi
+ if test -d ../hints && test ! -f ../config.sh; then
+     echo ' '
+     echo "First time through, eh?  I have some defaults handy for the following systems:"
+     (cd ../hints; ls -C *.sh | sed 's/\.sh/   /g')
+     dflt=''
+     : Half the following guesses are probably wrong...
+     test -f /irix && dflt="$dflt sgi"
+     test -f /xenix && dflt="$dflt sco_xenix"
+     test -f /dynix && dflt="$dflt dynix"
+     test -f /dnix && dflt="$dflt dnix"
+     test -f /bin/mips && /bin/mips && dflt="$dflt mips"
+     if test -f /bin/uname || test -f /usr/bin/uname; then
+ 	set `uname -a | tr '[A-Z]' '[a-z]'`
+ 
+ 	test -f "../hints/$5.sh" && dflt="$dflt $5"
+ 
+ 	case "$5" in
+ 	3b2) dflt="$dflt 3b2";;
+ 	fps*) dflt="$dflt fps";;
+ 	mips*) dflt="$dflt mips";;
+ 	[23]100) dflt="$dflt mips";;
+ 	next*) dflt="$dflt next" ;;
+ 	esac
+ 
+ 	case "$1" in
+ 	aix) dflt="$dflt aix_rs" ;;
+ 	sunos) case "$3" in
+ 	    3.4) dflt="$dflt sunos_3_4" ;;
+ 	    3.5) dflt="$dflt sunos_3_5" ;;
+ 	    4.0.1) dflt="$dflt sunos_4_0_1" ;;
+ 	    4.0.2) dflt="$dflt sunos_4_0_2" ;;
+ 	    esac
+ 	    ;;
+ 	dnix) dflt="$dflt dnix" ;;
+ 	genix) dflt="$dflt genix" ;;
+ 	hp*ux) dflt="$dflt hpux" ;;
+ 	next) dflt="$dflt next" ;;
+ 	irix) dflt="$dflt sgi" ;;
+ 	ultrix) case "$3" in
+ 	    3*) dflt="$dflt ultrix_3" ;;
+ 	    4*) dflt="$dflt ultrix_4" ;;
+ 	    esac
+ 	    ;;
+ 	uts) dflt="$dflt uts" ;;
+ 	$2) if test -f /etc/systemid; then
+ 		set `echo $3 | sed 's/\./ /` $4
+ 		if test -f ../hints/sco_$1_$2_$3.sh; then
+ 		    dflt="$dflt sco_$1_$2_$3"
+ 		elif test -f ../hints/sco_$1_$2.sh; then
+ 		    dflt="$dflt sco_$1_$2"
+ 		elif test -f ../hints/sco_$1.sh; then
+ 		    dflt="$dflt sco_$1"
+ 		fi
+ 	    fi
+ 	    ;;
+ 	esac
+     fi
+     set X `echo $dflt | tr ' ' '\012' | sort | uniq`
+     shift
+     dflt=${1+"$@"}
+     case "$dflt" in
+     '') dflt=none;;
+     esac
+     echo '(You may give one or more space-separated answers, or "none" if appropriate.)'
+     rp="Which of these apply, if any? [$dflt]"
+     echo $n "$rp $c"
+     . myread
+     for file in $ans; do
+ 	if test -f ../hints/$file.sh; then
+ 	    . ../hints/$file.sh
+ 	    hint=recommended
+ 	fi
+     done
+ fi
+ 
+ cat >whoa <<'EOF'
+ eval "was=\$$2"
+ dflt=y
+ echo ' '
+ echo "*** WHOA THERE!!! ***"
+ echo "    The $hint value for \$$2 on this machine was \"$was\"!"
+ rp="    Keep the $hint value? [y]"
+ echo $n "$rp $c"
+ . myread
+ case "$ans" in
+ y) td=$was; tu=$was;;
+ esac
+ EOF
+ 
+ setvar='td=$define; tu=$undef; set X $1; eval "was=\$$2";
+ case "$val$was" in
+ defineundef) . whoa; eval "$2=\$td";;
+ undefdefine) . whoa; eval "$2=\$tu";;
+ *) eval "$2=$val";;
+ esac'
+ 
  : determine where manual pages go
  $cat <<EOM
    
***************
*** 1179,1184 ****
--- 1300,1311 ----
      *) dflt="$dflt -DLANGUAGE_C";;
      esac
  fi
+ if $contains '_NO_PROTO' $usrinclude/signal.h >/dev/null 2>&1; then
+     case "$dflt" in
+     *_NO_PROTO*);;
+     *) dflt="$dflt -D_NO_PROTO";;
+     esac
+ fi
  case "$dflt" in
  '') dflt=none;;
  esac
***************
*** 1239,1246 ****
  echo " "
  echo "Checking for optional libraries..."
  case "$libs" in
! '') dflt='';;
! *) dflt="$libs";;
  esac
  case "$libswanted" in
  '') libswanted='c_s';;
--- 1366,1373 ----
  echo " "
  echo "Checking for optional libraries..."
  case "$libs" in
! '') dflt=' ';;
! *) dflt="$libs ";;
  esac
  case "$libswanted" in
  '') libswanted='c_s';;
***************
*** 1256,1263 ****
      if test -f $xxx; then
  	echo "Found -l$thislib."
  	case "$dflt" in
! 	*-l$thislib*|*-l$thatlib*);;
! 	*) dflt="$dflt -l$thislib";;
  	esac
      else
  	xxx=`./loc lib$thislib.a X $libpth`
--- 1383,1390 ----
      if test -f $xxx; then
  	echo "Found -l$thislib."
  	case "$dflt" in
! 	*"-l$thislib "*|*"-l$thatlib "*);;
! 	*) dflt="$dflt -l$thislib ";;
  	esac
      else
  	xxx=`./loc lib$thislib.a X $libpth`
***************
*** 1264,1271 ****
  	if test -f $xxx; then
  	    echo "Found $xxx."
  	    case "$dflt" in
! 	    *$xxx*);;
! 	    *) dflt="$dflt $xxx";;
  	    esac
  	else
  	    xxx=`./loc Slib$thislib.a X $xlibpth`
--- 1391,1398 ----
  	if test -f $xxx; then
  	    echo "Found $xxx."
  	    case "$dflt" in
! 	    *"$xxx "*);;
! 	    *) dflt="$dflt $xxx ";;
  	    esac
  	else
  	    xxx=`./loc Slib$thislib.a X $xlibpth`
***************
*** 1272,1282 ****
  	    if test -f $xxx; then
  		echo "Found -l$thislib."
  		case "$dflt" in
! 		*-l$thislib*|*-l$thatlib*);;
! 		*) dflt="$dflt -l$thislib";;
  		esac
  	    else
! 		echo "No -l$thislib."
  	    fi
  	fi
      fi
--- 1399,1418 ----
  	    if test -f $xxx; then
  		echo "Found -l$thislib."
  		case "$dflt" in
! 		*"-l$thislib "*|*"-l$thatlib "*);;
! 		*) dflt="$dflt -l$thislib ";;
  		esac
  	    else
! 		xxx=`./loc lib$thislib.so X /usr/ccs/lib /usr/lib /usr/ucblib /usr/local/lib /lib`
! 		if test -f $xxx; then
! 		    echo "Found -l$thislib as a shared object only."
! 		    case "$dflt" in
! 		    *"-l$thislib "*|*"-l$thatlib "*);;
! 		    *) dflt="$dflt -l$thislib ";;
! 		    esac
! 		else
! 		    echo "No -l$thislib."
! 		fi
  	    fi
  	fi
      fi
***************
*** 1363,1369 ****
  cont=true
  while $test "$cont" ; do
      rp="In which directory will public executables reside (~name ok)? [$dflt]"
!     $echo $n "$rp $c"
      . myread
      bin="$ans"
      bin=`./filexp $bin`
--- 1499,1506 ----
  cont=true
  while $test "$cont" ; do
      rp="In which directory will public executables reside (~name ok)? [$dflt]"
!     $echo "In which directory will public executables reside (~name ok)?"
!     $echo $n "[$dflt] $c"
      . myread
      bin="$ans"
      bin=`./filexp $bin`
***************
*** 1394,1400 ****
  cont=true
  while $test "$cont" ; do
      rp="In which directory will public executables be installed (~name ok)? [$dflt]"
!     $echo $n "$rp $c"
      . myread
      installbin="$ans"
      installbin=`./filexp $installbin`
--- 1531,1538 ----
  cont=true
  while $test "$cont" ; do
      rp="In which directory will public executables be installed (~name ok)? [$dflt]"
!     $echo "In which directory will public executables be installed (~name ok)?"
!     $echo $n "[$dflt] $c"
      . myread
      installbin="$ans"
      installbin=`./filexp $installbin`
***************
*** 1517,1529 ****
      castflags=3
  fi
  case "$castflags" in
! 0)  d_castneg="$define"
      echo "Yup, it does."
      ;;
! *)  d_castneg="$undef"
      echo "Nope, it doesn't."
      ;;
  esac
  $rm -f try.*
  
  : see how we invoke the C preprocessor
--- 1655,1669 ----
      castflags=3
  fi
  case "$castflags" in
! 0)  val="$define"
      echo "Yup, it does."
      ;;
! *)  val="$undef"
      echo "Nope, it doesn't."
      ;;
  esac
+ set d_castneg
+ eval $setvar
  $rm -f try.*
  
  : see how we invoke the C preprocessor
***************
*** 1696,1703 ****
  if test -f "$1"; then
      echo "Your shared C library is in $1."
      libc="$1"
! elif test -f $libc; then
!     echo "Your C library is in $libc, like you said before."
  elif test -f /lib/libc.a; then
      echo "Your C library is in /lib/libc.a.  You're normal."
      libc=/lib/libc.a
--- 1836,1843 ----
  if test -f "$1"; then
      echo "Your shared C library is in $1."
      libc="$1"
! elif test -f "$libc"; then
!     echo "Your C library is in $libc."
  elif test -f /lib/libc.a; then
      echo "Your C library is in /lib/libc.a.  You're normal."
      libc=/lib/libc.a
***************
*** 1800,1810 ****
--- 1940,1961 ----
      fi
  fi
  
+ : old version
+ 
  inlibc='echo " ";
  if $contains "^$1\$" libc.list >/dev/null 2>&1;
  then echo "$1() found"; eval "$2=$define";
  else echo "$1() not found"; eval "$2=$undef"; fi'
  
+ : new version
+ 
+ inlibc='echo " "; td=$define; tu=$undef;
+ if $contains "^$1\$" libc.list >/dev/null 2>&1;
+ then echo "$1() found";
+   eval "case \"\$$2\" in undef) . whoa; esac"; eval "$2=\$td";
+ else echo "$1() not found";
+   eval "case \"\$$2\" in define) . whoa; esac"; eval "$2=\$tu"; fi'
+ 
  : see if bcmp exists
  set bcmp d_bcmp
  eval $inlibc
***************
*** 1820,1840 ****
  : see if sprintf is declared as int or pointer to char
  echo " "
  cat >ucbsprf.c <<'EOF'
! main() { char buf[10]; exit((unsigned long)sprintf(buf,"%s","foo") > 10L); }
  EOF
  if $cc $ccflags ucbsprf.c -o ucbsprf >/dev/null 2>&1 && ./ucbsprf; then
      echo "Your sprintf() returns (int)."
!     d_charsprf="$undef"
  else
      echo "Your sprintf() returns (char*)."
!     d_charsprf="$define"
  fi
  
  : see if vprintf exists
  echo " "
  if $contains '^vprintf$' libc.list >/dev/null 2>&1; then
      echo 'vprintf() found.'
!     d_vprintf="$define"
      cat >vprintf.c <<'EOF'
  #include <varargs.h>
  
--- 1971,1999 ----
  : see if sprintf is declared as int or pointer to char
  echo " "
  cat >ucbsprf.c <<'EOF'
! #include <stdio.h>
! main()
! {
!     int sprintf();
!     char buf[10];
!     exit((unsigned long)sprintf(buf,"%s","foo") > 10L);
! }
  EOF
  if $cc $ccflags ucbsprf.c -o ucbsprf >/dev/null 2>&1 && ./ucbsprf; then
      echo "Your sprintf() returns (int)."
!     val="$undef"
  else
      echo "Your sprintf() returns (char*)."
!     val="$define"
  fi
+ set d_charsprf
+ eval $setvar
  
  : see if vprintf exists
  echo " "
  if $contains '^vprintf$' libc.list >/dev/null 2>&1; then
      echo 'vprintf() found.'
!     val="$define"
      cat >vprintf.c <<'EOF'
  #include <varargs.h>
  
***************
*** 1852,1867 ****
  EOF
      if $cc $ccflags vprintf.c -o vprintf >/dev/null 2>&1 && ./vprintf; then
  	echo "Your vsprintf() returns (int)."
! 	d_charvspr="$undef"
      else
  	echo "Your vsprintf() returns (char*)."
! 	d_charvspr="$define"
      fi
  else
      echo 'vprintf() not found.'
!     d_vprintf="$undef"
!     d_charvspr="$undef"
  fi
  
  : see if chsize exists
  set chsize d_chsize
--- 2011,2031 ----
  EOF
      if $cc $ccflags vprintf.c -o vprintf >/dev/null 2>&1 && ./vprintf; then
  	echo "Your vsprintf() returns (int)."
! 	val2="$undef"
      else
  	echo "Your vsprintf() returns (char*)."
! 	val2="$define"
      fi
  else
      echo 'vprintf() not found.'
!     val="$undef"
!     val2="$undef"
  fi
+ set d_vprintf
+ eval $setvar
+ val=$val2
+ set d_charvspr
+ eval $setvar
  
  : see if chsize exists
  set chsize d_chsize
***************
*** 1871,1877 ****
  echo " "
  if $contains '^crypt$' libc.list >/dev/null 2>&1; then
      echo 'crypt() found.'
!     d_crypt="$define"
      cryptlib=''
  else
      cryptlib=`./loc Slibcrypt.a "" $xlibpth`
--- 2035,2041 ----
  echo " "
  if $contains '^crypt$' libc.list >/dev/null 2>&1; then
      echo 'crypt() found.'
!     val="$define"
      cryptlib=''
  else
      cryptlib=`./loc Slibcrypt.a "" $xlibpth`
***************
*** 1892,1908 ****
      fi
      if $test -z "$cryptlib"; then
  	echo 'crypt() not found.'
! 	d_crypt="$undef"
      else
! 	d_crypt="$define"
      fi
  fi
  
  : get csh whereabouts
  case "$csh" in
! 'csh') d_csh="$undef" ;;
! *)     d_csh="$define" ;;
  esac
  
  : see if readdir exists
  set readdir d_readdir
--- 2056,2076 ----
      fi
      if $test -z "$cryptlib"; then
  	echo 'crypt() not found.'
! 	val="$undef"
      else
! 	val="$define"
      fi
  fi
+ set d_crypt
+ eval $setvar
  
  : get csh whereabouts
  case "$csh" in
! 'csh') val="$undef" ;;
! *)     val="$define" ;;
  esac
+ set d_csh
+ eval $setvar
  
  : see if readdir exists
  set readdir d_readdir
***************
*** 1916,1927 ****
      xxx=`./loc sys/ndir.h x $usrinclude /usr/local/include $inclwanted`
      ;;
  esac
! d_dirnamlen="$undef"
! i_dirent="$undef"
! i_sys_dir="$undef"
! i_my_dir="$undef"
! i_ndir="$undef"
! i_sys_ndir="$undef"
  libndir=''
  ndirc=''
  ndiro=''
--- 2084,2095 ----
      xxx=`./loc sys/ndir.h x $usrinclude /usr/local/include $inclwanted`
      ;;
  esac
! D_dirnamlen="$undef"
! I_dirent="$undef"
! I_sys_dir="$undef"
! I_my_dir="$undef"
! I_ndir="$undef"
! I_sys_ndir="$undef"
  libndir=''
  ndirc=''
  ndiro=''
***************
*** 1928,1936 ****
  if $test -r $usrinclude/dirent.h; then
      echo "dirent.h found."
      if $contains 'd_namlen' $usrinclude/dirent.h >/dev/null 2>&1; then
! 	d_dirnamlen="$define"
      fi
!     i_dirent="$define"
  elif $test -r $xxx; then
      echo "You seem to use <$xxx>,"
      if $test "$d_readdir" = "$define"; then
--- 2096,2104 ----
  if $test -r $usrinclude/dirent.h; then
      echo "dirent.h found."
      if $contains 'd_namlen' $usrinclude/dirent.h >/dev/null 2>&1; then
! 	D_dirnamlen="$define"
      fi
!     I_dirent="$define"
  elif $test -r $xxx; then
      echo "You seem to use <$xxx>,"
      if $test "$d_readdir" = "$define"; then
***************
*** 1951,1987 ****
  	esac
      fi
      if $contains 'd_namlen' $xxx >/dev/null 2>&1; then
! 	d_dirnamlen="$define"
      fi
      case "$xxx" in
      sys/)
! 	i_sys_ndir="$define"
  	;;
      *)
! 	i_ndir="$define"
  	;;
      esac
  else
!     # The next line used to require this to be a bsd system.
      if $contains '^readdir$' libc.list >/dev/null 2>&1 ; then
  	echo "No ndir library found, but you have readdir() so we'll use that."
  	if $contains 'd_namlen' $usrinclude/sys/dir.h >/dev/null 2>&1; then
! 	    d_dirnamlen="$define"
  	fi
! 	i_sys_dir="$define"
      else
  	echo "No ndir library found--using ./$d_ndir.c."
! # This will lose since $d_ndir.h is in another directory.
! # I doubt we can rely on it being in ../$d_ndir.h . 
! # At least it will fail in a conservative manner.
  	if $contains 'd_namlen' $d_ndir.h >/dev/null 2>&1; then
! 	    d_dirnamlen="$define"
  	fi
! 	i_my_dir="$define"
  	ndirc="$d_ndir.c"
  	ndiro="$d_ndir.o"
      fi
  fi
  
  : now see if they want to do setuid emulation
  case "$d_dosuid" in
--- 2119,2161 ----
  	esac
      fi
      if $contains 'd_namlen' $xxx >/dev/null 2>&1; then
! 	D_dirnamlen="$define"
      fi
      case "$xxx" in
      sys/)
! 	I_sys_ndir="$define"
  	;;
      *)
! 	I_ndir="$define"
  	;;
      esac
  else
!     : The next line used to require this to be a bsd system.
      if $contains '^readdir$' libc.list >/dev/null 2>&1 ; then
  	echo "No ndir library found, but you have readdir() so we'll use that."
  	if $contains 'd_namlen' $usrinclude/sys/dir.h >/dev/null 2>&1; then
! 	    D_dirnamlen="$define"
  	fi
! 	I_sys_dir="$define"
      else
  	echo "No ndir library found--using ./$d_ndir.c."
! : This will lose since $d_ndir.h is in another directory.
! : I doubt we can rely on it being in ../$d_ndir.h . 
! : At least it will fail in a conservative manner.
  	if $contains 'd_namlen' $d_ndir.h >/dev/null 2>&1; then
! 	    D_dirnamlen="$define"
  	fi
! 	I_my_dir="$define"
  	ndirc="$d_ndir.c"
  	ndiro="$d_ndir.o"
      fi
  fi
+ val=$D_dirnamlen;	set d_dirnamlen;	eval $setvar
+ val=$I_dirent;		set i_dirent;		eval $setvar
+ val=$I_sys_dir;		set i_sys_dir;		eval $setvar
+ val=$I_my_dir;		set i_my_dir;		eval $setvar
+ val=$I_ndir;		set i_ndir;		eval $setvar
+ val=$I_sys_ndir;	set i_sys_ndir;		eval $setvar
  
  : now see if they want to do setuid emulation
  case "$d_dosuid" in
***************
*** 2032,2047 ****
      : not version 8
      if test -f 123456789abcde; then
  	echo 'You cannot have filenames longer than 14 characters.  Sigh.'
! 	d_flexfnam="$undef"
      else
  	echo 'You can have filenames longer than 14 characters.'
! 	d_flexfnam="$define"
      fi
  else
      : version 8 probably
!     echo "You can't have filenames longer than 14 chars.  V8 can't even think about them!"
!     d_flexfnam="$undef"
  fi 
  : see if flock exists
  set flock d_flock
  eval $inlibc
--- 2206,2224 ----
      : not version 8
      if test -f 123456789abcde; then
  	echo 'You cannot have filenames longer than 14 characters.  Sigh.'
! 	val="$undef"
      else
  	echo 'You can have filenames longer than 14 characters.'
! 	val="$define"
      fi
  else
      : version 8 probably
!     echo "You can't have filenames longer than 14 chars.  You can't even think about them!"
!     val="$undef"
  fi 
+ set d_flexfnam
+ eval $setvar
+ 
  : see if flock exists
  set flock d_flock
  eval $inlibc
***************
*** 2074,2080 ****
  echo " "
  case "$d_index" in
  n) dflt=n;;
! *) dflt=y;;
  esac
  if $contains '^index$' libc.list >/dev/null 2>&1 ; then
      if $contains '^strchr$' libc.list >/dev/null 2>&1 ; then
--- 2251,2262 ----
  echo " "
  case "$d_index" in
  n) dflt=n;;
! *)  if $test -f /unix; then
! 	dflt=n
!     else
! 	dflt=y
!     fi
!     ;;
  esac
  if $contains '^index$' libc.list >/dev/null 2>&1 ; then
      if $contains '^strchr$' libc.list >/dev/null 2>&1 ; then
***************
*** 2145,2177 ****
  : we could also check for sys/ipc.h ...
  if $h_msg && $test -r $usrinclude/sys/msg.h; then
      echo "You have the full msg*(2) library."
!     d_msg="$define"
  else
      echo "You don't have the full msg*(2) library."
!     d_msg="$undef"
  fi
  
  : see if ndbm is available
  echo " "
  xxx=`./loc ndbm.h x $usrinclude /usr/local/include $inclwanted`
  if test -f $xxx; then
!     d_ndbm="$define"
      echo "ndbm.h found."
  else
!     d_ndbm="$undef"
      echo "ndbm.h not found."
  fi
  
  : see if we have the old dbm
  echo " "
  xxx=`./loc dbm.h x $usrinclude /usr/local/include $inclwanted`
  if test -f $xxx; then
!     d_odbm="$define"
      echo "dbm.h found."
  else
!     d_odbm="$undef"
      echo "dbm.h not found."
  fi
  
  : see whether socket exists
  echo " "
--- 2327,2365 ----
  : we could also check for sys/ipc.h ...
  if $h_msg && $test -r $usrinclude/sys/msg.h; then
      echo "You have the full msg*(2) library."
!     val="$define"
  else
      echo "You don't have the full msg*(2) library."
!     val="$undef"
  fi
+ set d_msg
+ eval $setvar
  
  : see if ndbm is available
  echo " "
  xxx=`./loc ndbm.h x $usrinclude /usr/local/include $inclwanted`
  if test -f $xxx; then
!     val="$define"
      echo "ndbm.h found."
  else
!     val="$undef"
      echo "ndbm.h not found."
  fi
+ set d_ndbm
+ eval $setvar
  
  : see if we have the old dbm
  echo " "
  xxx=`./loc dbm.h x $usrinclude /usr/local/include $inclwanted`
  if test -f $xxx; then
!     val="$define"
      echo "dbm.h found."
  else
!     val="$undef"
      echo "dbm.h not found."
  fi
+ set d_odbm
+ eval $setvar
  
  : see whether socket exists
  echo " "
***************
*** 2178,2198 ****
  socketlib=''
  if $contains socket libc.list >/dev/null 2>&1; then
      echo "Looks like you have Berkeley networking support."
!     d_socket="$define"
      : now check for advanced features
      if $contains setsockopt libc.list >/dev/null 2>&1; then
! 	d_oldsock="$undef"
      else
  	echo "...but it uses the old 4.1c interface, rather than 4.2"
! 	d_oldsock="$define"
      fi
  else
      : hpux, for one, puts all the socket stuff in socklib.o
      if $contains socklib libc.list >/dev/null 2>&1; then
  	echo "Looks like you have Berkeley networking support."
! 	d_socket="$define"
  	: we will have to assume that it supports the 4.2 BSD interface
! 	d_oldsock="$undef"
      else
  	echo "Hmmm...you don't have Berkeley networking in libc.a..."
  	: look for an optional networking library
--- 2366,2386 ----
  socketlib=''
  if $contains socket libc.list >/dev/null 2>&1; then
      echo "Looks like you have Berkeley networking support."
!     val="$define"
      : now check for advanced features
      if $contains setsockopt libc.list >/dev/null 2>&1; then
! 	val2="$undef"
      else
  	echo "...but it uses the old 4.1c interface, rather than 4.2"
! 	val2="$define"
      fi
  else
      : hpux, for one, puts all the socket stuff in socklib.o
      if $contains socklib libc.list >/dev/null 2>&1; then
  	echo "Looks like you have Berkeley networking support."
! 	val="$define"
  	: we will have to assume that it supports the 4.2 BSD interface
! 	val2="$undef"
      else
  	echo "Hmmm...you don't have Berkeley networking in libc.a..."
  	: look for an optional networking library
***************
*** 2202,2232 ****
  	    if $contains socket libc.list >/dev/null 2>&1; then
  		echo "but the Wollongong group seems to have hacked it in."
  		socketlib="-lnet -lnsl_s"
! 		d_socket="$define"
  		: now check for advanced features
  		if $contains setsockopt libc.list >/dev/null 2>&1; then
! 		    d_oldsock="$undef"
  		else
  		    echo "...using the old 4.1c interface, rather than 4.2"
! 		    d_oldsock="$define"
  		fi
  	    else
  		echo "or even in libnet.a, which is peculiar."
! 		d_socket="$undef"
! 		d_oldsock="$undef"
  	    fi
  	else
  	    echo "or anywhere else I see."
! 	    d_socket="$undef"
! 	    d_oldsock="$undef"
  	fi
      fi
  fi
  if $contains socketpair libc.list >/dev/null 2>&1; then
!     d_sockpair="$define"
  else
!     d_sockpair="$undef"
  fi
  
  : Locate the flags for 'open()'
  echo " "
--- 2390,2428 ----
  	    if $contains socket libc.list >/dev/null 2>&1; then
  		echo "but the Wollongong group seems to have hacked it in."
  		socketlib="-lnet -lnsl_s"
! 		val="$define"
  		: now check for advanced features
  		if $contains setsockopt libc.list >/dev/null 2>&1; then
! 		    val2="$undef"
  		else
  		    echo "...using the old 4.1c interface, rather than 4.2"
! 		    val2="$define"
  		fi
  	    else
  		echo "or even in libnet.a, which is peculiar."
! 		val="$undef"
! 		val2="$undef"
  	    fi
  	else
  	    echo "or anywhere else I see."
! 	    val="$undef"
! 	    val2="$undef"
  	fi
      fi
  fi
+ set d_socket
+ eval $setvar
+ 
  if $contains socketpair libc.list >/dev/null 2>&1; then
!     val="$define"
  else
!     val="$undef"
  fi
+ set d_sockpair
+ eval $setvar
+ val=$val2
+ set d_oldsock
+ eval $setvar
  
  : Locate the flags for 'open()'
  echo " "
***************
*** 2256,2265 ****
      echo "sys/file.h defines the O_* constants..."
      if ./open3; then
  	echo "and you have the 3 argument form of open()."
! 	d_open3="$define"
      else
  	echo "but not the 3 argument form of open().  Oh, well."
! 	d_open3="$undef"
      fi
  elif $test -r $usrinclude/fcntl.h && \
     $cc "-DI_FCNTL" open3.c -o open3 >/dev/null 2>&1 ; then
--- 2452,2461 ----
      echo "sys/file.h defines the O_* constants..."
      if ./open3; then
  	echo "and you have the 3 argument form of open()."
! 	val="$define"
      else
  	echo "but not the 3 argument form of open().  Oh, well."
! 	val="$undef"
      fi
  elif $test -r $usrinclude/fcntl.h && \
     $cc "-DI_FCNTL" open3.c -o open3 >/dev/null 2>&1 ; then
***************
*** 2267,2281 ****
      echo "fcntl.h defines the O_* constants..."
      if ./open3; then
  	echo "and you have the 3 argument form of open()."
! 	d_open3="$define"
      else
  	echo "but not the 3 argument form of open().  Oh, well."
! 	d_open3="$undef"
      fi
  else
!     d_open3="$undef"
      echo "I can't find the O_* constant definitions!  You got problems."
  fi
  
  : see if how pwd stuff is defined
  echo " "
--- 2463,2479 ----
      echo "fcntl.h defines the O_* constants..."
      if ./open3; then
  	echo "and you have the 3 argument form of open()."
! 	val="$define"
      else
  	echo "but not the 3 argument form of open().  Oh, well."
! 	val="$undef"
      fi
  else
!     val="$undef"
      echo "I can't find the O_* constant definitions!  You got problems."
  fi
+ set d_open3
+ eval $setvar
  
  : see if how pwd stuff is defined
  echo " "
***************
*** 2282,2288 ****
  if $test -r $usrinclude/pwd.h ; then
      i_pwd="$define"
      echo "pwd.h found."
!     $cppstdin $cppflags <$usrinclude/pwd.h >pwd.txt
      if $contains 'pw_quota' pwd.txt >/dev/null 2>&1; then
  	d_pwquota="$define"
      else
--- 2480,2486 ----
  if $test -r $usrinclude/pwd.h ; then
      i_pwd="$define"
      echo "pwd.h found."
!     $cppstdin $cppflags $cppminus <$usrinclude/pwd.h >pwd.txt
      if $contains 'pw_quota' pwd.txt >/dev/null 2>&1; then
  	d_pwquota="$define"
      else
***************
*** 2357,2367 ****
  : we could also check for sys/ipc.h ...
  if $h_sem && $test -r $usrinclude/sys/sem.h; then
      echo "You have the full sem*(2) library."
!     d_sem="$define"
  else
      echo "You don't have the full sem*(2) library."
!     d_sem="$undef"
  fi
  
  : see if setegid exists
  set setegid d_setegid
--- 2555,2567 ----
  : we could also check for sys/ipc.h ...
  if $h_sem && $test -r $usrinclude/sys/sem.h; then
      echo "You have the full sem*(2) library."
!     val="$define"
  else
      echo "You don't have the full sem*(2) library."
!     val="$undef"
  fi
+ set d_sem
+ eval $setvar
  
  : see if setegid exists
  set setegid d_setegid
***************
*** 2428,2438 ****
  : we could also check for sys/ipc.h ...
  if $h_shm && $test -r $usrinclude/sys/shm.h; then
      echo "You have the full shm*(2) library."
!     d_shm="$define"
  else
      echo "You don't have the full shm*(2) library."
!     d_shm="$undef"
  fi
  
  : see if stat knows about block sizes
  echo " "
--- 2628,2640 ----
  : we could also check for sys/ipc.h ...
  if $h_shm && $test -r $usrinclude/sys/shm.h; then
      echo "You have the full shm*(2) library."
!     val="$define"
  else
      echo "You don't have the full shm*(2) library."
!     val="$undef"
  fi
+ set d_shm
+ eval $setvar
  
  : see if stat knows about block sizes
  echo " "
***************
*** 2439,2453 ****
  if $contains 'st_blocks;' $usrinclude/sys/stat.h >/dev/null 2>&1 ; then
      if $contains 'st_blksize;' $usrinclude/sys/stat.h >/dev/null 2>&1 ; then
  	echo "Your stat knows about block sizes."
! 	d_statblks="$define"
      else
  	echo "Your stat doesn't know about block sizes."
! 	d_statblks="$undef"
      fi
  else
      echo "Your stat doesn't know about block sizes."
!     d_statblks="$undef"
  fi
  
  : see if stdio is really std
  echo " "
--- 2641,2657 ----
  if $contains 'st_blocks;' $usrinclude/sys/stat.h >/dev/null 2>&1 ; then
      if $contains 'st_blksize;' $usrinclude/sys/stat.h >/dev/null 2>&1 ; then
  	echo "Your stat knows about block sizes."
! 	val="$define"
      else
  	echo "Your stat doesn't know about block sizes."
! 	val="$undef"
      fi
  else
      echo "Your stat doesn't know about block sizes."
!     val="$undef"
  fi
+ set d_statblks
+ eval $setvar
  
  : see if stdio is really std
  echo " "
***************
*** 2454,2468 ****
  if $contains 'char.*_ptr.*;' $usrinclude/stdio.h >/dev/null 2>&1 ; then
      if $contains '_cnt;' $usrinclude/stdio.h >/dev/null 2>&1 ; then
  	echo "Your stdio is pretty std."
! 	d_stdstdio="$define"
      else
  	echo "Your stdio isn't very std."
! 	d_stdstdio="$undef"
      fi
  else
      echo "Your stdio isn't very std."
!     d_stdstdio="$undef"
  fi
  
  : check for structure copying
  echo " "
--- 2658,2674 ----
  if $contains 'char.*_ptr.*;' $usrinclude/stdio.h >/dev/null 2>&1 ; then
      if $contains '_cnt;' $usrinclude/stdio.h >/dev/null 2>&1 ; then
  	echo "Your stdio is pretty std."
! 	val="$define"
      else
  	echo "Your stdio isn't very std."
! 	val="$undef"
      fi
  else
      echo "Your stdio isn't very std."
!     val="$undef"
  fi
+ set d_stdstdio
+ eval $setvar
  
  : check for structure copying
  echo " "
***************
*** 2478,2489 ****
  }
  EOCP
  if $cc -c strctcpy.c >/dev/null 2>&1 ; then
!     d_strctcpy="$define"
      echo "Yup, it can."
  else
!     d_strctcpy="$undef"
      echo "Nope, it can't."
  fi
  
  : see if strerror exists
  set strerror d_strerror
--- 2684,2697 ----
  }
  EOCP
  if $cc -c strctcpy.c >/dev/null 2>&1 ; then
!     val="$define"
      echo "Yup, it can."
  else
!     val="$undef"
      echo "Nope, it can't."
  fi
+ set d_strctcpy
+ eval $setvar
  
  : see if strerror exists
  set strerror d_strerror
***************
*** 2501,2507 ****
  w_s_tm=1
  
  : set if package uses struct timeval
! w_s_timevl=1
  
  : set if package uses localtime function
  w_localtim=1
--- 2709,2717 ----
  w_s_tm=1
  
  : set if package uses struct timeval
! case "$d_select" in
! define) w_s_timevl=1 ;;
! esac
  
  : set if package uses localtime function
  w_localtim=1
***************
*** 2598,2606 ****
  	    for i_systime in '-DI_SYS_TIME' ''; do
  		case "$flags" in
  		'') echo Trying $i_time $i_systime $d_systimekernel $i_sys_select
! 		    if $cc $ccflags i_time.c $idefs \
  			    $i_time $i_systime $d_systimekernel $i_sys_select \
! 			    -o i_time >/dev/null 2>&1 ; then
  			set X $i_time $i_systime $d_systimekernel $i_sys_select
  			shift
  			flags="$*"
--- 2808,2816 ----
  	    for i_systime in '-DI_SYS_TIME' ''; do
  		case "$flags" in
  		'') echo Trying $i_time $i_systime $d_systimekernel $i_sys_select
! 		    if $cc $ccflags $idefs \
  			    $i_time $i_systime $d_systimekernel $i_sys_select \
! 			    i_time.c -o i_time >/dev/null 2>&1 ; then
  			set X $i_time $i_systime $d_systimekernel $i_sys_select
  			shift
  			flags="$*"
***************
*** 2613,2644 ****
      done
  done
  case "$flags" in
! *SYSTIMEKERNEL*) d_systimekernel="$define";;
! *) d_systimekernel="$undef";;
  esac
  case "$flags" in
! *I_TIME*) i_time="$define";;
! *) i_time="$undef";;
  esac
  case "$flags" in
! *I_SYS_SELECT*) i_sys_select="$define";;
! *) i_sys_select="$undef";;
  esac
  case "$flags" in
! *I_SYS_TIME*) i_sys_time="$define";;
! *) i_sys_time="$undef";;
  esac
  
  : see if signal is declared as pointer to function returning int or void
  echo " "
  $cppstdin $cppflags $cppminus < $usrinclude/signal.h >d_voidsig.txt
! if $contains 'void.*signal' d_voidsig.txt >/dev/null 2>&1 ; then
!     echo "You have void (*signal())() instead of int."
!     d_voidsig="$define"
! else
      echo "You have int (*signal())() instead of void."
!     d_voidsig="$undef"
  fi
  
  : see if truncate exists
  set truncate d_truncate
--- 2823,2870 ----
      done
  done
  case "$flags" in
! *SYSTIMEKERNEL*) val="$define";;
! *) val="$undef";;
  esac
+ set d_systimekernel
+ eval $setvar
  case "$flags" in
! *I_TIME*) val="$define";;
! *) val="$undef";;
  esac
+ set i_time
+ eval $setvar
  case "$flags" in
! *I_SYS_SELECT*) val="$define";;
! *) val="$undef";;
  esac
+ set i_sys_select
+ eval $setvar
  case "$flags" in
! *I_SYS_TIME*) val="$define";;
! *) val="$undef";;
  esac
+ set i_sys_time
+ eval $setvar
+ case "$flags$i_sys_time$i_time" in
+ undefundef) i_sys_time="$define"; i_time="$define";
+     echo "ICK, NOTHING WORKED!!!  You may have to diddle the includes.";;
+ esac
  
  : see if signal is declared as pointer to function returning int or void
  echo " "
  $cppstdin $cppflags $cppminus < $usrinclude/signal.h >d_voidsig.txt
! if $contains 'int.*signal' d_voidsig.txt >/dev/null 2>&1 ; then
      echo "You have int (*signal())() instead of void."
!     val="$undef"
!     d_tosignal=int
! else
!     echo "You have void (*signal())() instead of int."
!     val="$define"
!     d_tosignal=void
  fi
+ set d_voidsig
+ eval $setvar
  
  : see if truncate exists
  set truncate d_truncate
***************
*** 2662,2673 ****
  }
  EOCP
  if $cc -c $ccflags try.c >/dev/null 2>&1 ; then
!     d_volatile="$define"
      echo "Yup, it does."
  else
!     d_volatile="$undef"
      echo "Nope, it doesn't."
  fi
  $rm -f try.*
  
  : see if there is a wait4
--- 2888,2901 ----
  }
  EOCP
  if $cc -c $ccflags try.c >/dev/null 2>&1 ; then
!     val="$define"
      echo "Yup, it does."
  else
!     val="$undef"
      echo "Nope, it doesn't."
  fi
+ set d_volatile
+ eval $setvar
  $rm -f try.*
  
  : see if there is a wait4
***************
*** 2679,2695 ****
  eval $inlibc
  
  : see what type gids are declared as in the kernel
- echo " "
  case "$gidtype" in
  '')
!     if $contains 'getgroups.*short' /usr/lib/lint/llib-lc >/dev/null 2>&1; then
! 	dflt='short'
!     elif $contains 'getgroups.*int' /usr/lib/lint/llib-lc >/dev/null 2>&1; then
! 	dflt='int'
!     elif $contains 'gid_t;' $usrinclude/sys/types.h >/dev/null 2>&1 ; then
! 	dflt='gid_t'
      else
! 	set `grep 'groups\[NGROUPS\];' $usrinclude/sys/user.h 2>/dev/null` unsigned short
  	case $1 in
  	unsigned) dflt="$1 $2" ;;
  	*) dflt="$1" ;;
--- 2907,2918 ----
  eval $inlibc
  
  : see what type gids are declared as in the kernel
  case "$gidtype" in
  '')
!     if $contains 'gid_t;' $usrinclude/sys/types.h >/dev/null 2>&1 ; then
! 	dflt='gid_t';
      else
! 	set `grep '_rgid;' $usrinclude/sys/user.h 2>/dev/null` unsigned short
  	case $1 in
  	unsigned) dflt="$1 $2" ;;
  	*) dflt="$1" ;;
***************
*** 2700,2707 ****
      ;;
  esac
  cont=true
! echo "(The following only matters if you have getgroups().)"
! rp="What type are the group ids returned by getgroups()? [$dflt]"
  $echo $n "$rp $c"
  . myread
  gidtype="$ans"
--- 2923,2930 ----
      ;;
  esac
  cont=true
! echo " "
! rp="What type are groups ids returned by getgid(), etc.? [$dflt]"
  $echo $n "$rp $c"
  . myread
  gidtype="$ans"
***************
*** 2734,2739 ****
--- 2957,3004 ----
  . myread
  intsize="$ans"
  
+ : determine which malloc to compile in
+ echo " "
+ case "$usemymalloc" in
+ '')
+     if bsd || v7; then
+ 	dflt='y'
+     else
+ 	dflt='n'
+     fi
+     ;;
+ *)  dflt="$usemymalloc"
+     ;;
+ esac
+ rp="Do you wish to attempt to use the malloc that comes with $package? [$dflt]"
+ $echo $n "$rp $c"
+ . myread
+ case "$ans" in
+ '') ans=$dflt;;
+ esac
+ usemymalloc="$ans"
+ case "$ans" in
+ y*) mallocsrc='malloc.c'; mallocobj='malloc.o'
+     libs=`echo $libs | sed 's/-lmalloc//'`
+     case "$mallocptrtype" in
+     '')
+ 	cat >usemymalloc.c <<'END'
+ #include <malloc.h>
+ void *malloc();
+ END
+ 	if $cc $ccflags -c usemymalloc.c >/dev/null 2>&1; then
+ 	    mallocptrtype=void
+ 	else
+ 	    mallocptrtype=char
+ 	fi
+ 	;;
+     esac
+     echo " "
+     echo "Your system wants malloc to return $mallocptrtype*, it would seem."
+     ;;
+ *) mallocsrc=''; mallocobj=''; mallocptrtype=void;;
+ esac
+ 
  : determine where private executables go
  case "$privlib" in
  '')
***************
*** 2998,3030 ****
  Log='$Log'
  Header='$Header'
  Id='$Id'
  
  
- : determine which malloc to compile in
- echo " "
- case "$usemymalloc" in
- '')
-     if bsd || v7; then
- 	dflt='y'
-     else
- 	dflt='n'
-     fi
-     ;;
- *)  dflt="$usemymalloc"
-     ;;
- esac
- rp="Do you wish to attempt to use the malloc that comes with $package? [$dflt]"
- $echo $n "$rp $c"
- . myread
- case "$ans" in
- '') ans=$dflt;;
- esac
- usemymalloc="$ans"
- case "$ans" in
- y*) mallocsrc='malloc.c'; mallocobj='malloc.o';;
- *) mallocsrc=''; mallocobj='';;
- esac
- 
  : determine compiler compiler
  case "$yacc" in
  '') if xenix; then
--- 3263,3277 ----
  Log='$Log'
  Header='$Header'
  Id='$Id'
+ Author='$Author'
+ Date='$Date'
+ Locker='$Locker'
+ RCSfile='$RCSfile'
+ Revision='$Revision'
+ Source='$Source'
+ State='$State'
  
  
  : determine compiler compiler
  case "$yacc" in
  '') if xenix; then
***************
*** 3045,3057 ****
  esac
  yacc="$ans"
  
  : see if we can include fcntl.h
  echo " "
  if $h_fcntl; then
!     i_fcntl="$define"
      echo "We'll be including <fcntl.h>."
  else
!     i_fcntl="$undef"
      if $h_sys_file; then
  	echo "We don't need to <fcntl.h> if we include <sys/file.h>."
      else
--- 3292,3338 ----
  esac
  yacc="$ans"
  
+ : see what type gids are returned by getgroups
+ echo " "
+ case "$groupstype" in
+ '')
+     if $contains 'getgroups.*short' /usr/lib/lint/llib-lc >/dev/null 2>&1; then
+ 	dflt='short'
+     elif $contains 'getgroups.*int' /usr/lib/lint/llib-lc >/dev/null 2>&1; then
+ 	dflt='int'
+     elif $contains 'getgroups.*short' /usr/lib/lint/llib-lbsd >/dev/null 2>&1; then
+ 	dflt='short'
+     elif $contains 'getgroups.*int' /usr/lib/lint/llib-lbsd >/dev/null 2>&1; then
+ 	dflt='int'
+     elif $contains 'int gidset' /usr/man/man2/getgroups.2 >/dev/null 2>&1 ; then
+ 	dflt='int'
+     elif $contains 'gid_t;' $usrinclude/sys/types.h >/dev/null 2>&1 ; then
+ 	dflt='gid_t'
+     else
+ 	set `grep 'groups\[NGROUPS\];' $usrinclude/sys/user.h 2>/dev/null` unsigned short
+ 	case $1 in
+ 	unsigned) dflt="$1 $2" ;;
+ 	*) dflt="$1" ;;
+ 	esac
+     fi
+     ;;
+ *)  dflt="$groupstype"
+     ;;
+ esac
+ cont=true
+ echo "(The following only matters if you have getgroups().)"
+ rp="What type are the group ids returned by getgroups()? [$dflt]"
+ $echo $n "$rp $c"
+ . myread
+ groupstype="$ans"
+ 
  : see if we can include fcntl.h
  echo " "
  if $h_fcntl; then
!     val="$define"
      echo "We'll be including <fcntl.h>."
  else
!     val="$undef"
      if $h_sys_file; then
  	echo "We don't need to <fcntl.h> if we include <sys/file.h>."
      else
***************
*** 3058,3154 ****
  	echo "We won't be including <fcntl.h>."
      fi
  fi
  
  : see if gdbm is available
  echo " "
  xxx=`./loc gdbm.h x $usrinclude /usr/local/include $inclwanted`
  if test -f $xxx; then
!     i_gdbm="$define"
      echo "gdbm.h found."
  else
!     i_gdbm="$undef"
      echo "gdbm.h not found."
  fi
  
  : see if this is an grp system
  echo " "
  if $test -r $usrinclude/grp.h ; then
!     i_grp="$define"
      echo "grp.h found."
  else
!     i_grp="$undef"
      echo "No grp.h found."
  fi
  
  : see if this is a netinet/in.h or sys/in.h system
  echo " "
  xxx=`./loc netinet/in.h x $usrinclude /usr/local/include $inclwanted`
  if test -f $xxx; then
!     i_niin="$define"
!     i_sysin="$undef"
      echo "netinet/in.h found."
  else
!     i_niin="$undef"
      echo "No netinet/in.h found, ..."
      xxx=`./loc sys/in.h x $usrinclude /usr/local/include $inclwanted`
      if test -f $xxx; then
! 	i_sysin="$define"
  	echo "but I found sys/in.h instead."
      else
! 	i_sysin="$undef"
  	echo "and I didn't find sys/in.h either."
      fi
  fi
  
  : Do we need to #include <sys/file.h> ?
  echo " "
  if $h_sys_file; then
!     i_sys_file="$define"
      echo "We'll be including <sys/file.h>."
  else
!     i_sys_file="$undef"
      echo "We won't be including <sys/file.h>."
  fi
  
  : see if ioctl defs are in sgtty/termio or sys/ioctl
  echo " "
  if $test -r $usrinclude/sys/ioctl.h ; then
!     i_sysioctl="$define"
      echo "sys/ioctl.h found."
  else
!     i_sysioctl="$undef"
      echo "sys/ioctl.h not found, assuming ioctl args are defined in sgtty.h."
  fi
  
  : see if we should include utime.h
  echo " "
  if $test -r $usrinclude/utime.h ; then
!     i_utime="$define"
      echo "utime.h found."
  else
!     i_utime="$undef"
      echo "No utime.h found, but that's ok."
  fi
  
  : see if this is a varargs system
  echo " "
  if $test -r $usrinclude/varargs.h ; then
!     i_varargs="$define"
      echo "varargs.h found."
  else
!     i_varargs="$undef"
      echo "No varargs.h found, but that's ok (I hope)."
  fi
  
  : see if this is a vfork system
  echo " "
  if $test -r $usrinclude/vfork.h ; then
!     i_vfork="$define"
      echo "vfork.h found."
  else
!     i_vfork="$undef"
      echo "No vfork.h found."
  fi
  
  : end of configuration questions
  echo " "
--- 3339,3456 ----
  	echo "We won't be including <fcntl.h>."
      fi
  fi
+ set i_fcntl
+ eval $setvar
  
  : see if gdbm is available
  echo " "
  xxx=`./loc gdbm.h x $usrinclude /usr/local/include $inclwanted`
  if test -f $xxx; then
!     val="$define"
      echo "gdbm.h found."
  else
!     val="$undef"
      echo "gdbm.h not found."
  fi
+ set i_gdbm
+ eval $setvar
  
  : see if this is an grp system
  echo " "
  if $test -r $usrinclude/grp.h ; then
!     val="$define"
      echo "grp.h found."
  else
!     val="$undef"
      echo "No grp.h found."
  fi
+ set i_grp
+ eval $setvar
  
  : see if this is a netinet/in.h or sys/in.h system
  echo " "
  xxx=`./loc netinet/in.h x $usrinclude /usr/local/include $inclwanted`
  if test -f $xxx; then
!     val="$define"
!     val2="$undef"
      echo "netinet/in.h found."
  else
!     val="$undef"
      echo "No netinet/in.h found, ..."
      xxx=`./loc sys/in.h x $usrinclude /usr/local/include $inclwanted`
      if test -f $xxx; then
! 	val2="$define"
  	echo "but I found sys/in.h instead."
      else
! 	val2="$undef"
  	echo "and I didn't find sys/in.h either."
      fi
  fi
+ set i_niin
+ eval $setvar
+ val=$val2
+ set i_sysin
+ eval $setvar
  
  : Do we need to #include <sys/file.h> ?
  echo " "
  if $h_sys_file; then
!     val="$define"
      echo "We'll be including <sys/file.h>."
  else
!     val="$undef"
      echo "We won't be including <sys/file.h>."
  fi
+ set i_sys_file
+ eval $setvar
  
  : see if ioctl defs are in sgtty/termio or sys/ioctl
  echo " "
  if $test -r $usrinclude/sys/ioctl.h ; then
!     val="$define"
      echo "sys/ioctl.h found."
  else
!     val="$undef"
      echo "sys/ioctl.h not found, assuming ioctl args are defined in sgtty.h."
  fi
+ set i_sysioctl
+ eval $setvar
  
  : see if we should include utime.h
  echo " "
  if $test -r $usrinclude/utime.h ; then
!     val="$define"
      echo "utime.h found."
  else
!     val="$undef"
      echo "No utime.h found, but that's ok."
  fi
+ set i_utime
+ eval $setvar
  
  : see if this is a varargs system
  echo " "
  if $test -r $usrinclude/varargs.h ; then
!     val="$define"
      echo "varargs.h found."
  else
!     val="$undef"
      echo "No varargs.h found, but that's ok (I hope)."
  fi
+ set i_varargs
+ eval $setvar
  
  : see if this is a vfork system
  echo " "
  if $test -r $usrinclude/vfork.h ; then
!     val="$define"
      echo "vfork.h found."
  else
!     val="$undef"
      echo "No vfork.h found."
  fi
+ set i_vfork
+ eval $setvar
  
  : end of configuration questions
  echo " "
***************
*** 3166,3172 ****
  # config.sh
  # This file was produced by running the Configure script.
  
- kit_has_binaries='$kit_has_binaries'
  d_eunice='$d_eunice'
  define='$define'
  eunicefix='$eunicefix'
--- 3468,3473 ----
***************
*** 3229,3234 ****
--- 3530,3536 ----
  Log='$Log'
  Header='$Header'
  Id='$Id'
+ lastuname='$lastuname'
  alignbytes='$alignbytes'
  bin='$bin'
  installbin='$installbin'
***************
*** 3317,3322 ****
--- 3619,3625 ----
  d_wait4='$d_wait4'
  d_waitpid='$d_waitpid'
  gidtype='$gidtype'
+ groupstype='$groupstype'
  i_fcntl='$i_fcntl'
  i_gdbm='$i_gdbm'
  i_grp='$i_grp'
***************
*** 3353,3358 ****
--- 3656,3662 ----
  mallocsrc='$mallocsrc'
  mallocobj='$mallocobj'
  usemymalloc='$usemymalloc'
+ mallocptrtype='$mallocptrtype'
  mansrc='$mansrc'
  manext='$manext'
  models='$models'
***************
*** 3424,3429 ****
--- 3728,3736 ----
      shift
  fi
  for file in $*; do
+     set X
+     shift
+     chmod +x $file
      case "$file" in
      */*)
  	dir=`$expr X$file : 'X\(.*\)/'`

*** End of patch 3 ***



More information about the Comp.sources.bugs mailing list