--- old/usr/src/cmd/make/Makefile.com	2015-05-20 11:30:07.697456552 -0400
+++ new/usr/src/cmd/make/Makefile.com	2015-05-20 11:30:07.709094191 -0400
@@ -12,7 +12,7 @@
 # Copyright 2015, Richard Lowe.
 
 MAKE_INCLUDE= $(SRC)/cmd/make/include
-MAKE_DEFS= -DSYSV -DINTER -DSUNOS4_AND_AFTER
+MAKE_DEFS= -DSYSV -DINTER
 $(RELEASE_BUILD)MAKE_DEFS += -DNDEBUG
 CFLAGS += $(CCVERBOSE)
 CPPFLAGS += -I$(MAKE_INCLUDE) $(MAKE_DEFS)
--- old/usr/src/cmd/make/bin/depvar.cc	2015-05-20 11:30:08.091662743 -0400
+++ new/usr/src/cmd/make/bin/depvar.cc	2015-05-20 11:30:08.103307353 -0400
@@ -58,11 +58,7 @@
 {
 	Depvar		dv;
 
-#ifdef SUNOS4_AND_AFTER
 	dv = ALLOC(Depvar);
-#else
-	dv = (Depvar) Malloc(sizeof(struct _Depvar));
-#endif
 	dv->name = name;
 	dv->next = NULL;
 	dv->cmdline = cmdline;
@@ -87,11 +83,7 @@
 	for (dv = depvar_list; dv != NULL; dv = dv->next) {
 		if (name == dv->name) {
 #ifdef NSE
-#ifdef SUNOS4_AND_AFTER
 			if (dv->cmdline) {
-#else
-			if (is_true(dv->cmdline)) {
-#endif
 				nse_dep_cmdmacro(dv->name->string);
 			}
 #endif
@@ -114,11 +106,7 @@
 
 	for (dv = depvar_list; dv != NULL; dv = dv->next) {
 		if (name == dv->name) {
-#ifdef SUNOS4_AND_AFTER
 			if (dv->cmdline) {
-#else
-			if (is_true(dv->cmdline)) {
-#endif
 				nse_rule_cmdmacro(dv->name->string);
 			}
 			break;
--- old/usr/src/cmd/make/bin/nse.cc	2015-05-20 11:30:08.491195571 -0400
+++ new/usr/src/cmd/make/bin/nse.cc	2015-05-20 11:30:08.502772193 -0400
@@ -94,11 +94,7 @@
 	wchar_t		*our_template;
 	int		len;
 	Boolean		cd;
-#ifdef SUNOS4_AND_AFTER
 	String_rec	string;
-#else
-	String		string;
-#endif
 	Name		name;
 	Name		target;
 	struct	Line	*line;
@@ -110,11 +106,7 @@
 #ifdef LTEST
 	printf("In nse_check_cd, nse = %d, nse_did_recursion = %d\n", nse, nse_did_recursion);
 #endif
-#ifdef SUNOS4_AND_AFTER
 	if (!nse_did_recursion || !nse) {
-#else
-	if (is_false(nse_did_recursion) || is_false(flag.nse)) {
-#endif
 #ifdef LTEST
 		printf ("returning,  nse = %d,  nse_did_recursion = %d\n", nse, nse_did_recursion);
 #endif
@@ -132,23 +124,14 @@
 #ifdef LTEST
 		printf("in gettoken loop\n");
 #endif
-#ifdef SUNOS4_AND_AFTER
 		if (IS_WEQUAL(tok, (wchar_t *) "cd")) {
-#else
-		if (is_equal(tok, "cd")) {
-#endif
 			cd = true;
 		} else if (cd && tok[0] == '$') {
 			nse_backquote_seen = NULL;
 			nse_shell_var_used = NULL;
 			nse_watch_vars = true;
-#ifdef SUNOS4_AND_AFTER
 			INIT_STRING_FROM_STACK(string, strbuf);
 			name = GETNAME(tok, FIND_LENGTH);
-#else
-			init_string_from_stack(string, strbuf);
-			name = getname(tok, FIND_LENGTH);
-#endif
 			expand_value(name, &string, false);
 			nse_watch_vars = false;
 
@@ -190,15 +173,9 @@
 		recurse = get_prop(target->prop, recursive_prop);
 		while (recurse != NULL) {
 			r = &recurse->body.recursive;
-#ifdef SUNOS4_AND_AFTER
 			if (IS_WEQUAL(r->directory->string, (wchar_t *) ".") &&
 			    !IS_WEQUAL(r->makefiles->name->string, 
                             primary_makefile->string)) {
-#else
-			if (is_equal(r->directory->string, ".") &&
-			    !is_equal(r->makefiles->name->string, 
-			    primary_makefile->string)) {
-#endif
 				nse_warning();
 				fprintf(stderr, "\tRecursion to makefile `%s' in the same directory\n\tCommand line: %s\n",
 				    r->makefiles->name->string_mb,
@@ -217,11 +194,7 @@
 static void
 nse_warning(void)
 {
-#ifdef SUNOS4_AND_AFTER
 	if (report_dependencies_level > 0) {
-#else
-	if (is_true(flag.report_dependencies)) {
-#endif
 		our_exit_status = 1;
 	}
 	if (primary_makefile != NULL) {
@@ -275,18 +248,10 @@
 	wchar_t		*slash;
 	wchar_t		*p;
 
-#ifdef SUNOS4_AND_AFTER
 	if (!nse) {
-#else
-	if (is_false(flag.nse)) {
-#endif
 		return;
 	}
-#ifdef SUNOS4_AND_AFTER
 	slash = wsrchr(dep, (int) slash_char); 
-#else
-	slash = rindex(dep, '/');
-#endif
 	if (slash == NULL) {
 		return;
 	}
@@ -303,12 +268,8 @@
 		}
 	}
 	p++;
-#ifdef SUNOS4_AND_AFTER
 	MBSTOWCS(wcs_buffer, "SCCS/");
 	if (IS_WEQUALN(p, wcs_buffer, wslen(wcs_buffer))) {
-#else
-	if (is_equaln(p, "SCCS/", 5)) {
-#endif
 		nse_warning();
 		WCSTOMBS(mbs_buffer, targ);
 		WCSTOMBS(mbs_buffer2, dep);
@@ -326,11 +287,7 @@
 void
 nse_check_file_backquotes(wchar_t *file)
 {
-#ifdef SUNOS4_AND_AFTER
 	if (!nse) {
-#else
-	if (is_false(flag.nse)) {
-#endif
 		return;
 	}
 	if (nse_backquotes(file)) {
@@ -349,15 +306,9 @@
 {
 	wchar_t		*bq;
 
-#ifdef SUNOS4_AND_AFTER
 	bq = wschr(str, (int) backquote_char);
 	if (bq) {
 		bq = wschr(&bq[1], (int) backquote_char);
-#else
-	bq = index(str, '`');
-	if (bq) {
-		bq = index(&bq[1], '`');
-#endif
 		if (bq) {
 			return true;
 		}
@@ -373,11 +324,7 @@
 void
 nse_dep_cmdmacro(wchar_t *macro)
 {
-#ifdef SUNOS4_AND_AFTER
 	if (!nse) {
-#else
-	if (is_false(flag.nse)) {
-#endif
 		return;
 	}
 	nse_warning();
@@ -395,11 +342,7 @@
 void
 nse_rule_cmdmacro(wchar_t *macro)
 {
-#ifdef SUNOS4_AND_AFTER
 	if (!nse) {
-#else
-	if (is_false(flag.nse)) {
-#endif
 		return;
 	}
 	nse_warning();
@@ -416,11 +359,7 @@
 void
 nse_wildcard(wchar_t *targ, wchar_t *dep)
 {
-#ifdef SUNOS4_AND_AFTER
 	if (!nse) {
-#else
-	if (is_false(flag.nse)) {
-#endif
 		return;
 	}
 	nse_warning();
@@ -448,13 +387,8 @@
 	}
 	bpatch = &sufx_hdr;
 	while (fscanf(fp, "%s %*s", suffix) == 1) {
-#ifdef SUNOS4_AND_AFTER
 		sufx = ALLOC(Nse_suffix);  
 		sufx->suffix = wscpy(ALLOC_WC(wslen(suffix) + 1), suffix);
-#else
-		sufx = alloc(Nse_suffix);
-		sufx->suffix = strcpy(malloc(strlen(suffix) + 1), suffix);
-#endif
 		sufx->next = NULL;
 		*bpatch = sufx;
 		bpatch = &sufx->next;
@@ -478,35 +412,19 @@
 	wchar_t		*suffix;
 	wchar_t		*depsufx;
 
-#ifdef SUNOS4_AND_AFTER
 	if (!nse) {
-#else
-	if (is_false(flag.nse)) {
-#endif
 		return;
 	}
-#ifdef SUNOS4_AND_AFTER
 	if (target->stat.is_derived_src) {
-#else
-	if (is_true(target->stat.is_derived_src)) {
-#endif
 		return;
 	}
 	if (command_template != NULL) {
 		return;
 	}
-#ifdef SUNOS4_AND_AFTER
 	suffix = wsrchr(target->string, (int) period_char ); 
-#else
-	suffix = rindex(target->string, '.');
-#endif
 	if (suffix != NULL) {
 		for (sufx = sufx_hdr; sufx != NULL; sufx = sufx->next) {
-#ifdef SUNOS4_AND_AFTER
 			if (IS_WEQUAL(sufx->suffix, suffix)) {
-#else
-			if (is_equal(sufx->suffix, suffix)) {
-#endif
 				nse_warning();
 				WCSTOMBS(mbs_buffer, dep);
 				fprintf(stderr, "\tProbable source file `%s' appears as a derived file\n\tas it depends upon file `%s', but there is\n\tno rule to build it\n",
@@ -528,42 +446,22 @@
 	Nse_suffix	sufx;
 	wchar_t		*suffix;
 
-#ifdef SUNOS4_AND_AFTER
 	if (!nse) {
-#else
-	if (is_false(flag.nse)) {
-#endif
 		return;
 	}
-#ifdef SUNOS4_AND_AFTER
 	if (target->stat.is_derived_src) {
-#else
-	if (is_true(target->stat.is_derived_src)) {
-#endif
 		return;
 	}
 	if (line != NULL && line->body.line.dependencies != NULL) {
 		return;
 	}
-#ifdef SUNOS4_AND_AFTER
 	if (command->body.line.sccs_command) {
-#else
-	if (is_true(command->body.line.sccs_command)) {
-#endif
 		return;
 	}
-#ifdef SUNOS4_AND_AFTER
 	suffix = wsrchr(target->string, (int) period_char); 
-#else
-	suffix = rindex(target->string, '.');
-#endif
 	if (suffix != NULL) {
 		for (sufx = sufx_hdr; sufx != NULL; sufx = sufx->next) {
-#ifdef SUNOS4_AND_AFTER
 			if (IS_WEQUAL(sufx->suffix, suffix)) {
-#else
-			if (is_equal(sufx->suffix, suffix)) {
-#endif
 				if (command->body.line.command_template == NULL) {
 					nse_warning();
 					fprintf(stderr, "\tProbable source file `%s' appears as a derived file because\n\tit is on the left-hand side, but it has no dependencies and\n\tno rule to build it\n",
@@ -581,11 +479,7 @@
 void
 nse_no_makefile(Name target)
 {
-#ifdef SUNOS4_AND_AFTER
 	if (!nse) {
-#else
-	if (is_false(flag.nse)) {
-#endif
 		return;
 	}
 	nse_warning();
--- old/usr/src/cmd/make/bin/nse_printdep.cc	2015-05-20 11:30:08.933909887 -0400
+++ new/usr/src/cmd/make/bin/nse_printdep.cc	2015-05-20 11:30:08.945532517 -0400
@@ -69,11 +69,7 @@
 	Dependency	dp;
 	static Boolean	makefiles_printed = false;
 
-#ifdef SUNOS4_AND_AFTER
 	if (target_variants) {
-#else
-	if (is_true(flag.target_variants)) {
-#endif
 		depvar_print_results();
 	}
 	
@@ -101,17 +97,11 @@
 		makefiles_printed = true;
 	}
 	print_deps(target, line);
-#ifdef SUNOS4_AND_AFTER
 /*
 	print_more_deps(target, init);
 	print_more_deps(target, done);
  */
 	if (target_variants) {
-#else
-	print_more_deps(target, cached_names.init);
-	print_more_deps(target, cached_names.done);
-	if (is_true(flag.target_variants)) {
-#endif
 		print_forest(target);
 	}
 }
@@ -167,12 +157,8 @@
 {
 	register Dependency	dep;
 
-#ifdef SUNOS4_AND_AFTER
 	if ((target->dependency_printed) ||
 	    (target == force)) {
-#else
-	if (is_true(target->dependency_printed)) {
-#endif
 		return;
 	}
 	target->dependency_printed = true;
@@ -289,11 +275,7 @@
 	if (line->body.line.dependencies != NULL) {
 		return true;
 	}
-#ifdef SUNOS4_AND_AFTER
 	if (line->body.line.sccs_command) {
-#else
-	if (is_true(line->body.line.sccs_command)) {
-#endif
 		return false;
 	}
 	return true;
@@ -310,13 +292,7 @@
 	Property	line;
 
  	for (np = hashtab.begin(), e = hashtab.end(); np != e; np++) {
-#ifdef SUNOS4_AND_AFTER
 			if (np->is_target && !np->has_parent && np != target) {
-#else
-			if (is_true(np->is_target) && 
-			    is_false(np->has_parent) &&
-			    np != target) {
-#endif
 				(void) doname_check(np, true, false, false);
 				line = get_prop(np->prop, line_prop);
 				printf("-\n");
@@ -325,120 +301,6 @@
 	}
 }
 
-#ifndef SUNOS4_AND_AFTER
-printdesc()
-{
-	Name_set::iterator	p, e;
-	register Property	prop;
-	register Dependency	dep;
-	register Cmd_line	rule;
-	Percent			percent, percent_depe;
-
-	/* Default target */
-	if (default_target_to_build != NULL) {
-		print_rule(default_target_to_build);
-		default_target_to_build->dependency_printed= true;
-	};
-	(void)printf("\n");
-
-	/* .AR_REPLACE */
-	if (ar_replace_rule != NULL) {
-		(void)printf("%s:\n", cached_names.ar_replace->string_mb);
-		for (rule= ar_replace_rule; rule != NULL; rule= rule->next)
-			(void)printf("\t%s\n", rule->command_line->string_mb);
-	};
-
-	/* .DEFAULT */
-	if (default_rule != NULL) {
-		(void)printf("%s:\n", cached_names.default_rule->string_mb);
-		for (rule= default_rule; rule != NULL; rule= rule->next)
-			(void)printf("\t%s\n", rule->command_line->string_mb);
-	};
-
-	/* .IGNORE */
-	if (is_true(flag.ignore_errors))
-		(void)printf("%s:\n", cached_names.ignore->string_mb);
-
-	/* .KEEP_STATE: */
-	if (is_true(flag.keep_state))
-		(void)printf("%s:\n\n", cached_names.dot_keep_state->string_mb);
-
-	/* .PRECIOUS */
-	(void)printf("%s: ", cached_names.precious->string_mb);
- 	for (p = hashtab.begin(), e = hashtab.end(); p != e; p++)
-			if (is_true(p->stat.is_precious | all_precious))
-				(void)printf("%s ", p->string_mb);
-	(void)printf("\n");
-
-	/* .SCCS_GET */
-	if (sccs_get_rule != NULL) {
-		(void)printf("%s:\n", cached_names.sccs_get->string_mb);
-		for (rule= sccs_get_rule; rule != NULL; rule= rule->next)
-			(void)printf("\t%s\n", rule->command_line->string_mb);
-	};
-
-	/* .SILENT */
-	if (is_true(flag.silent))
-		(void)printf("%s:\n", cached_names.silent->string_mb);
-
-	/* .SUFFIXES: */
-	(void)printf("%s: ", cached_names.suffixes->string_mb);
-	for (dep= suffixes; dep != NULL; dep= dep->next) {
-		(void)printf("%s ", dep->name->string_mb);
-		build_suffix_list(dep->name);
-	};
-	(void)printf("\n\n");
-
-	/* % rules */
-	for (percent= percent_list; percent != NULL; percent= percent->next) {
-		(void) printf("%s:", percent->name->string_mb);
-
-		for (percent_depe= percent->dependencies; percent_depe != NULL; percent_depe = percent_depe->next)
-			(void) printf(" %s", percent_depe->name->string_mb);
-
-		(void) printf("\n");
-
-		for (rule= percent->command_template; rule != NULL; rule= rule->next)
-			(void)printf("\t%s\n", rule->command_line->string_mb);
-	};
-
-	/* Suffix rules */
- 	for (p = hashtab.begin(), e = hashtab.end(); p != e; p++)
-			if (is_false(p->dependency_printed) && (p->string[0] == PERIOD)) {
-				print_rule(p);
-				p->dependency_printed= true;
-			};
-
-	/* Macro assignments */
- 	for (p = hashtab.begin(), e = hashtab.end(); p != e; p++)
-			if (((prop= get_prop(p->prop, macro_prop)) != NULL) &&
-			    (prop->body.macro.value != NULL)) {
-				(void)printf("%s", p->string_mb);
-				print_value(prop->body.macro.value,
-					    prop->body.macro.daemon);
-			};
-	(void)printf("\n");
-
-	/* Delays */
- 	for (p = hashtab.begin(), e = hashtab.end(); p != e; p++)
-			for (prop= get_prop(p->prop, conditional_prop);
-			     prop != NULL;
-			     prop= get_prop(prop->next, conditional_prop)) {
-				(void)printf("%s := %s",
-					     p->string_mb,
-					     prop->body.conditional.name->string_mb);
-				print_value(prop->body.conditional.value, no_daemon);
-			};
-	(void)printf("\n");
-
-	/* All other dependencies */
- 	for (p = hashtab.begin(), e = hashtab.end(); p != e; p++)
-			if (is_false(p->dependency_printed) && (p->colons != no_colon))
-				print_rule(p);
-	(void)printf("\n");
-	exit(0);
-}
-#endif
 
 /*
  *	This is a set  of routines for dumping the internal make state
@@ -447,11 +309,7 @@
 void
 print_value(register Name value, Daemon daemon)
 	             		      
-#ifdef SUNOS4_AND_AFTER
               			       
-#else
-	           		       
-#endif
 {
 	Chain			cp;
 
