--- old/usr/src/common/mapfiles/gen/Makefile	2018-02-17 20:00:50.770841081 +0000
+++ new/usr/src/common/mapfiles/gen/Makefile	2018-02-17 20:00:50.801067420 +0000
@@ -31,7 +31,7 @@
 $(__GNUC)FILES=	$(MACH)_gcc_map.noexeglobs
 $(__SUNC)FILES= $(MACH)_cc_map.noexeglobs
 
-$(__GNU)$(BUILD64)FILES += $(MACH64)_gcc_map.noexeglobs
+$(__GNUC)$(BUILD64)FILES += $(MACH64)_gcc_map.noexeglobs
 $(__SUNC)$(BUILD64)FILES += $(MACH64)_cc_map.noexeglobs 
 
 SYMS1=		syms.1
--- old/usr/src/lib/smbsrv/Makefile.targ	2018-02-17 20:00:51.616920963 +0000
+++ new/usr/src/lib/smbsrv/Makefile.targ	2018-02-17 20:00:51.654198851 +0000
@@ -22,7 +22,6 @@
 # Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 #
-#ident	"%Z%%M%	%I%	%E% SMI"
 
 #
 # Common targets for smbsrv Makefiles
--- old/usr/src/tools/cw/cw.1onbld	2018-02-17 20:00:52.603753288 +0000
+++ new/usr/src/tools/cw/cw.1onbld	2018-02-17 20:00:52.633354537 +0000
@@ -144,9 +144,9 @@
 This is because the objects built with that compiler which would be linked
 have been previously discarded.
 .It
-If an option of the form
+If the
 .Fl o Ar filename
-was provided, it will be replaced by two options of the form
+option was provided, with or without a separating space, it will be replaced with
 .Fl o Ar tempfile
 .It
 If the option
--- old/usr/src/tools/cw/cw.c	2018-02-17 20:00:53.998701079 +0000
+++ new/usr/src/tools/cw/cw.c	2018-02-17 20:00:54.029177463 +0000
@@ -335,12 +335,10 @@
 	SUN
 } compiler_style_t;
 
-#define COMPILER_STYLE(comp) (comp->style == SUN ? "cc" : "gcc")
-
 typedef struct {
-	char *name;
-	char *path;
-	compiler_style_t style;
+	char *c_name;
+	char *c_path;
+	compiler_style_t c_style;
 } cw_compiler_t;
 
 typedef struct cw_ictx {
@@ -454,7 +452,7 @@
 static void
 nomem(void)
 {
-	(void) errx(1, "out of memory");
+	errx(1, "out of memory");
 }
 
 static void
@@ -489,7 +487,7 @@
 static void
 error(const char *arg)
 {
-	 errx(2, "error: mapping failed at or near arg '%s'\n", arg);
+	errx(2, "error: mapping failed at or near arg '%s'\n", arg);
 }
 
 /*
@@ -523,7 +521,7 @@
 
 /* ARGSUSED */
 static void
-Xamode(struct aelist *h __attribute__((__unused__)))
+Xamode(struct aelist __unused *h)
 {
 }
 
@@ -658,7 +656,7 @@
 	 */
 	newae(ctx->i_ae, "-D__sun");
 
-	if (asprintf(&nameflag, "-_%s=", ctx->i_compiler->name) == -1)
+	if (asprintf(&nameflag, "-_%s=", ctx->i_compiler->c_name) == -1)
 		nomem();
 
 	/*
@@ -1407,7 +1405,7 @@
 
 	if (c_files > 1 && (ctx->i_flags & CW_F_SHADOW) &&
 	    op != CW_O_PREPROCESS) {
-		(void) errx(2, "multiple source files are "
+		errx(2, "multiple source files are "
 		    "allowed only with -E or -P");
 	}
 
@@ -1417,7 +1415,7 @@
 	 * used.
 	 */
 	if ((mflag & (SS11|SS12)) == (SS11|SS12)) {
-		(void) errx(2,
+		errx(2,
 		    "Conflicting \"-xarch=\" flags (both Studio 11 and 12)\n");
 	}
 
@@ -1498,7 +1496,7 @@
 		return;
 	}
 
-	if (asprintf(&nameflag, "-_%s=", ctx->i_compiler->name) == -1)
+	if (asprintf(&nameflag, "-_%s=", ctx->i_compiler->c_name) == -1)
 		nomem();
 
 	while (--ctx->i_oldargc > 0) {
@@ -1574,18 +1572,18 @@
 static void
 prepctx(cw_ictx_t *ctx)
 {
-	newae(ctx->i_ae, ctx->i_compiler->path);
+	newae(ctx->i_ae, ctx->i_compiler->c_path);
 
 	if (ctx->i_flags & CW_F_PROG) {
 		(void) printf("%s: %s\n", (ctx->i_flags & CW_F_SHADOW) ?
-		    "shadow" : "primary", ctx->i_compiler->path);
+		    "shadow" : "primary", ctx->i_compiler->c_path);
 		(void) fflush(stdout);
 	}
 
 	if (!(ctx->i_flags & CW_F_XLATE))
 		return;
 
-	switch (ctx->i_compiler->style) {
+	switch (ctx->i_compiler->c_style) {
 	case SUN:
 		do_cc(ctx);
 		break;
@@ -1758,25 +1756,25 @@
 	char *tspec, *token;
 
 	if ((tspec = strdup(spec)) == NULL)
-		err(1, "out of memory");
+		nomem();
 
 	if ((token = strsep(&tspec, ",")) == NULL)
 		errx(1, "Compiler is missing a name: %s", spec);
-	compiler->name = token;
+	compiler->c_name = token;
 
 	if ((token = strsep(&tspec, ",")) == NULL)
 		errx(1, "Compiler is missing a path: %s", spec);
-	compiler->path = token;
+	compiler->c_path = token;
 
 	if ((token = strsep(&tspec, ",")) == NULL)
 		errx(1, "Compiler is missing a style: %s", spec);
 
 	if ((strcasecmp(token, "gnu") == 0) ||
 	    (strcasecmp(token, "gcc") == 0))
-		compiler->style = GNU;
+		compiler->c_style = GNU;
 	else if ((strcasecmp(token, "sun") == 0) ||
 	    (strcasecmp(token, "cc") == 0))
-		compiler->style = SUN;
+		compiler->c_style = SUN;
 	else
 		errx(1, "unknown compiler style: %s", token);
 
@@ -1801,17 +1799,22 @@
 	boolean_t cflg = B_FALSE;
 	boolean_t nflg = B_FALSE;
 
-	cw_ictx_t *main_ctx = newictx();
+	cw_ictx_t *main_ctx;
 
 	static struct option longopts[] = {
 		{ "compiler", no_argument, NULL, 'c' },
-		{ "noecho", no_argument, NULL ,'n' },
+		{ "noecho", no_argument, NULL, 'n' },
 		{ "primary", required_argument, NULL, 'p' },
 		{ "shadow", required_argument, NULL, 's' },
 		{ "versions", no_argument, NULL, 'v' },
 		{ NULL, 0, NULL, 0 },
 	};
 
+
+	if ((main_ctx = newictx()) == NULL)
+		nomem();
+
+
 	while ((ch = getopt_long(argc, argv, "C", longopts, NULL)) != -1) {
 		switch (ch) {
 		case 'c':
@@ -1824,31 +1827,35 @@
 			nflg = B_TRUE;
 			break;
 		case 'p':
-			if (primary.path != NULL) {
-				warnx("Only one primary compiler may be specified");
+			if (primary.c_path != NULL) {
+				warnx("Only one primary compiler may "
+				    "be specified");
 				usage();
 			}
 
 			if (parse_compiler(optarg, &primary) != 0)
-				errx(1, "Couldn't parse %s as a compiler spec", optarg);
+				errx(1, "Couldn't parse %s as a compiler spec",
+				    optarg);
 			break;
 		case 's':
 			if (nshadows >= 10)
-				errx(1, "May only use 10 shadows at the moment");
+				errx(1, "May only use 10 shadows at "
+				    "the moment");
 			if (parse_compiler(optarg, &shadows[nshadows]) != 0)
-				errx(1, "Couldn't parse %s as a compiler spec", optarg);
+				errx(1, "Couldn't parse %s as a compiler spec",
+				    optarg);
 			nshadows++;
 			break;
 		case 'v':
 			vflg = B_TRUE;
 			break;
 		default:
-			fprintf(stderr, "Did you forget '--'?\n");
+			(void) fprintf(stderr, "Did you forget '--'?\n");
 			usage();
 		}
 	}
 
-	if (primary.path == NULL) {
+	if (primary.c_path == NULL) {
 		warnx("A primary compiler must be specified");
 		usage();
 	}
@@ -1860,9 +1867,6 @@
 	argc -= (optind - 1);
 	argv += (optind - 1);
 
-	if (main_ctx == NULL)
-		nomem();
-
 	main_ctx->i_oldargc = argc;
 	main_ctx->i_oldargv = argv;
 	main_ctx->i_flags = CW_F_XLATE;
@@ -1875,7 +1879,7 @@
 	main_ctx->i_compiler = &primary;
 
 	if (cflg) {
-		fputs(primary.path, stdout);
+		(void) fputs(primary.c_path, stdout);
 	}
 
 	if (vflg) {
@@ -1889,9 +1893,9 @@
 	ret |= exec_ctx(main_ctx, do_serial);
 
 	for (int i = 0; i < nshadows; i++) {
-		cw_ictx_t *shadow_ctx = newictx();
+		cw_ictx_t *shadow_ctx;
 
-		if (shadow_ctx == NULL)
+		if ((shadow_ctx = newictx()) == NULL)
 			nomem();
 
 		memcpy(shadow_ctx, main_ctx, sizeof (cw_ictx_t));
