--- old/usr/src/cmd/make/Makefile.com	2015-05-20 11:24:52.178763943 -0400
+++ new/usr/src/cmd/make/Makefile.com	2015-05-20 11:24:52.190407870 -0400
@@ -12,7 +12,7 @@
 # Copyright 2015, Richard Lowe.
 
 MAKE_INCLUDE= $(SRC)/cmd/make/include
-MAKE_DEFS= -DSUN5_0 -DSYSV -DINTER -DSUNOS4_AND_AFTER
+MAKE_DEFS= -DSYSV -DINTER -DSUNOS4_AND_AFTER
 $(RELEASE_BUILD)MAKE_DEFS += -DNDEBUG
 CFLAGS += $(CCVERBOSE)
 CPPFLAGS += -I$(MAKE_INCLUDE) $(MAKE_DEFS)
--- old/usr/src/cmd/make/bin/ar.cc	2015-05-20 11:24:53.578652857 -0400
+++ new/usr/src/cmd/make/bin/ar.cc	2015-05-20 11:24:53.590595106 -0400
@@ -46,7 +46,6 @@
 #include <mk/defs.h>
 #include <mksh/misc.h>		/* retmem_mb() */
 
-#if defined(SUN5_0) || defined(HP_UX) || defined(linux)
 struct ranlib {
 	union {
 		off_t	ran_strx;	/* string table index of */
@@ -54,9 +53,6 @@
 	}	ran_un;
 	off_t	ran_off;		/* library member at this offset */
 };
-#else
-#include <ranlib.h>
-#endif
 
 #if defined(linux)
 #include <ctype.h>		/* isspace */
@@ -288,30 +284,6 @@
 	}
 	(void) fcntl(fileno(arp->fd), F_SETFD, 1);
 
-#if !defined(SUN5_0) && !defined(linux) //XXX
-	/* Read enough of the archive to distinguish between the formats */
-	if (fread(mag_5, AR_5_MAGIC_LENGTH, 1, arp->fd) != 1) {
-		return failed;
-	}
-	if (IS_EQUALN(mag_5, AR_5_MAGIC, AR_5_MAGIC_LENGTH)) {
-		arp->type = AR_5;
-		/* Must read in header to set necessary info */
-		if (fseek(arp->fd, 0L, 0) != 0 ||
-		    fread((char *) &arp->arh_5, sizeof (Arh_5), 1, arp->fd) !=
-									1) {
-			return failed;
-		}
-		arp->sym_begin = ftell(arp->fd);
-		arp->num_symbols = sgetl(arp->arh_5.ar_syms);
-		arp->first_ar_mem = arp->sym_begin +
-					sizeof (Ars_5) * arp->num_symbols;
-		arp->sym_size = 0L;
-		return succeeded;
-	}
-	if (fseek(arp->fd, 0L, 0) != 0) {
-		return failed;
-	}
-#endif
 	if (fread(mag_port, AR_PORT_MAGIC_LENGTH, 1, arp->fd) != 1) {
 		return failed;
 	}
@@ -344,23 +316,12 @@
 		 * name __.SYMDEF, in SVr4, it has the name "/        "
 		 */
 /*
-#ifdef SUN5_0
-		MBSTOWCS(wcs_buffer, NOCATGETS("/               "));
-		if (IS_WEQUALN(arp->ar_port.ar_name, wcs_buffer, 16)) {
-#else
-		MBSTOWCS(wcs_buffer, NOCATGETS("__.SYMDEF       "));
+		MBSTOWCS(wcs_buffer, "/               ");
 		if (IS_WEQUALN(arp->ar_port.ar_name, wcs_buffer, 16)) {
-#endif
  */
-#if defined(SUN5_0) || defined(HP_UX) || defined(linux)
 		if (IS_EQUALN(arp->ar_port.ar_name,
 			      NOCATGETS("/               "),
 			      16)) {
-#else
-		if (IS_EQUALN(arp->ar_port.ar_name,
-			      NOCATGETS("__.SYMDEF       "),
-			      16)) {
-#endif
 			if (sscanf(arp->ar_port.ar_size,
 				   "%ld",
 				   &arp->sym_size) != 1) {
@@ -416,11 +377,7 @@
  *	Global variables used:
  */
 static Boolean
-#if defined(SUN5_0) || defined(linux) //XXX
 read_archive_dir(register Ar *arp, Name library, char **long_names_table)
-#else
-read_archive_dir(register Ar *arp, Name library, char **)
-#endif
 {
 	wchar_t			*name_string;
 	wchar_t			*member_string;
@@ -432,7 +389,6 @@
 	long			ptr;
 	long			date;
 
-#if defined(SUN5_0) || defined(linux) //XXX
 	int			offset;
 
 	/*
@@ -442,7 +398,6 @@
 	if (process_long_names_member(arp, long_names_table, library->string_mb) == failed) {
 		return failed;
 	}
-#endif
 	name_string = ALLOC_WC((int) (library->hash.length +
 				      (int) ar_member_name_len * 2));
 	(void) mbstowcs(name_string, library->string_mb, (int) library->hash.length);
@@ -518,7 +473,6 @@
 				ftell(arp->fd)
 			    );
 		    }
-#if defined(SUN5_0) || defined(linux) //XXX
 		    /* If it's a long name, retrieve it from long name table */
 		    if (arp->ar_port.ar_name[0] == '/') {
 			    /*
@@ -537,10 +491,6 @@
 			    q = arp->ar_port.ar_name;	
 			    len = sizeof arp->ar_port.ar_name;
 		    }
-#else
-		    q = arp->ar_port.ar_name;	
-		    len = sizeof arp->ar_port.ar_name;
-#endif
 		    
 		    for (p = member_string;
 			 (len > 0) &&
@@ -784,7 +734,6 @@
 					      arp->ar_port.ar_name,
 					      target->string_mb);
 				}
-#if defined(SUN5_0) || defined(linux) //XXX
 		    /* If it's a long name, retrieve it from long name table */
 		    if (arp->ar_port.ar_name[0] == '/') {
 			    sscanf(arp->ar_port.ar_name + 1,
@@ -796,9 +745,6 @@
 			    len = sizeof arp->ar_port.ar_name;
 			    hp = arp->ar_port.ar_name;	
 		    }
-#else
-		    hp = arp->ar_port.ar_name;	
-#endif
 				ap = member_string;
 				while (*hp &&
 				       (*hp != (int) slash_char) &&
--- old/usr/src/cmd/make/bin/doname.cc	2015-05-20 11:24:54.307871284 -0400
+++ new/usr/src/cmd/make/bin/doname.cc	2015-05-20 11:24:54.322082225 -0400
@@ -1703,9 +1703,7 @@
 			result = execute_serial(line);
 #endif
 		}
-#if defined(SUN5_0) || defined(HP_UX) || defined(linux)
 		exit_status = 1;
-#endif
 		exit(1);
 	}
 	/* We actually had to do something this time */
--- old/usr/src/cmd/make/bin/files.cc	2015-05-20 11:24:55.082691336 -0400
+++ new/usr/src/cmd/make/bin/files.cc	2015-05-20 11:24:55.094411009 -0400
@@ -36,11 +36,7 @@
 /*
  * Included files
  */
-#if defined(SUN5_0) || defined(HP_UX)
 #include <dirent.h>		/* opendir() */
-#else
-#include <sys/dir.h>		/* opendir() */
-#endif
 #include <errno.h>		/* errno */
 #include <mk/defs.h>
 #include <mksh/macro.h>		/* getvar() */
@@ -306,12 +302,8 @@
 	wchar_t			tmp_wcs_buffer[MAXPATHLEN];
 	DIR			*dir_fd;
 	int			m_local_dependency=0;
-#if defined(SUN5_0) || defined(HP_UX)
 #define d_fileno d_ino
         register struct dirent  *dp;
-#else
-        register struct direct  *dp;
-#endif
 	wchar_t			*vpath = NULL;
 	wchar_t			*p;
 	int			result = 0;
--- old/usr/src/cmd/make/bin/main.cc	2015-05-20 11:24:55.589374687 -0400
+++ new/usr/src/cmd/make/bin/main.cc	2015-05-20 11:24:55.605113319 -0400
@@ -83,9 +83,7 @@
 #include <sys/stat.h>		/* fstat() */
 #include <fcntl.h>		/* open() */
 
-#ifdef SUN5_0
 #	include <sys/systeminfo.h>	/* sysinfo() */
-#endif
 
 #include <sys/types.h>		/* stat() */
 #include <sys/wait.h>		/* wait() */
@@ -162,11 +160,7 @@
 /*
  * File table of contents
  */
-#if defined(SUN5_0) || defined(HP_UX) || defined(linux)
 	extern "C" void		cleanup_after_exit(void);
-#else
-	extern	void		cleanup_after_exit(int, ...);
-#endif
 
 #ifdef TEAMWARE_MAKE_CMN
 extern "C" {
@@ -489,11 +483,7 @@
 	 * If running with .KEEP_STATE, curdir will be set with
 	 * the connected directory.
 	 */
-#if defined(SUN5_0) || defined(HP_UX) || defined(linux)
 	(void) atexit(cleanup_after_exit);
-#else
-	(void) on_exit(cleanup_after_exit, (char *) NULL);
-#endif
 
 	load_cached_names();
 
@@ -742,20 +732,16 @@
 	working_on_targets = true;
 	if (trace_status) {
 		dump_make_state();
-#if defined(SUN5_0) || defined(HP_UX) || defined(linux)
 		fclose(stdout);
 		fclose(stderr);
 		exit_status = 0;
-#endif
 		exit(0);
 	}
 	if (list_all_targets) {
 		dump_target_list();
-#if defined(SUN5_0) || defined(HP_UX) || defined(linux)
 		fclose(stdout);
 		fclose(stderr);
 		exit_status = 0;
-#endif
 		exit(0);
 	}
 	trace_reader = false;
@@ -804,16 +790,12 @@
         exit(nse_exit_status());
 #else
 	if (build_failed_ever_seen) {
-#if defined(SUN5_0) || defined(HP_UX) || defined(linux)
 		if (posix) {
 			exit_status = 1;
 		}
-#endif
 		exit(1);
 	}
-#if defined(SUN5_0) || defined(HP_UX) || defined(linux)
 	exit_status = 0;
-#endif
 	exit(0);
 #endif
 	/* NOTREACHED */
@@ -846,12 +828,8 @@
  *		usage_tracking  Should have been constructed in main()
  *			        should destroyed just before exiting
  */
-#if defined(SUN5_0) || defined(HP_UX) || defined(linux)
 extern "C" void
 cleanup_after_exit(void)
-#else
-void cleanup_after_exit(int status, ...)
-#endif
 {
 	Running		rp;
 #ifdef NSE
@@ -907,21 +885,15 @@
  */
 
 	parallel = false;
-#ifdef SUN5_0
 	/* If we used the SVR4_MAKE, don't build .DONE or .FAILED */
 	if (!getenv(USE_SVR4_MAKE)){
-#endif
 	    /* Build the target .DONE or .FAILED if we caught an error */
 	    if (!quest && !list_all_targets) {
 		Name		failed_name;
 
 		MBSTOWCS(wcs_buffer, NOCATGETS(".FAILED"));
 		failed_name = GETNAME(wcs_buffer, FIND_LENGTH);
-#if defined(SUN5_0) || defined(HP_UX) || defined(linux)
 		if ((exit_status != 0) && (failed_name->prop != NULL)) {
-#else
-		if ((status != 0) && (failed_name->prop != NULL)) {
-#endif
 #ifdef TEAMWARE_MAKE_CMN
 			/*
 			 * [tolik] switch DMake to serial mode
@@ -943,9 +915,7 @@
 		    }
 		}
 	    }
-#ifdef SUN5_0
 	}
-#endif
 	/*
 	 * Remove the temp file utilities report dependencies thru if it
 	 * is still around
@@ -1122,11 +1092,7 @@
 
 	/* Make sure the processes running under us terminate first */
 
-#if defined(SUN5_0) || defined(HP_UX) || defined(linux)
 	while (wait((int *) NULL) != -1);
-#else
-	while (wait((union wait*) NULL) != -1);
-#endif
 	/* Delete the current targets unless they are precious */
 	if ((current_target != NULL) &&
 	    current_target->is_member &&
@@ -1227,9 +1193,7 @@
 
 	report_dir_enter_leave(false);
 
-#if defined(SUN5_0) || defined(HP_UX) || defined(linux)
 	exit_status = 2;
-#endif
 	exit(2);
 }
 
@@ -1964,9 +1928,7 @@
 		} else {
 #ifdef TEAMWARE_MAKE_CMN
 			fprintf(stdout, NOCATGETS("dmake: %s\n"), verstring);
-#ifdef SUN5_0
 			exit_status = 0;
-#endif
 			exit(0);
 #else
 			warning(catgets(catd, 1, 324, "Ignoring DistributedMake -v option"));
@@ -2218,7 +2180,6 @@
 		trace_reader = true;
 	}
 	if (!ignore_default_mk) {
-#if defined(SUN5_0) || defined(HP_UX) || defined(linux)
 		if (svr4) {
 			MBSTOWCS(wcs_buffer, NOCATGETS("svr4.make.rules"));
 			default_makefile = GETNAME(wcs_buffer, FIND_LENGTH);
@@ -2226,10 +2187,6 @@
 			MBSTOWCS(wcs_buffer, NOCATGETS("make.rules"));
 			default_makefile = GETNAME(wcs_buffer, FIND_LENGTH);
 		}
-#else		
-		MBSTOWCS(wcs_buffer, NOCATGETS("default.mk"));
-		default_makefile = GETNAME(wcs_buffer, FIND_LENGTH);
-#endif
 		default_makefile->stat.is_file = true;
 
 		(void) read_makefile(default_makefile,
--- old/usr/src/cmd/make/bin/misc.cc	2015-05-20 11:24:56.309263447 -0400
+++ new/usr/src/cmd/make/bin/misc.cc	2015-05-20 11:24:56.322801655 -0400
@@ -164,9 +164,7 @@
 	}
 	(void) fflush(stderr);
 	if (fatal_in_progress) {
-#if defined(SUN5_0) || defined(HP_UX) || defined(linux)
 		exit_status = 1;
-#endif
 		exit(1);
 	}
 	fatal_in_progress = true;
@@ -200,9 +198,7 @@
 	job_adjust_fini();
 #endif
 
-#if defined(SUN5_0) || defined(HP_UX) || defined(linux)
 	exit_status = 1;
-#endif
 	exit(1);
 }
 
@@ -290,11 +286,7 @@
 	static char		*current_path;
 
 	if (current_path == NULL) {
-#if defined(SUN5_0) || defined(HP_UX) || defined(linux)
 		getcwd(pwd, sizeof(pwd));
-#else
-		(void) getwd(pwd);
-#endif
 		if (pwd[0] == (int) nul_char) {
 			pwd[0] = (int) slash_char;
 			pwd[1] = (int) nul_char;
@@ -734,15 +726,11 @@
 	#ifdef HP_UX
 	MBSTOWCS(wcs_buffer, NOCATGETS("/bin/posix/sh"));
 	#else
-	#if defined(SUN5_0)
 	if (posix) {
 	  MBSTOWCS(wcs_buffer, NOCATGETS("/usr/xpg4/bin/sh"));
 	} else {
 	  MBSTOWCS(wcs_buffer, NOCATGETS("/bin/sh"));
 	}
-	#else  /* ^SUN5_0 */
-	MBSTOWCS(wcs_buffer, NOCATGETS("/bin/sh"));
-	#endif /* ^SUN5_0 */
 	#endif
 	(void) SETVAR(shell_name, GETNAME(wcs_buffer, FIND_LENGTH), false);
 
--- old/usr/src/cmd/make/bin/parallel.cc	2015-05-20 11:24:56.857413933 -0400
+++ new/usr/src/cmd/make/bin/parallel.cc	2015-05-20 11:24:56.869646899 -0400
@@ -2328,11 +2328,7 @@
 				errmsg(errno));
 			_exit(1);
 		} else {
-#if defined (HP_UX) || defined (linux) || defined (SUN5_0)
 			int		status;
-#else
-			union wait	status;
-#endif
 			pid_t pid;
 			while ((pid = wait(&status)) != childPid) {
 				if (pid == -1) {
--- old/usr/src/cmd/make/bin/read.cc	2015-05-20 11:24:57.508492995 -0400
+++ new/usr/src/cmd/make/bin/read.cc	2015-05-20 11:24:57.520788742 -0400
@@ -150,51 +150,12 @@
 				add_dir_to_path(".",
 						&makefile_path,
 						-1);
-#ifdef SUN5_0
 				add_dir_to_path(NOCATGETS("/usr/share/lib/make"),
 						&makefile_path,
 						-1);
 				add_dir_to_path(NOCATGETS("/etc/default"),
 						&makefile_path,
 						-1);
-#elif defined(HP_UX)
-                		findrundir_err = avo_find_run_dir(&run_dir);
-                		if (! findrundir_err) {
-                        		(void) sprintf(makerules_dir, NOCATGETS("%s/../share/lib/make"), run_dir);
-					add_dir_to_path(makerules_dir,
-							&makefile_path,
-							-1);
-                		}
-
-				add_dir_to_path(NOCATGETS("/opt/SUNWspro/share/lib/make"),
-						&makefile_path,
-						-1);
-				add_dir_to_path(NOCATGETS("/usr/share/lib/make"),
-						&makefile_path,
-						-1);
-#elif defined(linux)
-                		findrundir_err = avo_find_run_dir(&run_dir);
-                		if (! findrundir_err) {
-                        		(void) sprintf(makerules_dir, NOCATGETS("%s/../lib"), run_dir);
-					add_dir_to_path(makerules_dir,
-							&makefile_path,
-							-1);
-                		}
-
-				add_dir_to_path(NOCATGETS("/usr/SUNWspro/lib"),
-						&makefile_path,
-						-1);
-				add_dir_to_path(NOCATGETS("/opt/SUNWspro/share/lib/make"),
-						&makefile_path,
-						-1);
-				add_dir_to_path(NOCATGETS("/usr/share/lib/make"),
-						&makefile_path,
-						-1);
-#else
-				add_dir_to_path(NOCATGETS("/usr/include/make"),
-						&makefile_path,
-						-1);
-#endif
 			}
 			save_makefile_type = makefile_type;
 			makefile_type = reading_nothing;
--- old/usr/src/cmd/make/bin/read2.cc	2015-05-20 11:24:58.577512145 -0400
+++ new/usr/src/cmd/make/bin/read2.cc	2015-05-20 11:24:58.590413057 -0400
@@ -1172,11 +1172,9 @@
 		sccs_get_rule = sccs_get_posix_rule;
 			/* turn keep state off being SunPro make specific */
 		keep_state = false;
-		#if defined(SUN5_0)
 		/* Use /usr/xpg4/bin/sh on Solaris */
 		MBSTOWCS(wcs_buffer, NOCATGETS("/usr/xpg4/bin/sh"));
 		(void) SETVAR(shell_name, GETNAME(wcs_buffer, FIND_LENGTH), false);
-		#endif
 		if (trace_reader) {
 			(void) printf("%s:\n", posix_name->string_mb);
 		}
@@ -1925,9 +1923,7 @@
 			       get_current_path());
 	}
 	(void) fflush(stderr);
-#if defined(SUN5_0) || defined(HP_UX)
 	exit_status = 1;
-#endif
 	exit(1);
 }
 
--- old/usr/src/cmd/make/include/mk/defs.h	2015-05-20 11:24:59.603779544 -0400
+++ new/usr/src/cmd/make/include/mk/defs.h	2015-05-20 11:24:59.615736963 -0400
@@ -77,7 +77,6 @@
 #define SETVAR(name, value, append) \
 				setvar_daemon(name, value, append, no_daemon, \
 					      true, debug_level)
-#ifdef SUN5_0
 #define MAX(a,b)		(((a)>(b))?(a):(b))
 /*
  * New feature added to SUN5_0 make,  invoke the vanilla svr4 make when
@@ -85,7 +84,6 @@
  */
 #define SVR4_MAKE		"/usr/ccs/lib/svr4.make"
 #define USE_SVR4_MAKE		"USE_SVR4_MAKE"
-#endif
 /*
  * The standard MAXHOSTNAMELEN is 64. We want 32.
  */
--- old/usr/src/cmd/make/include/mksh/defs.h	2015-05-20 11:25:00.070934252 -0400
+++ new/usr/src/cmd/make/include/mksh/defs.h	2015-05-20 11:25:00.083433769 -0400
@@ -91,11 +91,7 @@
 #ifdef sun386
 	ar_member_name_len = 14,
 #else
-#if defined(SUN5_0) || defined(linux)
 	ar_member_name_len = 1024,
-#else
-	ar_member_name_len = 15,
-#endif
 #endif
 
 	hashsize = 2048			/* size of hash table */
@@ -950,9 +946,7 @@
 extern Name		dollarless_value;
 extern char		**environ;
 extern Envvar		envvar;
-#if defined(SUN5_0) || defined(HP_UX) || defined(linux)
 extern int		exit_status;
-#endif
 extern wchar_t		*file_being_read;
 /* Variable gnu_style=true if env. var. SUN_MAKE_COMPAT_MODE=GNU (RFE 4866328) */
 extern Boolean		gnu_style;
--- old/usr/src/cmd/make/include/vroot/args.h	2015-05-20 11:25:00.715542946 -0400
+++ new/usr/src/cmd/make/include/vroot/args.h	2015-05-20 11:25:00.727143951 -0400
@@ -53,9 +53,6 @@
 	struct { int flags; int mode;} open;
 	struct { char *buffer; int buffer_size;} readlink;
 	struct { struct stat *buffer;} stat;
-#ifndef SUN5_0
-	struct { struct statfs *buffer;} statfs;
-#endif
 	struct { int length;} truncate;
 	struct { struct timeval *time;} utimes;
 };
--- old/usr/src/cmd/make/lib/bsd/bsd.cc	2015-05-20 11:25:01.124481426 -0400
+++ new/usr/src/cmd/make/lib/bsd/bsd.cc	2015-05-20 11:25:01.136513186 -0400
@@ -41,7 +41,6 @@
 bsd_signal (int Signal, SIG_PF Handler)
 {
   auto SIG_PF                   previous_handler;
-#ifdef SUN5_0
 #ifdef sun
   previous_handler = sigset (Signal, Handler);
 #else
@@ -57,11 +56,6 @@
 
   previous_handler = (SIG_PF) old_action.sa_handler;
 #endif
-#elif defined(linux)
-  previous_handler = sigset (Signal, Handler);
-#else
-  previous_handler = signal (Signal, Handler);
-#endif
   return previous_handler;
 }
 
@@ -73,105 +67,6 @@
   if (initialized == 0)
     {
       initialized = 1;
-#if !defined(SUN5_0) && !defined(linux)
-#if defined(SIGHUP)
-      (void) bsd_signal (SIGHUP, SIG_DFL);
-#endif
-#if defined(SIGINT)
-      (void) bsd_signal (SIGINT, SIG_DFL);
-#endif
-#if defined(SIGQUIT)
-      (void) bsd_signal (SIGQUIT, SIG_DFL);
-#endif
-#if defined(SIGILL)
-      (void) bsd_signal (SIGILL, SIG_DFL);
-#endif
-#if defined(SIGTRAP)
-      (void) bsd_signal (SIGTRAP, SIG_DFL);
-#endif
-#if defined(SIGIOT)
-      (void) bsd_signal (SIGIOT, SIG_DFL);
-#endif
-#if defined(SIGABRT)
-      (void) bsd_signal (SIGABRT, SIG_DFL);
-#endif
-#if defined(SIGEMT)
-      (void) bsd_signal (SIGEMT, SIG_DFL);
-#endif
-#if defined(SIGFPE)
-      (void) bsd_signal (SIGFPE, SIG_DFL);
-#endif
-#if defined(SIGBUS)
-      (void) bsd_signal (SIGBUS, SIG_DFL);
-#endif
-#if defined(SIGSEGV)
-      (void) bsd_signal (SIGSEGV, SIG_DFL);
-#endif
-#if defined(SIGSYS)
-      (void) bsd_signal (SIGSYS, SIG_DFL);
-#endif
-#if defined(SIGPIPE)
-      (void) bsd_signal (SIGPIPE, SIG_DFL);
-#endif
-#if defined(SIGALRM)
-      (void) bsd_signal (SIGALRM, SIG_DFL);
-#endif
-#if defined(SIGTERM)
-      (void) bsd_signal (SIGTERM, SIG_DFL);
-#endif
-#if defined(SIGUSR1)
-      (void) bsd_signal (SIGUSR1, SIG_DFL);
-#endif
-#if defined(SIGUSR2)
-      (void) bsd_signal (SIGUSR2, SIG_DFL);
-#endif
-#if defined(SIGCLD)
-      (void) bsd_signal (SIGCLD, SIG_DFL);
-#endif
-#if defined(SIGCHLD)
-      (void) bsd_signal (SIGCHLD, SIG_DFL);
-#endif
-#if defined(SIGPWR)
-      (void) bsd_signal (SIGPWR, SIG_DFL);
-#endif
-#if defined(SIGWINCH)
-      (void) bsd_signal (SIGWINCH, SIG_DFL);
-#endif
-#if defined(SIGURG)
-      (void) bsd_signal (SIGURG, SIG_DFL);
-#endif
-#if defined(SIGIO)
-      (void) bsd_signal (SIGIO, SIG_DFL);
-#else
-#if defined(SIGPOLL)
-      (void) bsd_signal (SIGPOLL, SIG_DFL);
-#endif
-#endif
-#if defined(SIGTSTP)
-      (void) bsd_signal (SIGTSTP, SIG_DFL);
-#endif
-#if defined(SIGCONT)
-      (void) bsd_signal (SIGCONT, SIG_DFL);
-#endif
-#if defined(SIGTTIN)
-      (void) bsd_signal (SIGTTIN, SIG_DFL);
-#endif
-#if defined(SIGTTOU)
-      (void) bsd_signal (SIGTTOU, SIG_DFL);
-#endif
-#if defined(SIGVTALRM)
-      (void) bsd_signal (SIGVTALRM, SIG_DFL);
-#endif
-#if defined(SIGPROF)
-      (void) bsd_signal (SIGPROF, SIG_DFL);
-#endif
-#if defined(SIGXCPU)
-      (void) bsd_signal (SIGXCPU, SIG_DFL);
-#endif
-#if defined(SIGXFSZ)
-      (void) bsd_signal (SIGXFSZ, SIG_DFL);
-#endif
-#endif
     }
 
   return;
--- old/usr/src/cmd/make/lib/mksh/dosys.cc	2015-05-20 11:25:01.608314002 -0400
+++ new/usr/src/cmd/make/lib/mksh/dosys.cc	2015-05-20 11:25:01.620250331 -0400
@@ -627,24 +627,7 @@
 await(register Boolean ignore_error, register Boolean silent_error, Name target, wchar_t *command, pid_t running_pid, Boolean send_mtool_msgs, void *xdrs_p, int job_msg_id)
 #endif
 {
-#ifdef SUN5_0
         int                     status;
-#else
-#ifndef WEXITSTATUS
-#define WEXITSTATUS(stat)       stat.w_T.w_Retcode
-#endif
-#ifndef WTERMSIG
-#define WTERMSIG(stat)          stat.w_T.w_Termsig
-#endif
-#ifndef WCOREDUMP
-#define WCOREDUMP(stat)         stat.w_T.w_Coredump
-#endif
-#if defined (HP_UX) || defined (linux)
-	int			status;
-#else
-	union wait		status;
-#endif
-#endif
 	char			*buffer;
 	int			core_dumped;
 	int			exit_status;
@@ -668,7 +651,6 @@
 	(void) fflush(stdout);
 	(void) fflush(stderr);
 
-#if defined(SUN5_0) || defined(HP_UX) || defined(linux)
         if (status == 0) {
 
 #ifdef PRINT_EXIT_STATUS
@@ -682,11 +664,6 @@
 	warning_mksh(NOCATGETS("I'm in await(), and status is *NOT* 0."));
 #endif
 
-#else
-        if (status.w_status == 0) {
-                return succeeded;
-	}
-#endif
 
         exit_status = WEXITSTATUS(status);
 
@@ -719,9 +696,6 @@
 					       exit_status);
 			);
 		} else {
-#if ! defined(SUN5_0) && ! defined(HP_UX) && ! defined(linux)
-			if (termination_signal > NSIG) {
-#endif
 				(void) fprintf(stdout,
 					       catgets(libmksdmsi18n_catd, 1, 105, "*** Signal %d"),
 					       termination_signal);
@@ -730,18 +704,6 @@
 						       catgets(libmksdmsi18n_catd, 1, 106, "*** Signal %d"),
 						       termination_signal);
 				);
-#if ! defined(SUN5_0) && ! defined(HP_UX) && ! defined(linux)
-			} else {
-				(void) fprintf(stdout,
-					       "*** %s",
-					       sys_siglist[termination_signal]);
-				SEND_MTOOL_MSG(
-					(void) sprintf(&tmp_buf[strlen(tmp_buf)],
-						       "*** %s",
-						       sys_siglist[termination_signal]);
-				);
-			}
-#endif
 			if (core_dumped) {
 				(void) fprintf(stdout,
 					       catgets(libmksdmsi18n_catd, 1, 107, " - core dumped"));
--- old/usr/src/cmd/make/lib/mksh/globals.cc	2015-05-20 11:25:02.090459483 -0400
+++ new/usr/src/cmd/make/lib/mksh/globals.cc	2015-05-20 11:25:02.102295581 -0400
@@ -90,9 +90,7 @@
 #ifdef lint
 char		**environ;
 #endif
-#ifdef SUN5_0
 int		exit_status;
-#endif
 wchar_t		*file_being_read;
 /* Variable gnu_style=true if env. var. SUN_MAKE_COMPAT_MODE=GNU (RFE 4866328) */
 Boolean		gnu_style = false;
--- old/usr/src/cmd/make/lib/mksh/misc.cc	2015-05-20 11:25:03.035556093 -0400
+++ new/usr/src/cmd/make/lib/mksh/misc.cc	2015-05-20 11:25:03.065693520 -0400
@@ -49,9 +49,7 @@
 #include <sys/signal.h>		/* SIG_DFL */
 #include <sys/wait.h>		/* wait() */
 
-#ifdef SUN5_0
 #include <string.h>		/* strerror() */
-#endif
 
 #if defined (HP_UX) || defined (linux)
 #include <unistd.h>
@@ -68,19 +66,12 @@
 /*
  * Static variables
  */
-#ifdef SUN5_0
 extern "C" {
 	void		(*sigivalue)(int) = SIG_DFL;
 	void		(*sigqvalue)(int) = SIG_DFL;
 	void		(*sigtvalue)(int) = SIG_DFL;
 	void		(*sighvalue)(int) = SIG_DFL;
 }
-#else
-static	void		(*sigivalue)(int) = (void (*) (int)) SIG_DFL;
-static	void		(*sigqvalue)(int) = (void (*) (int)) SIG_DFL;
-static	void		(*sigtvalue)(int) = (void (*) (int)) SIG_DFL;
-static	void		(*sighvalue)(int) = (void (*) (int)) SIG_DFL;
-#endif
 
 long	getname_bytes_count = 0;
 long	getname_names_count = 0;
@@ -122,9 +113,7 @@
 		sprintf(buf, NOCATGETS("*** Error: malloc(%d) failed: %s\n"), size, strerror(errno));
 		strcat(buf, catgets(libmksdmsi18n_catd, 1, 126, "mksh: Fatal error: Out of memory\n"));
 		fputs(buf, stderr);
-#ifdef SUN5_0
 		exit_status = 1;
-#endif
 		exit(1);
 	}
 	return result;
@@ -284,32 +273,16 @@
 void
 enable_interrupt(register void (*handler) (int))
 {
-#ifdef SUN5_0
 	if (sigivalue != SIG_IGN) {
-#else
-	if (sigivalue != (void (*) (int)) SIG_IGN) {
-#endif
 		(void) bsd_signal(SIGINT, (SIG_PF) handler);
 	}
-#ifdef SUN5_0
 	if (sigqvalue != SIG_IGN) {
-#else
-	if (sigqvalue != (void (*) (int)) SIG_IGN) {
-#endif
 		(void) bsd_signal(SIGQUIT, (SIG_PF) handler);
 	}
-#ifdef SUN5_0
 	if (sigtvalue != SIG_IGN) {
-#else
-	if (sigtvalue != (void (*) (int)) SIG_IGN) {
-#endif
 		(void) bsd_signal(SIGTERM, (SIG_PF) handler);
 	}
-#ifdef SUN5_0
 	if (sighvalue != SIG_IGN) {
-#else
-	if (sighvalue != (void (*) (int)) SIG_IGN) {
-#endif
 		(void) bsd_signal(SIGHUP, (SIG_PF) handler);
 	}
 }
@@ -394,9 +367,7 @@
 #ifdef SUN4_x
 		return(sys_errlist[errnum]);
 #endif
-#ifdef SUN5_0
 		return strerror(errnum);
-#endif
 
 	}
 #endif // linux
@@ -455,9 +426,7 @@
 	if (buf != static_buf) {
 		retmem_mb(buf);
 	}
-#ifdef SUN5_0
 	exit_status = 1;
-#endif
 	exit(1);
 }
 
@@ -519,9 +488,7 @@
 			       get_current_path_mksh());
 	}
 	(void) fflush(stderr);
-#ifdef SUN5_0
 	exit_status = 1;
-#endif
 	exit(1);
 }
 
@@ -573,11 +540,7 @@
 	static char		*current_path;
 
 	if (current_path == NULL) {
-#if defined(SUN5_0) || defined(HP_UX) || defined(linux)
 		getcwd(pwd, sizeof(pwd));
-#else
-		(void) getwd(pwd);
-#endif
 		if (pwd[0] == (int) nul_char) {
 			pwd[0] = (int) slash_char;
 			pwd[1] = (int) nul_char;
@@ -866,14 +829,8 @@
 		kill(childPid, SIGTERM);
 		childPid = -1;
 	}
-#if defined(SUN5_0) || defined(HP_UX) || defined(linux)
 	while (wait((int *) NULL) != -1);
-#if defined(SUN5_0)
 	exit_status = 2;
-#endif
-#else
-	while (wait((union wait *) NULL) != -1);
-#endif
 	exit(2);
 }
 
@@ -893,17 +850,10 @@
 void
 setup_interrupt(register void (*handler) (int))
 {
-#ifdef SUN5_0
 	sigivalue = bsd_signal(SIGINT, SIG_IGN);
 	sigqvalue = bsd_signal(SIGQUIT, SIG_IGN);
 	sigtvalue = bsd_signal(SIGTERM, SIG_IGN);
 	sighvalue = bsd_signal(SIGHUP, SIG_IGN);
-#else
-	sigivalue = (void (*) (int)) bsd_signal(SIGINT, SIG_IGN);
-	sigqvalue = (void (*) (int)) bsd_signal(SIGQUIT, SIG_IGN);
-	sigtvalue = (void (*) (int)) bsd_signal(SIGTERM, SIG_IGN);
-	sighvalue = (void (*) (int)) bsd_signal(SIGHUP, SIG_IGN);
-#endif
 	enable_interrupt(handler);
 }
 
--- old/usr/src/cmd/make/lib/vroot/Makefile	2015-05-20 11:25:04.225434953 -0400
+++ new/usr/src/cmd/make/lib/vroot/Makefile	2015-05-20 11:25:04.237501012 -0400
@@ -30,10 +30,8 @@
 		report.o	\
 		rmdir.o		\
 		stat.o		\
-		statfs.o	\
 		truncate.o	\
 		unlink.o	\
-		unmount.o	\
 		utimes.o	\
 		vroot.o		\
 		setenv.o
--- old/usr/src/cmd/make/lib/vroot/lock.cc	2015-05-20 11:25:04.632314016 -0400
+++ new/usr/src/cmd/make/lib/vroot/lock.cc	2015-05-20 11:25:04.643982055 -0400
@@ -131,11 +131,7 @@
 
 			if ((counter > 5) && (!printed_warning)) {
 				/* Print waiting message after 5 secs */
-#if defined(SUN5_0) || defined(HP_UX) || defined(linux)
 				(void) getcwd(msg, MAXPATHLEN);
-#else
-				(void) getwd(msg);
-#endif
 				fprintf(stderr,
 					catgets(libmksdmsi18n_catd, 1, 162, "file_lock: file %s is already locked.\n"),
 					name);
@@ -177,9 +173,7 @@
 #ifdef SUN4_x
 		strcat(msg, sys_errlist[errno]);
 #endif
-#ifdef SUN5_0
 		strcat(msg, strerror(errno));
-#endif
 	} else {
 		len = strlen(msg);
 		sprintf(&msg[len], NOCATGETS("errno %d"), errno);
--- old/usr/src/cmd/make/lib/vroot/report.cc	2015-05-20 11:25:05.041920689 -0400
+++ new/usr/src/cmd/make/lib/vroot/report.cc	2015-05-20 11:25:05.053690549 -0400
@@ -59,7 +59,6 @@
 	return(target_being_reported_for);
 }
 
-#if defined(SUN5_0) || defined(HP_UX) || defined(linux)
 extern "C" {
 static void
 close_report_file(void)
@@ -68,14 +67,6 @@
 	(void)fclose(report_file);
 }
 } // extern "C"
-#else
-static void
-close_report_file(int, ...)
-{
-	(void)fputs("\n", report_file);
-	(void)fclose(report_file);
-}
-#endif
 
 static void
 clean_up(FILE *nse_depinfo_fp, FILE *merge_fp, char *nse_depinfo_file, char *merge_file, int unlinkf)
@@ -97,14 +88,9 @@
  *  to change in that case.
  */
 
-#if defined(SUN5_0) || defined(HP_UX) || defined(linux)
 extern "C" {
 static void
 close_file(void)
-#else
-static void
-close_file(int, ...)
-#endif
 {
 	char		line[MAXPATHLEN+2];
 	char		buf[MAXPATHLEN+2];
@@ -214,9 +200,7 @@
 	}
 }
 
-#if defined(SUN5_0) || defined(HP_UX) || defined(linux)
 } // extern "C"
-#endif
 
 static void
 report_dep(char *iflag, char *filename)
@@ -232,11 +216,7 @@
 		if ((search_dir = getenv(NOCATGETS("NSE_DEP"))) == NULL) {
 			return;
 		}
-#if defined(SUN5_0) || defined(HP_UX) || defined(linux)
 		atexit(close_file);
-#else
-		on_exit(close_file, 0);
-#endif
 		strcpy(sfile, filename);
 		if (iflag == NULL || *iflag == '\0') {
 			return;
@@ -288,11 +268,7 @@
 		return;
 	}
 	sprintf(filename, NOCATGETS("%s-CPP"), ptr+1);
-#if defined(SUN5_0) || defined(HP_UX) || defined(linux)
 	getcwd(curdir, sizeof(curdir));
-#else
-	getwd(curdir);
-#endif
 	if (strcmp(curdir, sdir) != 0 && strlen(iflag) > 2 && 
 	    iflag[2] != '/') {
 		/* Makefile must have had an "cd xx; cc ..." */
@@ -338,11 +314,7 @@
 				return;
 			}
 		}
-#if defined(SUN5_0) || defined(HP_UX) || defined(linux)
 		atexit(close_report_file);
-#else
-		(void)on_exit(close_report_file, (char *)report_file);
-#endif
 		if ((p2= strchr(p+1, ' ')) != NULL)
 			*p2= 0;
 		target_being_reported_for= (char *)malloc((unsigned)(strlen(p+1)+1));
--- old/usr/src/cmd/make/lib/vroot/statfs.cc	2015-05-20 11:25:05.498378733 -0400
+++ /dev/null	2015-05-20 11:25:05.000000000 -0400
@@ -1,44 +0,0 @@
-/*
- * 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 1993 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef SUN5_0
-
-#include <vroot/vroot.h>
-#include <vroot/args.h>
-#include <sys/vfs.h>
-
-static int	statfs_thunk(char *path)
-{
-	vroot_result= statfs(path, vroot_args.statfs.buffer);
-	return(vroot_result == 0);
-}
-
-int	statfs_vroot(char *path, struct statfs *buffer, pathpt vroot_path, pathpt vroot_vroot)
-{
-	vroot_args.statfs.buffer= buffer;
-	translate_with_thunk(path, statfs_thunk, vroot_path, vroot_vroot, rw_read);
-	return(vroot_result);
-}
-#endif
--- old/usr/src/cmd/make/lib/vroot/unmount.cc	2015-05-20 11:25:05.669696898 -0400
+++ /dev/null	2015-05-20 11:25:05.000000000 -0400
@@ -1,43 +0,0 @@
-/*
- * 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 1993 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef SUN5_0
-#include <vroot/vroot.h>
-#include <vroot/args.h>
-
-extern int	unmount(char *name);
-
-static int	unmount_thunk(char *path)
-{
-	vroot_result= unmount(path);
-	return(vroot_result == 0);
-}
-
-int	unmount_vroot(char *path, pathpt vroot_path, pathpt vroot_vroot)
-{
-	translate_with_thunk(path, unmount_thunk, vroot_path, vroot_vroot, rw_read);
-	return(vroot_result);
-}
-#endif
