System: dist version 1.0
Patch #: 4
Priority: MEDIUM
Subject: new units d_crypt and d_symlink; libc=ans fix

Description:
	Here are two new units for determining whether the crypt()
	and symlink() functions exist.

	Also, the libc unit had libc=ans when it should've had libc=$ans.

	The Cppsym unit had an awk non-portability.

Fix:	From rn, say "| patch -p0 -d DIR", where DIR is your dist source
			      ^^^
	directory.  Outside of rn, say "cd DIR; patch -p0 <thisarticle".
	If you don't have the patch program, apply the following by hand,
	or get patch.

	If patch indicates that patchlevel is the wrong version, you may need
	to apply one or more previous patches, or the patch may already
	have been applied.  See the patchlevel.h file to find out what has or
	has not been applied.  In any event, don't continue with the patch.

	If you are missing previous patches they can be obtained from me:

	Larry Wall
	lwall@jpl-devvax.jpl.nasa.gov

	If you send a mail message of the following form it will greatly speed
	processing:

	Subject: Command
	@SH mailpatch PATH dist 1.0 LIST
		   ^ note the c

	where PATH is a return path FROM ME TO YOU in Internet notation, and
	LIST is the number of one or more patches you need, separated by spaces,
	commas, and/or hyphens.  Saying 35- says everything from 35 to the end.

	You can also get the patches via anonymous FTP from
	jpl-devvax.jpl.nasa.gov (128.149.8.43).

Index: patchlevel.h
Prereq: 3
1c1
< #define PATCHLEVEL 3
---
> #define PATCHLEVEL 4
 
Index: Configure
Prereq: 1.0.1.1
*** Configure.old	Tue Feb  2 10:28:43 1988
--- Configure	Tue Feb  2 10:28:44 1988
***************
*** 8,14 ****
  # 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.)
  #
! # $Header: Configure,v 1.0.1.1 88/01/28 17:02:37 lwall Exp $
  #
  # Yes, you may rip this off to use in other distribution packages.
  # (Note: this Configure script was generated automatically.  Rather than
--- 8,14 ----
  # 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.)
  #
! # $Header: Configure,v 1.0.1.2 88/02/02 10:20:48 lwall Exp $
  #
  # Yes, you may rip this off to use in other distribution packages.
  # (Note: this Configure script was generated automatically.  Rather than
***************
*** 374,380 ****
      ans=`loc libc.a blurfl/dyick $libpth`
      if test -f $ans; then
  	echo "Your C library is in $ans, of all places."
! 	libc=ans
      else
  	if test -f "$libc"; then
  	    echo "Your C library is in $libc, like you said before."
--- 374,380 ----
      ans=`loc libc.a blurfl/dyick $libpth`
      if test -f $ans; then
  	echo "Your C library is in $ans, of all places."
! 	libc=$ans
      else
  	if test -f "$libc"; then
  	    echo "Your C library is in $libc, like you said before."
 
Index: mcon/U/Cppsym.U
Prereq: 1.0.1.1
*** mcon/U/Cppsym.U.old	Tue Feb  2 10:28:54 1988
--- mcon/U/Cppsym.U	Tue Feb  2 10:28:55 1988
***************
*** 1,4 ****
! ?RCS:$Header: Cppsym.U,v 1.0.1.1 88/01/21 22:52:17 lwall Exp $
  ?X: 
  ?X: This unit produces a shell script called Cppsym, which can be used to
  ?X: determine whether any in a list of symbols is defined by the C preprocessor.
--- 1,4 ----
! ?RCS:$Header: Cppsym.U,v 1.0.1.2 88/02/02 10:21:40 lwall Exp $
  ?X: 
  ?X: This unit produces a shell script called Cppsym, which can be used to
  ?X: determine whether any in a list of symbols is defined by the C preprocessor.
***************
*** 7,12 ****
--- 7,15 ----
  ?X: it in Myinit.U.
  ?X: 
  ?RCS:$Log:	Cppsym.U,v $
+ ?RCS: Revision 1.0.1.2  88/02/02  10:21:40  lwall
+ ?RCS: patch4: some awks squawk at $6 != "" when field 6 doesn't exist.
+ ?RCS: 
  ?RCS: Revision 1.0.1.1  88/01/21  22:52:17  lwall
  ?RCS: Now cpp takes from stdin to avoid problems on Suns.
  ?RCS: 
***************
*** 55,61 ****
  echo exit 1 >>/tmp/Cppsym\$\$
  $cpp $cppminus </tmp/Cppsym\$\$ >/tmp/Cppsym2\$\$
  case "\$list" in
! true) awk '\$6 != "" {print substr(\$6,2,100)}' </tmp/Cppsym2\$\$ ;;
  *)
      sh /tmp/Cppsym2\$\$
      status=\$?
--- 58,64 ----
  echo exit 1 >>/tmp/Cppsym\$\$
  $cpp $cppminus </tmp/Cppsym\$\$ >/tmp/Cppsym2\$\$
  case "\$list" in
! true) awk 'NF > 5 {print substr(\$6,2,100)}' </tmp/Cppsym2\$\$ ;;
  *)
      sh /tmp/Cppsym2\$\$
      status=\$?
 
Index: mcon/U/d_crypt.U
*** mcon/U/d_crypt.U.old	Tue Feb  2 10:29:01 1988
--- mcon/U/d_crypt.U	Tue Feb  2 10:29:03 1988
***************
*** 0 ****
--- 1,28 ----
+ ?RCS:$Header: d_crypt.U,v 1.0.1.1 88/02/02 10:26:50 lwall Exp $
+ ?RCS:$Log:	d_crypt.U,v $
+ ?RCS: Revision 1.0.1.1  88/02/02  10:26:50  lwall
+ ?RCS: patch4: created.
+ ?RCS: 
+ ?MAKE:d_crypt: contains Guess
+ ?MAKE:	-pick add $@ %*
+ ?S:d_crypt:
+ ?S:	This variable conditionally defines the CRYPT symbol, which
+ ?S:	indicates to the C program that the crypt() routine is available
+ ?S:	to encrypt passwords and the like.
+ ?S:.
+ ?C:CRYPT:
+ ?C:	This symbol, if defined, indicates that the crypt routine is available
+ ?C:	to encrypt passwords and the like.
+ ?C:.
+ ?H:?%1:#$d_crypt	CRYPT		/**/
+ ?H:?%1:
+ : see if crypt exists
+ echo " "
+ if $contains crypt libc.list >/dev/null 2>&1; then
+     echo 'crypt() found.'
+     d_crypt="$define"
+ else
+     echo 'crypt() not found.'
+     d_crypt="$undef"
+ fi
+ 
 
Index: mcon/U/d_symlink.U
*** mcon/U/d_symlink.U.old	Tue Feb  2 10:29:09 1988
--- mcon/U/d_symlink.U	Tue Feb  2 10:29:10 1988
***************
*** 0 ****
--- 1,28 ----
+ ?RCS:$Header: d_symlink.U,v 1.0.1.1 88/02/02 10:27:59 lwall Exp $
+ ?RCS:$Log:	d_symlink.U,v $
+ ?RCS: Revision 1.0.1.1  88/02/02  10:27:59  lwall
+ ?RCS: patch4: created.
+ ?RCS: 
+ ?MAKE:d_symlink: contains Guess
+ ?MAKE:	-pick add $@ %*
+ ?S:d_symlink:
+ ?S:	This variable conditionally defines the SYMLINK symbol, which
+ ?S:	indicates to the C program that the symlink() routine is available
+ ?S:	to create symbolic links.
+ ?S:.
+ ?C:SYMLINK:
+ ?C:	This symbol, if defined, indicates that the symlink routine is available
+ ?C:	to create symbolic links.
+ ?C:.
+ ?H:?%1:#$d_symlink	SYMLINK		/**/
+ ?H:?%1:
+ : see if symlink exists
+ echo " "
+ if $contains symlink libc.list >/dev/null 2>&1; then
+     echo 'symlink() found.'
+     d_symlink="$define"
+ else
+     echo 'symlink() not found.'
+     d_symlink="$undef"
+ fi
+ 
 
Index: mcon/U/libc.U
Prereq: 1.0
*** mcon/U/libc.U.old	Tue Feb  2 10:29:16 1988
--- mcon/U/libc.U	Tue Feb  2 10:29:17 1988
***************
*** 1,5 ****
! ?RCS:$Header: libc.U,v 1.0 87/05/22 12:34:12 lwall Exp $
  ?RCS:$Log:	libc.U,v $
  ?RCS: Revision 1.0  87/05/22  12:34:12  lwall
  ?RCS: Initial revision
  ?RCS: 
--- 1,8 ----
! ?RCS:$Header: libc.U,v 1.0.1.1 88/02/02 10:28:14 lwall Exp $
  ?RCS:$Log:	libc.U,v $
+ ?RCS: Revision 1.0.1.1  88/02/02  10:28:14  lwall
+ ?RCS: patch4: fixed libc=ans bug.
+ ?RCS: 
  ?RCS: Revision 1.0  87/05/22  12:34:12  lwall
  ?RCS: Initial revision
  ?RCS: 
***************
*** 17,23 ****
      ans=`loc libc.a blurfl/dyick $libpth`
      if test -f $ans; then
  	echo "Your C library is in $ans, of all places."
! 	libc=ans
      else
  	if test -f "$libc"; then
  	    echo "Your C library is in $libc, like you said before."
--- 20,26 ----
      ans=`loc libc.a blurfl/dyick $libpth`
      if test -f $ans; then
  	echo "Your C library is in $ans, of all places."
! 	libc=$ans
      else
  	if test -f "$libc"; then
  	    echo "Your C library is in $libc, like you said before."
