--- old/usr/src/cmd/cmd-crypto/digest/Makefile	Tue Feb  5 14:31:04 2008
+++ new/usr/src/cmd/cmd-crypto/digest/Makefile	Tue Feb  5 14:31:04 2008
@@ -19,39 +19,45 @@
 # CDDL HEADER END
 #
 #
-# Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
+# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 #
-# ident	"@(#)Makefile	1.5	07/02/02 SMI"
+# ident	"@(#)Makefile	1.6	08/02/04 SMI"
 #
 
-PROG = digest
+PROG= digest
+ROOTLINK= $(ROOTBIN)/mac
+DCFILE= $(PROG).dc
 
-OBJS = digest.o
+include ../../Makefile.cmd
 
-SRCS = $(OBJS:.o=.c)
+SUBDIRS= $(MACH)
+$(BUILD64)SUBDIRS += $(MACH64)
 
-include ../../Makefile.cmd 
+all	:=	TARGET = all
+install	:=	TARGET = install
+clean	:=	TARGET = clean
+clobber	:=	TARGET = clobber
+lint	:=	TARGET = lint
 
-CFLAGS += $(CCVERBOSE) -D_FILE_OFFSET_BITS=64
-
-LDLIBS += -lkmf -lpkcs11 -lcryptoutil
-
 .KEEP_STATE:
 
-all:    $(PROG)
+all clean clobber lint:    $(SUBDIRS)
 
-$(PROG): $(OBJS)
-	$(LINK.c) $(OBJS) -o $@ $(LDLIBS) $(DYNFLAGS)
-	$(POST_PROCESS)
+install:	$(SUBDIRS)
+	-$(RM) $(ROOTPROG) $(ROOTLINK)
+	-$(LN) $(ISAEXEC) $(ROOTPROG)
+	-$(LN) $(ISAEXEC) $(ROOTLINK)
 
-install: all $(ROOTPROG)
-	$(RM) $(ROOTBIN)/mac
-	$(LN) $(ROOTPROG) $(ROOTBIN)/mac
+$(SUBDIRS):	FRC
+	@cd $@; pwd; $(MAKE) $(TARGET)
 
-clean:
-	$(RM) -f $(OBJS) $(PROG)
+$(DCFILE):
+	$(RM) messages.po
+	$(XGETTEXT) $(XGETFLAGS) -t $(PROG).c
+	$(SED) -e '/^domain/d' messages.po > $@
+	$(RM) messages.po
 
-lint:   lint_SRCS
+FRC:
 
 include ../../Makefile.targ
--- /dev/null	Tue Feb  5 14:31:05 2008
+++ new/usr/src/cmd/cmd-crypto/digest/Makefile.com	Tue Feb  5 14:31:05 2008
@@ -0,0 +1,70 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
+# Use is subject to license terms.
+#
+# ident	"@(#)Makefile.com	1.1	08/02/04 SMI"
+#
+
+PROG = digest
+
+ROOTLINK32= $(ROOTBIN32)/mac
+ROOTLINK64= $(ROOTBIN64)/mac
+
+OBJS = digest.o
+
+SRCS = $(OBJS:%.o=../%.c)
+
+include ../../../Makefile.cmd
+
+CFLAGS += $(CCVERBOSE)
+CFLAGS64 += $(CCVERBOSE)
+CPPFLAGS +=-D_FILE_OFFSET_BITS=64
+
+LDLIBS += -lkmf -lpkcs11 -lcryptoutil
+
+.KEEP_STATE:
+
+all:	$(PROG)
+
+lint: lint_SRCS
+
+include ../../../Makefile.targ
+
+%.o:	../%.c
+	$(COMPILE.c) $<
+
+$(PROG): $(OBJS)
+	$(LINK.c) $(OBJS) -o $@ $(LDLIBS) $(DYNFLAGS)
+	$(POST_PROCESS)
+
+$(ROOTLINK32): $(ROOTPROG32)
+	$(RM) $@
+	$(LN) $(ROOTPROG32) $@
+
+$(ROOTLINK64): $(ROOTPROG64)
+	$(RM) $@
+	$(LN) $(ROOTPROG64) $@
+
+clean:
+	$(RM) $(PROG) $(OBJS)
+
--- /dev/null	Tue Feb  5 14:31:05 2008
+++ new/usr/src/cmd/cmd-crypto/digest/amd64/Makefile	Tue Feb  5 14:31:05 2008
@@ -0,0 +1,31 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
+# Use is subject to license terms.
+#
+# ident	"@(#)Makefile	1.1	08/02/04 SMI"
+#
+
+include ../Makefile.com
+include ../../../Makefile.cmd.64
+
+install: all $(ROOTPROG64) $(ROOTLINK64)
--- old/usr/src/cmd/cmd-crypto/digest/digest.c	Tue Feb  5 14:31:05 2008
+++ new/usr/src/cmd/cmd-crypto/digest/digest.c	Tue Feb  5 14:31:05 2008
@@ -19,11 +19,11 @@
  * CDDL HEADER END
  */
 /*
- * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
-#pragma ident	"@(#)digest.c	1.11	07/10/04 SMI"
+#pragma ident	"@(#)digest.c	1.12	08/02/04 SMI"
 
 /*
  * digest.c
@@ -371,7 +371,7 @@
 	CK_ULONG resultlen;
 	CK_BYTE_PTR	pkeydata = NULL;
 	CK_OBJECT_HANDLE key = (CK_OBJECT_HANDLE) 0;
-	int keylen = 0;		/* key length */
+	size_t keylen = 0;		/* key length */
 	char *resultstr = NULL;	/* result in hex string */
 	int resultstrlen;	/* result string length */
 	int i;
@@ -417,16 +417,16 @@
 				}
 
 				status = pkcs11_get_pass(token_label,
-				    (char **)&pkeydata, (size_t *)&keylen,
+				    (char **)&pkeydata, &keylen,
 				    0, B_FALSE);
 			} else if (keyfile != NULL) {
 				/* get the key file */
 				status = pkcs11_read_data(keyfile,
-				    (void **)&pkeydata, (size_t *)&keylen);
+				    (void **)&pkeydata, &keylen);
 			} else {
 				/* get the key from input */
 				status = pkcs11_get_pass(NULL,
-				    (char **)&pkeydata, (size_t *)&keylen,
+				    (char **)&pkeydata, &keylen,
 				    0, B_FALSE);
 			}
 
--- /dev/null	Tue Feb  5 14:31:05 2008
+++ new/usr/src/cmd/cmd-crypto/digest/i386/Makefile	Tue Feb  5 14:31:05 2008
@@ -0,0 +1,30 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
+# Use is subject to license terms.
+#
+# ident	"@(#)Makefile	1.1	08/02/04 SMI"
+#
+
+include ../Makefile.com
+
+install: all $(ROOTPROG32) $(ROOTLINK32)
--- /dev/null	Tue Feb  5 14:31:05 2008
+++ new/usr/src/cmd/cmd-crypto/digest/sparc/Makefile	Tue Feb  5 14:31:05 2008
@@ -0,0 +1,30 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
+# Use is subject to license terms.
+#
+# ident	"@(#)Makefile	1.1	08/02/04 SMI"
+#
+
+include ../Makefile.com
+
+install: all $(ROOTPROG32) $(ROOTLINK32)
--- /dev/null	Tue Feb  5 14:31:05 2008
+++ new/usr/src/cmd/cmd-crypto/digest/sparcv9/Makefile	Tue Feb  5 14:31:05 2008
@@ -0,0 +1,31 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
+# Use is subject to license terms.
+#
+# ident	"@(#)Makefile	1.1	08/02/04 SMI"
+#
+
+include ../Makefile.com
+include ../../../Makefile.cmd.64
+
+install: all $(ROOTPROG64) $(ROOTLINK64)
--- old/usr/src/pkgdefs/SUNWcsu/prototype_com	Tue Feb  5 14:31:05 2008
+++ new/usr/src/pkgdefs/SUNWcsu/prototype_com	Tue Feb  5 14:31:05 2008
@@ -19,10 +19,10 @@
 # CDDL HEADER END
 #
 #
-# Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
+# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 #
-# ident	"@(#)prototype_com	1.565	07/12/28 SMI"
+# ident	"@(#)prototype_com	1.566	08/02/04 SMI"
 #
 # This required package information file contains a list of package contents.
 # The 'pkgmk' command uses this file to identify the contents of a package
@@ -98,7 +98,7 @@
 f none usr/bin/devfree 555 root bin
 f none usr/bin/devreserv 555 root bin
 s none usr/bin/df=../sbin/df
-f none usr/bin/digest 555 root bin
+l none usr/bin/digest=../../usr/lib/isaexec
 f none usr/bin/dirname 555 root bin
 l none usr/bin/dispgid=../../usr/bin/ckgid
 l none usr/bin/dispuid=../../usr/bin/ckuid
@@ -177,7 +177,7 @@
 f none usr/bin/logins 750 root bin
 f none usr/bin/ls 555 root bin
 l none usr/bin/m68k=../../usr/bin/i286
-l none usr/bin/mac=../../usr/bin/digest
+l none usr/bin/mac=../../usr/lib/isaexec
 f none usr/bin/mach 555 root bin
 f none usr/bin/mail 2511 root mail
 f none usr/bin/mailx 2511 root mail
@@ -966,7 +966,7 @@
 f none usr/share/lib/terminfo/a/at386 644 root bin
 f none usr/share/lib/terminfo/a/at386-m 644 root bin
 d none usr/share/lib/terminfo/s 755 root bin
-f none usr/share/lib/terminfo/s/screen 644 root bin 
+f none usr/share/lib/terminfo/s/screen 644 root bin
 f none usr/share/lib/terminfo/s/screen-w 644 root bin
 f none usr/share/lib/terminfo/s/sun 644 root bin
 f none usr/share/lib/terminfo/s/sun-1 644 root bin
--- old/usr/src/pkgdefs/SUNWcsu/prototype_i386	Tue Feb  5 14:31:06 2008
+++ new/usr/src/pkgdefs/SUNWcsu/prototype_i386	Tue Feb  5 14:31:06 2008
@@ -19,10 +19,10 @@
 # CDDL HEADER END
 #
 #
-# Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
+# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 #
-# ident	"@(#)prototype_i386	1.91	07/09/18 SMI"
+# ident	"@(#)prototype_i386	1.92	08/02/04 SMI"
 #
 # This required package information file contains a list of package contents.
 # The 'pkgmk' command uses this file to identify the contents of a package
@@ -50,9 +50,11 @@
 f none usr/bin/i86/amt 555 root bin
 f none usr/bin/diskscan 555 root bin
 d none usr/bin/i86 755 root bin
+f none usr/bin/i86/digest 555 root bin
 f none usr/bin/i86/ksh93 555 root bin
 f none usr/bin/i86/newtask 4555 root sys
 f none usr/bin/i86/nohup 555 root bin
+l none usr/bin/i86/mac=digest
 f none usr/bin/i86/prctl 555 root bin
 f none usr/bin/i86/prstat 555 root bin
 f none usr/bin/i86/ps 555 root bin
@@ -105,8 +107,10 @@
 d none usr/bin/amd64 755 root bin
 f none usr/bin/amd64/amt 555 root bin
 f none usr/bin/amd64/crle 555 root bin
+f none usr/bin/amd64/digest 555 root bin
 f none usr/bin/amd64/ksh93 555 root bin
 f none usr/bin/amd64/ls 555 root bin
+l none usr/bin/amd64/mac=digest
 f none usr/bin/amd64/moe 555 root bin
 f none usr/bin/amd64/newtask 4555 root sys
 f none usr/bin/amd64/nohup 555 root bin
--- old/usr/src/pkgdefs/SUNWcsu/prototype_sparc	Tue Feb  5 14:31:06 2008
+++ new/usr/src/pkgdefs/SUNWcsu/prototype_sparc	Tue Feb  5 14:31:06 2008
@@ -19,10 +19,10 @@
 # CDDL HEADER END
 #
 #
-# Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
+# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 #
-# ident	"@(#)prototype_sparc	1.132	07/11/29 SMI"
+# ident	"@(#)prototype_sparc	1.133	08/02/04 SMI"
 #
 # This required package information file contains a list of package contents.
 # The 'pkgmk' command uses this file to identify the contents of a package
@@ -50,11 +50,15 @@
 f none usr/bin/sparcv7/ksh93 555 root bin
 l none usr/bin/sparcv7/rksh93=ksh93
 f none usr/bin/sparcv7/savecore 555 root bin
+f none usr/bin/sparcv7/digest 555 root bin
+l none usr/bin/sparcv7/mac=digest
 d none usr/bin/sparcv9 755 root bin
 f none usr/bin/sparcv9/amt 555 root bin
 f none usr/bin/sparcv9/crle 555 root bin
+f none usr/bin/sparcv9/digest 555 root bin
 f none usr/bin/sparcv9/ksh93 555 root bin
 f none usr/bin/sparcv9/ls 555 root bin
+l none usr/bin/sparcv9/mac=digest
 f none usr/bin/sparcv9/moe 555 root bin
 f none usr/bin/sparcv9/newtask 4555 root sys
 f none usr/bin/sparcv9/nohup 555 root bin
