--- old/usr/src/Makefile.master	Mon Aug 31 16:17:20 2015
+++ new/usr/src/Makefile.master	Mon Aug 31 16:17:20 2015
@@ -24,6 +24,7 @@
 # Copyright (c) 2012 by Delphix. All rights reserved.
 # Copyright 2014 Garrett D'Amore <garrett@damore.org>
 # Copyright 2015, OmniTI Computer Consulting, Inc. All rights reserved.
+# Copyright 2015 Gary Mills
 #
 
 #
@@ -149,7 +150,7 @@
 MCS=		/usr/ccs/bin/mcs
 CAT=            /usr/bin/cat
 ELFDUMP=	/usr/ccs/bin/elfdump
-M4=		/usr/ccs/bin/m4
+M4=		/usr/bin/m4
 STRIP=		/usr/ccs/bin/strip
 LEX=		/usr/ccs/bin/lex
 FLEX=		/usr/bin/flex
--- /dev/null	Mon Aug 31 16:17:20 2015
+++ new/usr/src/cmd/mdb/sparc/v7/libfksmbsrv/Makefile	Mon Aug 31 16:17:20 2015
@@ -0,0 +1,56 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (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 2005 Sun Microsystems, Inc.  All rights reserved.
+# Use is subject to license terms.
+#
+# Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
+# Copyright 2015 Gary Mills
+#
+
+MODULE = libfksmbsrv.so
+MDBTGT = proc
+
+MODSRCS = smbsrv.c list.c
+
+include ../../../../Makefile.cmd
+include ../../Makefile.sparcv7
+include ../../../Makefile.module
+
+MODSRCS_DIR = ../../../common/modules/smbsrv
+GENUNIX_DIR = ../../../common/modules/genunix
+
+# Note: need our sys includes _before_ ENVCPPFLAGS, proto etc.
+CPPFLAGS.first += -I../../../../../lib/smbsrv/libfksmbsrv/common
+CPPFLAGS.first += -I../../../../../lib/libfakekernel/common
+
+CPPFLAGS += -I../../../../../uts/common
+
+C99MODE=	-xc99=%all
+C99LMODE=	-Xc99=%all
+
+dmod/%.o: $(GENUNIX_DIR)/%.c
+	$(COMPILE.c) -o $@ $<
+	$(CTFCONVERT_O)
+
+dmod/%.ln: $(GENUNIX_DIR)/%.c
+	$(LINT.c) -c $<
--- /dev/null	Mon Aug 31 16:17:20 2015
+++ new/usr/src/cmd/mdb/sparc/v9/libfksmbsrv/Makefile	Mon Aug 31 16:17:20 2015
@@ -0,0 +1,57 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License, Version 1.0 only
+# (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 2005 Sun Microsystems, Inc.  All rights reserved.
+# Use is subject to license terms.
+#
+# Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
+# Copyright 2015 Gary Mills
+#
+
+MODULE = libfksmbsrv.so
+MDBTGT = proc
+
+MODSRCS = smbsrv.c list.c
+
+include ../../../../Makefile.cmd
+include ../../../../Makefile.cmd.64
+include ../../Makefile.sparcv9
+include ../../../Makefile.module
+
+MODSRCS_DIR = ../../../common/modules/smbsrv
+GENUNIX_DIR = ../../../common/modules/genunix
+
+# Note: need our sys includes _before_ ENVCPPFLAGS, proto etc.
+CPPFLAGS.first += -I../../../../../lib/smbsrv/libfksmbsrv/common
+CPPFLAGS.first += -I../../../../../lib/libfakekernel/common
+
+CPPFLAGS += -I../../../../../uts/common
+
+C99MODE=	-xc99=%all
+C99LMODE=	-Xc99=%all
+
+dmod/%.o: $(GENUNIX_DIR)/%.c
+	$(COMPILE.c) -o $@ $<
+	$(CTFCONVERT_O)
+
+dmod/%.ln: $(GENUNIX_DIR)/%.c
+	$(LINT.c) -c $<
--- old/usr/src/cmd/sgs/lex/Makefile.com	Mon Aug 31 16:17:20 2015
+++ new/usr/src/cmd/sgs/lex/Makefile.com	Mon Aug 31 16:17:21 2015
@@ -19,6 +19,7 @@
 # CDDL HEADER END
 #
 #
+# Copyright 2015 Gary Mills
 # Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 #
@@ -76,10 +77,10 @@
 
 CPPFLAGS=	$(INCLIST) $(DEFLIST) $(CPPFLAGS.master)
 BUILD.AR=	$(AR) $(ARFLAGS) $@ `$(LORDER) $(OBJS) | $(TSORT)`
-LINTFLAGS=	-amux
+LINTFLAGS=	-nuaxm
+LINTFLAGS64=	-nuaxm -m64
 LINTPOUT=	lint.out
 
-$(LINTLIB):=	LINTFLAGS = -nvx
 $(ROOTPROG):=	FILEMODE = 0555
 
 ROOTFORMS=	$(FORMS:%=$(ROOTSHLIBCCS)/%)
--- old/usr/src/cmd/sgs/libelf/Makefile.com	Mon Aug 31 16:17:21 2015
+++ new/usr/src/cmd/sgs/libelf/Makefile.com	Mon Aug 31 16:17:21 2015
@@ -19,12 +19,12 @@
 # CDDL HEADER END
 #
 #
+# Copyright 2015 Gary Mills
 # Copyright (c) 1990, 2010, Oracle and/or its affiliates. All rights reserved.
 #
 
 LIBRARY=	libelf.a
 VERS=		.1
-M4=		m4
 
 MACHOBJS=
 COMOBJS=	ar.o		begin.o		cntl.o		cook.o \
@@ -50,6 +50,8 @@
 
 include $(SRC)/lib/Makefile.lib
 
+# Use the value of M4 set in Makefile.master via Makefile.lib
+
 DEMOFILES=	Makefile	00README	acom.c		dcom.c \
 		pcom.c		tpcom.c		dispsyms.c
 DEMOFILESRCDIR=	../demo
--- old/usr/src/cmd/sgs/yacc/Makefile.com	Mon Aug 31 16:17:21 2015
+++ new/usr/src/cmd/sgs/yacc/Makefile.com	Mon Aug 31 16:17:21 2015
@@ -19,6 +19,7 @@
 # CDDL HEADER END
 #
 #
+# Copyright 2015 Gary Mills
 # Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 #
@@ -59,7 +60,8 @@
 CPPFLAGS=	$(INCLIST) $(DEFLIST) $(CPPFLAGS.master)
 LDLIBS=		$(LDLIBS.cmd)
 BUILD.AR=	$(AR) $(ARFLAGS) $@ `$(LORDER) $(OBJS) | $(TSORT)`
-LINTFLAGS=	-amux
+LINTFLAGS=	-nuaxm
+LINTFLAGS64=	-nuaxm -m64
 LINTPOUT=	lint.out
 
 C99MODE= $(C99_ENABLE)
@@ -68,7 +70,6 @@
 CERRWARN += -_gcc=-Wno-parentheses
 CERRWARN += -_gcc=-Wno-uninitialized
 
-$(LINTLIB):=	LINTFLAGS = -nvx
 $(ROOTPROG):= FILEMODE = 0555
 
 ROOTYACCPAR=	$(YACCPAR:%=$(ROOTSHLIBCCS)/%)
--- old/usr/src/lib/Makefile	Mon Aug 31 16:17:21 2015
+++ new/usr/src/lib/Makefile	Mon Aug 31 16:17:21 2015
@@ -25,6 +25,7 @@
 # Copyright (c) 2012, Joyent, Inc. All rights reserved.
 # Copyright (c) 2013 Gary Mills
 # Copyright 2014 Garrett D'Amore <garrett@damore.org>
+# Copyright (c) 2015 Gary Mills
 
 include ../Makefile.master
 
@@ -561,7 +562,9 @@
 # Library interdependencies are called out explicitly here
 #
 auditd_plugins: libbsm libnsl libsecdb
+krb5:		gss_mechs/mech_krb5
 gss_mechs/mech_krb5:	libgss libnsl libsocket libresolv pkcs11
+gss_mechs/mech_spnego:	gss_mechs/mech_krb5
 libadt_jni:	libbsm
 libast: 	libsocket libm
 libadutils: 	libldap5 libresolv libsocket libnsl
@@ -569,8 +572,9 @@
 libbe: 		libzfs
 libbsm:		libtsol
 libcmd: 	libsum libast libsocket libnsl
-libcmdutils:	libavl
+libcmdutils:	libavl libnvpair
 libcontract:	libnvpair
+libcpc:		libdevinfo
 libdevid:	libdevinfo
 libdevinfo:	libnvpair libsec
 libdhcpagent:	libsocket libdhcputil libuuid libdlpi libcontract
@@ -577,13 +581,15 @@
 libdhcputil:	libnsl libgen libinetutil libdlpi
 libdladm:	libdevinfo libinetutil libsocket libscf librcm libnvpair \
 		libexacct libnsl libkstat libcurses
+libdevice:	libnvpair
 libdll: 	libast
 libdlpi:	libinetutil libdladm
 libds:		libsysevent
 libdscfg:	libnsctl libunistat libsocket libnsl
-libdtrace:	libproc libgen libctf
+libdtrace:	libproc libgen libctf libmapmalloc
 libdtrace_jni:	libuutil libdtrace
 libefi:		libuuid
+libfcoe:	libdladm
 libfstyp:	libnvpair
 libelfsign:	libcryptoutil libkmf
 libidmap:	libadutils libldap5 libavl libsldap libuutil
@@ -596,6 +602,8 @@
 libmvec:	libc libm
 libnsl:		libmd5
 libmapid:	libresolv
+libnisdb:	libnsl libldap5
+librcm:		libnvpair
 librdc:		libsocket libnsl libnsctl libunistat libdscfg
 libuuid:	libdlpi
 libinetutil:	libsocket
@@ -602,7 +610,7 @@
 libipsecutil:	libtecla libsocket
 libinstzones:	libzonecfg libcontract
 libpkg:		libwanboot libscf libadm
-libnwam:	libscf
+libnwam:	libscf libbsm libdladm
 libsecdb:	libnsl
 libsasl:	libgss libsocket pkcs11 libmd
 sasl_plugins:	pkcs11 libgss libsocket libsasl
@@ -609,11 +617,11 @@
 libsctp:	libsocket
 libshell:	libast libcmd libdll libsocket libsecdb libm
 libsip:		libmd5
-libsmbfs:	libcmdutils libsocket libnsl libkrb5
+libsmbfs:	libcmdutils libsocket libnsl libkrb5 libsec libidmap
 libsocket:	libnsl
 libstmfproxy: 	libstmf libsocket libnsl libpthread
 libsum: 	libast
-libsysevent:	libsecdb
+libsysevent:	libsecdb libnvpair
 libldap5:	libsasl libsocket libnsl libmd
 libsldap:	libldap5 libtsol libnsl libc libscf libresolv
 libpool:	libnvpair libexacct
@@ -628,14 +636,16 @@
 libwanboot:	libnvpair libresolv libnsl libsocket libdevinfo libinetutil \
 		libdhcputil
 libwanbootutil:	libnsl
-pam_modules:	libproject passwdutil smbsrv
-libscf:		libuutil libmd libgen libsmbios libnsl
+pam_modules:	libproject passwdutil smbsrv libtsnet
+libscf:		libuutil libmd libgen libsmbios libnsl libnvpair
 libinetsvc:	libscf
-librestart:	libuutil libscf
+librestart:	libuutil libscf libpool libproject libsecdb libnvpair
 libsaveargs:	libdisasm
 ../cmd/sgs/libdl:	../cmd/sgs/libconv
 ../cmd/sgs/libelf:	../cmd/sgs/libconv
-pkcs11:		libcryptoutil
+passwdutil:	libsldap
+pkcs11:		libcryptoutil libmd
+#		Adding libuuid or libdladm results in a circular dependancy
 print:		libldap5
 udapl/udapl_tavor:	udapl/libdat
 libzfs:		libdevid libgen libnvpair libuutil \
--- old/usr/src/lib/libcurses/screen/keyname.sh	Mon Aug 31 16:17:21 2015
+++ new/usr/src/lib/libcurses/screen/keyname.sh	Mon Aug 31 16:17:21 2015
@@ -20,6 +20,7 @@
 # CDDL HEADER END
 #
 # 
+# Copyright 2015 Gary Mills
 # Copyright 1997 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 # 
@@ -39,11 +40,9 @@
 # contributors.
 #
  
-#ident	"%Z%%M%	%I%	%E% SMI"
-
 rm -f keyname.c
-/usr/bin/echo "#include	\"curses_inc.h\"\n" > keyname.c
-/usr/bin/echo "static	char	*keystrings[] =\n\t\t{" >> keyname.c
+/usr/bin/print "#include	\"curses_inc.h\"\n" > keyname.c
+/usr/bin/print "static	char	*keystrings[] =\n\t\t{" >> keyname.c
 {
     grep -v 'KEY_F(' keycaps | awk '{ print $5, $4 }' | sed -e 's/,//g' -e 's/KEY_//'
     # These three aren't in keycaps
--- old/usr/src/lib/libcurses/screen/maketerm.ed	Mon Aug 31 16:17:21 2015
+++ new/usr/src/lib/libcurses/screen/maketerm.ed	Mon Aug 31 16:17:21 2015
@@ -308,22 +308,22 @@
 1;/^#define	auto_left_margin/,/^#define	xon_xoff/s/CURB.*/CUR _b/
 1;/^#define	auto_left_margin/,/^#define	xon_xoff/w ./tmp/tmp.term.h
 1;/^#define	auto_left_margin/,/^#define	xon_xoff/d
-!/usr/bin/echo '{printf "\%s\%d\\n", $0,++i}' > ./tmp/tmp.awk
+!/usr/bin/print '{printf "\%s\%d\\n", $0,++i}' > ./tmp/tmp.awk
 .-1r !awk -f ./tmp/tmp.awk < ./tmp/tmp.term.h
 1;/^#define	columns/,/^#define	width_status_line/s/CURN.*/CUR _c/
 1;/^#define	columns/,/^#define	width_status_line/w ./tmp/tmp.term.h
 1;/^#define	columns/,/^#define	width_status_line/d
-!/usr/bin/echo '{printf "\%s\%d\\n", $0,++i}' > ./tmp/tmp.awk
+!/usr/bin/print '{printf "\%s\%d\\n", $0,++i}' > ./tmp/tmp.awk
 .-1r !awk -f ./tmp/tmp.awk < ./tmp/tmp.term.h
 1;/^#define	back_tab/,/^#define	lab_f8/s/CURS.*/CUR _Vr2_Astrs._s/
 1;/^#define	back_tab/,/^#define	lab_f8/w ./tmp/tmp.term.h
 1;/^#define	back_tab/,/^#define	lab_f8/d
-!/usr/bin/echo '{printf "\%s\%d\\n", $0,++i}' > ./tmp/tmp.awk
+!/usr/bin/print '{printf "\%s\%d\\n", $0,++i}' > ./tmp/tmp.awk
 .-1r !awk -f ./tmp/tmp.awk < ./tmp/tmp.term.h
 1;/^#define	lab_f9/,/^#define	prtr_non/s/CURS.*/CUR _Vr2_Bstrs._s/
 1;/^#define	lab_f9/,/^#define	prtr_non/w ./tmp/tmp.term.h
 1;/^#define	lab_f9/,/^#define	prtr_non/d
-!/usr/bin/echo 'BEGIN{i=100}\n{printf "\%s\%d\\n", $0,++i}' > ./tmp/tmp.awk
+!/usr/bin/print 'BEGIN{i=100}\n{printf "\%s\%d\\n", $0,++i}' > ./tmp/tmp.awk
 .-1r !awk -f ./tmp/tmp.awk < ./tmp/tmp.term.h
 !rm -f ./tmp/tmp.term.h ./tmp/tmp.awk
 w ./tmp/term.h.new
--- old/usr/src/pkg/manifests/developer-dtrace.mf	Mon Aug 31 16:17:21 2015
+++ new/usr/src/pkg/manifests/developer-dtrace.mf	Mon Aug 31 16:17:21 2015
@@ -25,6 +25,7 @@
 
 #
 # Copyright (c) 2012 by Delphix. All rights reserved.
+# Copyright 2015 Gary Mills
 #
 
 set name=pkg.fmri value=pkg:/developer/dtrace@$(PKGVERS)
@@ -624,13 +625,17 @@
     group=other
 file path=usr/share/lib/java/javadoc/dtrace/api/overview-tree.html group=other
 file path=usr/share/lib/java/javadoc/dtrace/api/package-list group=other
-file path=usr/share/lib/java/javadoc/dtrace/api/resources/background.gif \
+$(i386_ONLY)file \
+    path=usr/share/lib/java/javadoc/dtrace/api/resources/background.gif \
     group=other
-file path=usr/share/lib/java/javadoc/dtrace/api/resources/tab.gif group=other
-file path=usr/share/lib/java/javadoc/dtrace/api/resources/titlebar.gif \
+$(i386_ONLY)file path=usr/share/lib/java/javadoc/dtrace/api/resources/tab.gif \
     group=other
-file path=usr/share/lib/java/javadoc/dtrace/api/resources/titlebar_end.gif \
+$(i386_ONLY)file \
+    path=usr/share/lib/java/javadoc/dtrace/api/resources/titlebar.gif \
     group=other
+$(i386_ONLY)file \
+    path=usr/share/lib/java/javadoc/dtrace/api/resources/titlebar_end.gif \
+    group=other
 file path=usr/share/lib/java/javadoc/dtrace/api/serialized-form.html \
     group=other
 file path=usr/share/lib/java/javadoc/dtrace/api/stylesheet.css group=other
--- old/usr/src/pkg/manifests/service-network-dns-mdns.mf	Mon Aug 31 16:17:22 2015
+++ new/usr/src/pkg/manifests/service-network-dns-mdns.mf	Mon Aug 31 16:17:22 2015
@@ -22,6 +22,7 @@
 #
 # Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
 # Copyright 2012 Nexenta Systems, Inc. All rights reserved.
+# Copyright 2015 Gary Mills
 #
 
 set name=pkg.fmri value=pkg:/service/network/dns/mdns@$(PKGVERS)
@@ -132,13 +133,17 @@
 file path=usr/share/lib/java/javadoc/dnssd/api/index.html group=other
 file path=usr/share/lib/java/javadoc/dnssd/api/overview-tree.html group=other
 file path=usr/share/lib/java/javadoc/dnssd/api/package-list group=other
-file path=usr/share/lib/java/javadoc/dnssd/api/resources/background.gif \
+$(i386_ONLY)file \
+    path=usr/share/lib/java/javadoc/dnssd/api/resources/background.gif \
     group=other
-file path=usr/share/lib/java/javadoc/dnssd/api/resources/tab.gif group=other
-file path=usr/share/lib/java/javadoc/dnssd/api/resources/titlebar.gif \
+$(i386_ONLY)file path=usr/share/lib/java/javadoc/dnssd/api/resources/tab.gif \
     group=other
-file path=usr/share/lib/java/javadoc/dnssd/api/resources/titlebar_end.gif \
+$(i386_ONLY)file \
+    path=usr/share/lib/java/javadoc/dnssd/api/resources/titlebar.gif \
     group=other
+$(i386_ONLY)file \
+    path=usr/share/lib/java/javadoc/dnssd/api/resources/titlebar_end.gif \
+    group=other
 file path=usr/share/lib/java/javadoc/dnssd/api/serialized-form.html \
     group=other
 file path=usr/share/lib/java/javadoc/dnssd/api/stylesheet.css group=other
