At a guess, they probably should never have been committed.

Signed-off-by: Eric Anholt <[email protected]>
---
 src/perl/api.pl.orig              | 227 ------------
 src/perl/template.pl.orig         | 745 --------------------------------------
 src/tet3/apithr/thr_create.c.orig | 541 ---------------------------
 src/tet3/inetlib/poll.c.orig      | 219 -----------
 src/tet3/inetlib/rdwr.c.orig      | 472 ------------------------
 src/tet3/tccd/log.c.orig          | 184 ----------
 src/tet3/tcclib/lsdir.c.orig      | 101 ------
 src/tet3/tcm/makefile.orig        | 143 --------
 src/tet3/tcm/shared.mk.orig       | 175 ---------
 src/tet3/tcm/tcm.c.orig           | 355 ------------------
 src/tet3/tcm/tcmchild.c.orig      | 371 -------------------
 src/tet3/tcmshlib/makefile.orig   | 139 -------
 src/tet3/tcmthr/makefile.orig     | 129 -------
 13 files changed, 3801 deletions(-)
 delete mode 100644 src/perl/api.pl.orig
 delete mode 100644 src/perl/template.pl.orig
 delete mode 100644 src/tet3/apithr/thr_create.c.orig
 delete mode 100644 src/tet3/inetlib/poll.c.orig
 delete mode 100644 src/tet3/inetlib/rdwr.c.orig
 delete mode 100644 src/tet3/tccd/log.c.orig
 delete mode 100644 src/tet3/tcclib/lsdir.c.orig
 delete mode 100644 src/tet3/tcm/makefile.orig
 delete mode 100644 src/tet3/tcm/shared.mk.orig
 delete mode 100644 src/tet3/tcm/tcm.c.orig
 delete mode 100644 src/tet3/tcm/tcmchild.c.orig
 delete mode 100644 src/tet3/tcmshlib/makefile.orig
 delete mode 100644 src/tet3/tcmthr/makefile.orig

diff --git a/src/perl/api.pl.orig b/src/perl/api.pl.orig
deleted file mode 100644
index 03064854f277..000000000000
--- a/src/perl/api.pl.orig
+++ /dev/null
@@ -1,227 +0,0 @@
-# SCCS: @(#)api.pl     1.2 (97/07/15) TETware release 3.3
-
-# Copyright 1992 SunSoft, Inc.
-
-# Permission to use, copy, modify, and distribute this software and its
-# documentation for any purpose and without fee is hereby granted, provided
-# that the above copyright notice appear in all copies and that both that
-# copyright notice and this permission notice appear in supporting
-# documentation, and that the name of SunSoft, Inc. not be used in 
-# advertising or publicity pertaining to distribution of the software 
-# without specific, written prior permission.  SunSoft, Inc. makes
-# no representations about the suitability of this software for any purpose.  
-# It is provided "as is" without express or implied warranty.
-#
-# SunSoft, Inc. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, 
-# INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO 
-# EVENT SHALL SunSoft Inc. BE LIABLE FOR ANY SPECIAL, INDIRECT OR 
-# CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF 
-# USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 
-# OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 
-# PERFORMANCE OF THIS SOFTWARE.
-#
-# MODIFICATIONS:
-#
-#       Ranjan Das-Gupta, UNIX System Labs Inc, 1 Jul 1993
-#              Code review cleanup
-#
-#      Andrew Dingwall, UniSoft Ltd., June 1997
-#      Fixed a problem where a side effect of tet'delete tp1 was to
-#      undelete tp10, tp11, tp100 etc.
-#      Changed tet'reason so that it returns the reason string rather
-#      than printing it to stdout (NOTE that this is a significant change
-#      to the previous behaviour).
-#       Removed the private function get_reason (which only returned
-#      the first word of the reason string anyway).
-#      get_reason is obsoleted now that tet'reason works sensibly.
-#
-
-
-package tet;
-
-# set current context to process ID and reset block and sequence
-# usage: &setcontext()
-
-sub setcontext 
-{
-       if ($>!=$context) 
-       {
-               $context=$$;
-               $block=1;
-               $sequence=1;
-       }
-}
-
-# increment the current block ID, reset the sequence number to 1
-# usage: &setblock()
-
-sub setblock {
-       ++$block;
-       $sequence=1;
-}
-
-# print an information line to the execution results file
-# and increment the sequence number
-# usage: &infoline("<info>");
-
-sub infoline
-{
-       &output(520,"$tpnumber $context $block $sequence","$_[0]");
-       ++$sequence;
-}
-
-
-# print an error message & die
-# passed the routine name in question
-sub wrong_params
-{
-       die("wrong number of parameters passed to tet\'$_[0]");
-}
-       
-
-# record a test result for later emmision to the execution results file
-# by tet_tpend
-# usage: &result(result_name)
-# (note that a result name is expected, not a result code number)
-
-sub result 
-{
-       ($#_!=0) &&     &wrong_params("result");
-       if (&getcode($_[0])!=0) 
-      {
-               &error("invalid result name $_[0] passed to tet'result");
-               $_[0]="NORESULT";
-      }
-
-       print TMPRES "$_[0]\n";
-#      system("echo $_[0] >> $tmpres\n");
-       
-}
-
-# mark a test purpose as deleted
-# usage: delete(test_name,[reason]);
-# keep delete 'file' in perl var 'DELETES_FILE'
-sub delete 
-{
-       ($#_ < 0 || $#_ > 1) && &wrong_params("delete");
-       &undelete($_[0]);
-       if ($#_ > 0 && $_[1] ne "") {
-               @DELETES_FILE = (@DELETES_FILE, "$_[0] $_[1]");
-       }
-}
-
-# if a test purpose has been deleted, return the reason string that was
-# supplied in the tet'delete call; otherwise return an empty string
-# usage: reason(test_name)
-sub reason 
-{
-       local(@matches, $junk, $retval);
-       ($#_ != 0) && &wrong_params("reason");
-       @matches = grep(/^$_[0](\s+|$)/, @DELETES_FILE);
-       if ($#matches == -1) {
-               return("");
-       }
-       else {
-               ($junk, $retval) = split(/\s+/, $matches[0], 2);
-               return($retval);
-       }
-}
-
-       
-
-# ******************************************************************
-
-#
-# "private" functions for internal use by the shell API
-# these are not published interfaces and may go away one day
-#
-
-
-# getcode
-# look up a result code name in the result code definition file
-# return 0 if successful with the result number in TET_RESNUM and TET_ABORT
-# set to YES or NO
-# otherwise return 1 if the code could not be found
-
-sub getcode {
-       local($_);
-       
-       ($#_!=0) && &wrong_params("getcode");
-       $abort="NO";
-       $resnum=-1;
-
-       local($tet_a)=$_[0];
-
-       foreach(@TET_CODE_FILE) {
-               s/^#.*//;
-               if ( ! /^[       ]*$/) {
-                       split;
-                       $_[1] =~ s/\"//g;
-                       if ("$_[1]" eq "$tet_a") {
-                               $resnum=$_[0];
-                               $ABACTION=$_[2];
-                       }
-               }
-       }
-       if ($resnum==-1) {return(1);};
-
-       $_=$ABACTION;
-       G_SWITCH: {
-
-               /""|Continue/ && do { $abort="NO"; last G_SWITCH;};
-               /Abort/ && do { $abort="YES"; last G_SWITCH;};
-
-               &error("invalid action field $ABACTION in file $code\n");
-               $abort="NO";
-       }
-
-       0;
-}
-
-
-# tet_undelete - undelete a test purpose
-sub undelete
-{
-       ($#_ != 0) && &wrong_params("undelete");
-       local(@a) = @DELETES_FILE;
-       @DELETES_FILE = grep(!/^$_[0](\s+|$)/, @a);
-}
-
-
-# tet_error - print an error message to stderr and on TCM Message line
-sub error
-{
-       print STDERR "$PNAME: $_[0]\n";
-       if ("$activity"=="") { $activity=0;}
-       printf($JOURNAL_HANDLE "510|$activity|$_[0]\n");
-}
-
-# tet_output - print a line to the execution results file
-sub output {
-       local($_);
-       
-       #ensure no newline chars in data & line<512
-       local($arg1,$arg2,$arg3)=@_;
-       local($sp);
-       if (length($arg2)>0) {
-               $sp=" "; } else { $sp=""; }
-       if ("$activity"=="") { $activity=0;}
-       $_=sprintf("%d|%s%s%s|%s",$arg1,$activity,$sp,$arg2,$arg3);
-       s/\n//;
-       local($l)=0;
-       local($mess);
-       if (length()>511) {
-               $mess=
-                       sprintf("warning: results file line truncated: prefix: 
%d|%s%s%s|\n",
-                       $arg1,$activity,$sp,$arg2,$arg3);
-               $l=1;                   
-       }
-       printf($JOURNAL_HANDLE "%.511s\n",$_);
-
-       if ($l) { &error($mess);}
-       
-}
-
-1;
-
-package main;
diff --git a/src/perl/template.pl.orig b/src/perl/template.pl.orig
deleted file mode 100644
index 5951c54d7e45..000000000000
--- a/src/perl/template.pl.orig
+++ /dev/null
@@ -1,745 +0,0 @@
-# SCCS: @(#)template.pl        1.4 (97/07/15) TETware release 3.3
-#
-# Copyright 1992 SunSoft, Inc.
-
-# Permission to use, copy, modify, and distribute this software and its
-# documentation for any purpose and without fee is hereby granted, provided
-# that the above copyright notice appear in all copies and that both that
-# copyright notice and this permission notice appear in supporting
-# documentation, and that the name of SunSoft, Inc. not be used in 
-# advertising or publicity pertaining to distribution of the software 
-# without specific, written prior permission.  SunSoft, Inc. makes
-# no representations about the suitability of this software for any purpose.  
-# It is provided "as is" without express or implied warranty.
-#
-# SunSoft, Inc. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, 
-# INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO 
-# EVENT SHALL SunSoft Inc. BE LIABLE FOR ANY SPECIAL, INDIRECT OR 
-# CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF 
-# USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 
-# OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 
-# PERFORMANCE OF THIS SOFTWARE.
-#
-# Modifications:
-#
-# June 3rd 1993, Update version number to 1.10.1
-#
-# July 1st 1993, Code review cleanup
-#
-# November 1st 1993, Update version number to 1.10.2
-#
-# March 29th 1994, Update version number to 1.10.3
-#
-# December 1994, A.Josey, Novell USG
-# Update line 185 @main to be \@main for perl5.000 
-#
-# December 1994, A.Josey, Novell USG
-# Update for backwards compatibility to base TET1.10 with handling
-# of the tet_xres file. In TET_EXTENDED=T/t mode handle the journal
-# file using the ETET style. 
-#
-# August 1996, A.Josey, X/Open
-# For TETware, journal handling defaults to tet_xres only
-# for the moment 
-# Update the version number to 3.0a
-#
-# October 1996, Geoff Clare, UniSoft Ltd.
-# Moved uname stuff to make_tcm.pl (for Windows NT)
-#
-# June 1997, Andrew Dingwall, UniSoft Ltd.
-# get_reason() removed from api.pl.
-# Changed get_reason() call in this file to tet'reason().
-#
-# October 1999, Andrew Josey, The Open Group
-# Change close(<TMPRES>) to close(TMPRES) around line 374
-
-package tet;
-
-# DESCRIPTION:
-#      This file contains the support routines for the sequencing and control
-#      of invocable components and test purposes.
-#      It should be required (by means of the perl 'require' command) into a 
perl
-#      script containing definitions of the invocable components and test
-#      purposes that may be executed, after those definitions have been made.
-#      Test purposes may be written as perl functions.
-#
-#      This file 'requires' api.pl which contains the perl API functions.
-#
-#      The user-supplied shell variable iclist should contain a list of all
-#      the invocable components in the testset;
-#      these are named ic1, ic2 ... etc.
-#      For each invocable component thus specified, the user should define
-#      a variable whose name is the same as that of the component.
-#      Each such variable should contain the names of the test purposes
-#      associated with each invocable component; for example:
-#       @iclist=(ic1,ic2,ic3);
-#       @ic1=(test1-1,test1-2, test1-3);
-#       @ic2=(test2-1, test2-2);
-#
-#      The NUMBERS of the invocable components to be executed are specified
-#      on the command line.
-#      In addition, the user may define the variables $tet'startup and
-#      $tet'cleanup; if defined, the related functions 
-#      are executed at the start and end of processing, respectively.
-#
-#      The TCM makes the NAME of the currently executing test purpose
-#      available in the variable $tet'thistest.
-#
-#      The TCM reads configuration variables from the file specified by the
-#      TET_CONFIG environment variable; these are placed in the environment
-#      in the 'tet' package's namespace.
-#      This file (or the environment) should contain an assignment for
-#      TET_NSIG which should be set to one greater than the highest signal
-#      number supported by the implementation.
-#
-
-# standard signals - may not be specified in TET_SIG_IGN and TET_SIG_LEAVE     
-# SIGHUP, SIGINT, SIGQUIT, SIGILL, SIGABRT, SIGFPE, SIGPIPE, SIGALRM,
-# SIGUSR1, SIGUSR2, SIGTSTP, SIGCONT, SIGTTIN, SIGTTOU
-#@STD_SIGNAL_LIST=(1,2,3,4,6,8,13,14,15,16,17,25,26,27,28);
-
-@STD_SIGNAL_NAMES=(HUP,INT,QUIT,ILL,ABRT,FPE,PIPE,ALRM,USR1,USR2,TSTP,
-       CONT,TTIN,TTOU);
-
-# signals that are always unhandled
-# SIGSEGV is here as well because the shell can't trap it
-# SIGKILL, SIGSEGV, SIGCHLD, SIGSTOP
-#@SPEC_SIGNAL_LIST=(9,11,18,24);
-
-@SPEC_SIGNAL_NAMES=(KILL,SEGV,CHLD,STOP);
-
-# the make_tcm.pl utility edits these lines
-@signames=(__SIGNAMES__);
-$NSIG=__NSIG__;
-
-$#STD_SIGNAL_LIST=$#STD_SIGNAL_NAMES;
-for ($i=0; $i<=$#STD_SIGNAL_NAMES; ++$i) 
-{
-       $STD_SIGNAL_LIST[$i]=&signum($STD_SIGNAL_NAMES[$i]);
-}
-               
-
-$#SPEC_SIGNAL_LIST=$#SPEC_SIGNAL_NAMES;
-for ($i=0; $i<=$#SPEC_SIGNAL_NAMES; ++$i) 
-{
-       $SPEC_SIGNAL_LIST[$i]=&signum($SPEC_SIGNAL_NAMES[$i]);
-}
-               
-
-
-@std_signals=@STD_SIGNAL_LIST;
-@spec_signals=@SPEC_SIGNAL_LIST;
-
-@sig_leave=@sig_leave_list;
-@sig_ign=@sig_ignore_list;
-
-
-# TCM global variables
- 
-
-$thistest="";
-
-# 
-# "private" TCM variables
-#
-$tet'cwd=`pwd`;
-chop($cwd);
-$tet_tmp_dir=$ENV{"TET_TMP_DIR"};
-if ($tet_tmp_dir eq "")
-{
-       $tet_tmp_dir=$cwd;
-}
-@tmpfiles=();
-$tmpres="$tet_tmp_dir/tet_tmpres";
-$tet_lock_dir="$tet_tmp_dir/.tmpres";
-
-$context=0;
-$block=0;
-$sequence=0;
-$tpcount=0;
-$exitval=0;
-$version=1.1;
-$activity=$ENV{"TET_ACTIVITY"};
-$tpnumber=0;
-
-# ***********************************************************************
-#      compute tpnumbers for all test cases.
-#      use a associative array (easiest way in perl)
-#
-local($tpcounter)=1;
-local ($ic);
-foreach $ic (@main'iclist) {
-       local(@a)=eval("\@main'"."$ic");
-       local ($tp);
-       foreach $tp (@a) {
-               if (!defined($tp_ids{"$tp"})) {
-                       $tp_ids{"$tp"}=$tpcounter++;
-               }
-       }
-}
-#@k=keys %tp_ids;
-#@v=values %tp_ids;
-
-#print "k=@k\n";
-#print "v=@v\n";
-
-# ***********************************************************************
-  
-# 
-# "private" TCM function definitions
-# these interfaces may go away one day
-#
-
-# tet_ismember - return 0 if $1 is in the set $2 ... 
-# otherwise return 1
-
-sub ismember 
-{
-       local ($mem,*array) = @_;
-       local(@t)=grep("\b$mem\b", @array);
-       if ($#t>-1) { return 1; }
-       return 0;
-}
-
-
-
-
-# tet_setsigs - install traps for signals mentioned in TET_SIGNALS
-# if the action is ignore, the signal is ignored
-# if the action is default, the signal trap is $1
-# signal traps are passed the invoking signal number as argument
-sub setsigs {
-       local($_);
-       
-       ($#_!=0) && &wrong_params("setsigs");
-
-#      local($SIGFILE);
-       local($signum);
-
-#      while (<SIGFILE>) {
-       for ($signum=1;$signum<$NSIG;++$signum) {
-               # pattern match $_ to match a number, and a string
-#              ($signum,$_)=/(\d+)\s+(\S+)\s/;
-               $_=$signal_actions[$signum];
-               SETSIGS: {
-                       /leave/ && (last SETSIGS);
-
-                       /ignore/ && ($SIG{$signame[$signum]}='IGNORE', last 
SETSIGS);
-
-                       $SIG{$signame[$signum]}=$_[0];
-               }
-                       
-       }
-#      close(SIGFILE);
-       
-}
-
-
-
-# tet_defaultsigs - restore default action for signals mentioned in TET_SIGNALS
-# if the action is ignore, the signal is ignored
-# if the action is default, any existing signal trap is removed
-sub defaultsigs{
-       local($_);
-       
-
-#      local($SIGFILE);
-       local($signum);
-
-#      while (<SIGFILE>) {
-       for ($signum=1;$signum<$NSIG;++$signum) {
-               # pattern match $_ to match a number, and a string
-#              ($signum,$_)=/(\d+)\s+(\S+)\s/;
-               $_=$signal_actions[$signum];
-               SETSIGS: {
-                       /leave/ && (last SETSIGS);
-
-                       /ignore/ && ($SIG{$signame[$_]}='IGNORE', last SETSIGS);
-
-                       $SIG{$signame[$_]}='DEFAULT';
-               }
-                       
-       }
-#      close(SIGFILE);
-       
-}
-
-sub signum 
-{
-       ($#_!=0) && &wrong_params("signum");
-       local($i)=0;
-       for($i=0;$i<=$#signames;++$i) 
-       {
-               if ($signame[$i] eq $_[0])
-               {
-                       return $i;
-               }
-       }
-       return -1;
-}
-
-
-
-# tet_abandon - signal handler used during startup and cleanup
-sub abandon 
-{
-       local($sig)=@_;
-       if ($sig=="TERM") 
-       {
-               &sigterm($sig);
-       } 
-       else 
-       {
-               &error("Abandoning testset: caught unexpected signal $sig");
-       }
-       &cleanup;
-       exit(&signum($sig));
-}
-
-
-
-# tet_sigterm - signal handler for SIGTERM
-
-sub sigterm 
-{
-       local($sig)=@_;
-       &error("Abandoning test case: received signal $sig");
-       &docleanup;
-       exit(&signum($sig));
-}
-
-
-
-# tet_sigskip - signal handler used during test execution
-sub sigskip 
-{
-       local($sig)=@_;
-       &infoline("unexpected signal $sig received");
-       &result("UNRESOLVED");
-       if ($sig=="TERM") {
-               &sigterm($sig);
-       }
-}
-
-
-sub time {
-       ($sec,$min,$hour)=localtime;
-       $r=sprintf("%02d:%02d:%02d",$hour,$min,$sec);
-}
-
-
-
-# tet_tpend - report on a test purpose
-sub tpend 
-{
-       local($_);
-       
-       ($#_!=0) && &wrong_params("tpend");
-       local($arg)=$_[0];
-#      local($TMPRES);
-       $result="";
-       seek(TMPRES,0,0);
-       READLOOP: while (<TMPRES>) {
-               chop;
-               if ("$result" eq "") {
-                       $result="$_";
-                       next READLOOP;
-               }
-               PAT: {
-                       /PASS/ && (last PAT);
-
-                       /FAIL/ && ($result = $_, last PAT);
-
-                       /UNRESOLVED|UNINITIATED/ && do
-                               {if ("$result" ne FAIL) {
-                                       $result=$_;
-                               } last PAT;};
-
-                       /NORESULT/ && do
-                               {if ( $result eq FAIL || $result eq UNRESOLVED 
-                                       || $result eq UNINITIATED) {
-                                               $result=$_;
-                               }  last PAT;};
-
-                       /UNSUPPORTED|NOTINUSE|UNTESTED/ && do
-                               {if ($result eq PASS) {
-                                       $result=$_;
-                               } last PAT;};
-
-                       if (($result eq PASS) || ($result eq UNSUPPORTED) ||
-                               ($result eq NOTINUSE) || ($result eq UNTESTED) 
) {
-                               $result=$_;
-                       }
-               }
-       }
-
-       close(TMPRES);  # TMPRES deleted automagically
-
-       $abort="NO";
-       if ("$result" eq "") {
-               $result=NORESULT;
-               $resnum=7;
-       } elsif (&getcode($result)!=0) {     # sets $resnum & $abort
-               $result="NO RESULT NAME";
-               $resnum=-1;
-       }
-
-       $time=&time;
-       &output(220, "$arg $resnum $time", "$result");
-
-       if ($abort eq YES) {
-               &setsigs("tet'abandon");
-               &output(510,"","ABORT on result code $resnum \"$result\"");
-               if ($cleanup ne "") {
-                       &docleanup;
-               }
-               $exitval=1;
-               &cleanup;
-               exit($exitval);
-       }
-}
-
-sub docleanup{
-       $thistest="";
-       $tpcount=0;
-       $block=0;
-       &setblock;
-       if ("$cleanup" ne "") {
-               eval("&main'"."$cleanup");
-               $@ && ($@ =~ s/\(eval\) line (\d+)/$0 . 
-                       " line " . ($1+$start)/e, die $@);
-       }
-}
-
-
-
-sub cleanup{
-       unlink(@tmpfiles);
-}
-
-
-
-require "$ENV{\"TET_ROOT\"}/lib/perl/api.pl" ;
-
-#eval <<'End_of_Program';
-
-#args already in $0 and @ARGV
-
-#arrange to clean up on exit
-
-#init this here for lack of a better place
-@DELETES_FILE=();
-
-
-
-# check for journal file descriptor
-# note that JOURNAL_HANDLE is an indirect reference to the actual file handle
-# and is used that way in the API
-
-##$tet_ext_set=$ENV{"TET_EXTENDED"};
-##substr($tet_ext_set,1)='';
-
-##if ($tet_ext_set eq "T" || $tet_ext_set eq "t")
-##{
-##     $journal_path=$ENV{"TET_JOURNAL_PATH"};
-##}
-##else
-##{
-       $journal_path="tet_xres";
-##}
-
-if (!defined($journal_path)) 
-{
-       $journal_fd="/dev/tty";
-       $JOURNAL_HANDLE=STDOUT;
-}
-else 
-       {
-# always unlink tet_xres file
-       unlink(tet_xres);
-       if (open(JOURNAL_HANDLE_REAL,">>$journal_path")) {
-               $JOURNAL_HANDLE=JOURNAL_HANDLE_REAL;
-       } 
-else 
-       {
-               $JOURNAL_HANDLE=STDOUT;
-       }
-}
-
-#no matter what, make sure output is unbuffered.
-select((select($JOURNAL_HANDLE), $|=1)[0]);
-       
-
-
-
-# read in configuration variables and make them readonly
-# strip comments and other non-variable assignments
-# protect embedded spaces and single quotes in the value part
-#
-#
-
-$tet_config=$ENV{"TET_CONFIG"};
-
-
-if ($tet_config ne "" )
-{
-       if (-r $tet_config) {
-               local($FILE);
-               open(FILE,"<$tet_config");
-               while (<FILE>) {
-                       /^#/ && next;
-                       /^[\b]*$/ && next;
-                       !/^[^\b]+=/ && next;
-                       s/^/\$/;
-                       s/=(.*$)/=\"\1\";/;
-#                      print;
-                       eval;
-               }
-               close(FILE);
-       } else {
-               &error("can't read config file $tet_config");
-       }
-}
-
-
-       
-
-
-
-&setcontext;
-
-$code=$ENV{"TET_CODE"};
-
-if ("$code" eq "") {$code=tet_code;}
-
-
-local($TET_CODE_HANDLE);
-local($fail)=0;
-
-
-if (open(TET_CODE_HANDLE,"<$code")) {
-       @TET_CODE_FILE=<TET_CODE_HANDLE>;
-       close(TET_CODE_HANDLE);
-} else {
- 
-       if (tet_code ne "$code") {
-               &error("could not open results code file $code");
-       }
-       @TET_CODE_FILE=("0   PASS        Continue\n",
-               "1   FAIL        Continue\n",
-               "2   UNRESOLVED  Continue\n",
-               "3   NOTINUSE    Continue\n",
-               "4   UNSUPPORTED Continue\n",
-               "5   UNTESTED    Continue\n",
-               "6   UNINITIATED Continue\n",
-               "7   NORESULT    Continue\n");
-
-} 
-
-#process command-line args
-$pname=$0;
-
-if ($#ARGV<0) {$ARGV[0]="all";}
-
-$iclast = -1;
-#($iclist = $main'iclist)  =~ tr/" 0123456780"#/cd;
-@iclist=@main'iclist;
-
-if ($#iclist<0) {
-       &error("IClist is not defined");
-       die;
-}
-
-foreach(@iclist) {
-       tr/" 0123456789"//cd;
-}
-
-#if("$iclist" eq " ") {$iclist=0;}
-
-$icfirst_def=@iclist[0];
-#$icfirst_def =~ s/ .*//;
-
-$iccount=0;
-
-#split comma separate list into separate items
-foreach(@ARGV) {
-       local(@B)=split(/,/);
-       @A=(@A,@B);
-};
-
-@ARGV=@A;
-foreach(@ARGV) {
-       CASE_PAT: {
-               /all.*/ && do
-                       {
-                               if ($iclast<0) {
-                                       $icfirst=$icfirst_def;
-                                       foreach (@iclist) {
-                                               if ($_<$icfirst) { $icfirst=$_;}
-                                       }
-                               } else {
-                                       $icfirst=$iclast+1;
-                               }
-                               $iclast=$icfirst;
-                               $_=0;
-                               foreach(@iclist) {
-                                       if ($_>$iclast) {$iclast=$_;}
-                               }
-                               #if ($iclast>$_) {$iclast=$_;}
-                               last CASE_PAT;
-                       };
-               /.*/ && do
-                       {
-                               local($save)=$_;
-                               s/^([0-9]*).*/\$icfirst=\1;/;
-                               eval;
-                               $_=$save;
-                               s/^[^\-]*-*//;
-                               s/^([0-9]*).*/\$iclast=\1;/;
-                               s/=;/="";/;
-                               eval;
-                       };
-       }
-       
-       $icno=("$icfirst" eq "") ? $icfirst_def : $icfirst;
-
-
-       $iclast = ($iclast eq "") ? $icno : $iclast;
-
-       while ($icno <= $iclast) {
-               if (grep(/\b$icno\b/,@iclist)) {
-                       $a="\$#main'ic"."$icno";
-                       if (eval("\$#main'ic"."$icno") > -1) {
-                               $tests[$iccount++]="ic$icno";
-                       } else {
-                               &error("IC $icno is not defined for this test 
case\n");
-                       }
-               }
-               ++$icno;
-       }
-}
-
-
-# print startup message to execution results file
-&output(15,"3.3 $iccount","TCM Start");
-
-# do initial signal list processing
-$#sig_leave2=-1;
-foreach (@sig_leave)
-{
-       print "Process signal $_\n";
-       if (&ismember($_,$std_signal) || &ismember($_,$spec_signals)) {
-               &error("warning: illegal entry $_ in tet'sig_leave ignored");
-       } else {
-               $sig_leave2[$#sig_leave2+1]=$_;
-       }
-}
-
-$#sig_ign2=-1;
-foreach (@sig_ign)
-{
-       print "Process signal $_\n";
-       if (&ismember($_,$std_signal) || &ismember($_,$spec_signals)) {
-               &error("warning: illegal entry $_ in tet'sig_ign ignored");
-       } else {
-               $sig_ign2[$#sig_ign2+1]=$_;
-       }
-}
-
-@sig_leave2=(@sig_leave2,@spec_signals);
-
-$signal_actions[$NSIG-1]="";
-
-
-for (local($S)=1;$S<$NSIG;++$S){
-       if (&ismember($S,$sig_leave2)) {
-               $signal_actions[$S]=leave;
-       } elsif (&ismember($S,$sig_ign2)) {
-               $signal_actions[$S]=ignore;
-       } else {
-               $signal_actions[$S]=default;
-       }
-}
-
-
-#do startup processing
-&setsigs("tet'abandon");
-
-if ("$startup" ne "") 
-{
-       eval ("&main'"."$startup");
-       $@ && ($@ =~ s/\(eval\) line (\d+)/$0 . 
-               " line " . ($1+$start)/e, die $@);
-}
-
-for $icname (@tests) {
-       $icnumber=$icname;
-       $icnumber =~ s/[^0-9]*//;
-       $tpmax = $tpcount = eval("\$#main'"."$icname");
-       $@ && ($@ =~ s/\(eval\) line (\d+)/$0 . " line " . ($1+$start)/e, die 
$@);
-
-       ++$tpmax;
-       
-       $time=&time;
-       &output(400, "$icnumber $tpmax $time", "IC Start");
-       for ($tpcount=1; $tpcount<=$tpmax; ++$tpcount) {
-               $thistest=eval("\$main'"."$icname"."[$tpcount-1]");
-               $@ && ($@ =~ s/\(eval\) line (\d+)/$0 . 
-                       " line " . ($1+$start)/e, die $@);
-               local($tpnumber)=$tp_ids{$thistest};
-               $time=&time;
-               &output(200,"$tpnumber $time","TP Start");
-               &setcontext;
-
-#              using '$$' would allow for paralle processes to not lock from
-#              each other!
-
-               local($timeout_count)=17;
-
-               while (!mkdir("$tet_lock_dir",0700)) {
-                       sleep(1);
-                       if (--$timeout_count==0) {
-                               &error("can't obtain lock dir $tet_lock_dir");
-                               die;
-                       }
-               }
-               open(TMPRES,"+>$tmpres");
-               unlink("$tmpres");
-               rmdir("$tet_lock_dir");
-
-               if (($reason_string = &tet'reason($thistest)) ne "") {
-                       &infoline($reason_string);
-                       &result("UNINITIATED");
-               } else {
-                       &setsigs("tet'sigskip");
-                       {
-                               &defaultsigs;
-                               eval("\&main'"."$thistest");
-                               $@ && ($@ =~ s/\(eval\) line (\d+)/$0 . 
-                                       " line " . ($1+$start)/e, die $@);
-                       }
-               }
-               &tpend($tpnumber);
-       }
-       $time=&time;
-       --$tpcount;
-       &output(410,"$icnumber $tpcount $time","IC End");
-}
-
-&setsigs("tet'abandon");
-
-if ($cleanup ne "") {
-       &docleanup;
-}
-
-$TET_EXITVAL=0;
-&cleanup;
-exit(0);
-
-#End_of_Program
-
-&cleanup;
-
-$@ && ($@ =~ s/\(eval\) line (\d+)/$0 . " line " . ($1+$start)/e, die $@);
-
-exit($exitval);
diff --git a/src/tet3/apithr/thr_create.c.orig 
b/src/tet3/apithr/thr_create.c.orig
deleted file mode 100644
index c8ab2fc17707..000000000000
--- a/src/tet3/apithr/thr_create.c.orig
+++ /dev/null
@@ -1,541 +0,0 @@
-/*
- *     SCCS: @(#)thr_create.c  1.15 (98/08/28)
- *
- *     UniSoft Ltd., London, England
- *
- * (C) Copyright 1996 X/Open Company Limited
- *
- * All rights reserved.  No part of this source code may be reproduced,
- * stored in a retrieval system, or transmitted, in any form or by any
- * means, electronic, mechanical, photocopying, recording or otherwise,
- * except as stated in the end-user licence agreement, without the prior
- * permission of the copyright owners.
- * A copy of the end-user licence agreement is contained in the file
- * Licence which accompanies this distribution.
- * 
- * X/Open and the 'X' symbol are trademarks of X/Open Company Limited in
- * the UK and other countries.
- */
-
-/************************************************************************
-
-SCCS:          @(#)thr_create.c        1.15 98/08/28 TETware release 3.3
-NAME:          'C' API start new thread function
-PRODUCT:       TETware
-AUTHOR:                Geoff Clare, UniSoft Ltd.
-DATE CREATED:  July 1996
-SYNOPSIS:
-
-    UI Threads:
-       int     tet_thr_create(void *stack_base, size_t stack_size,
-                       void *(*start_routine)(void *), void *arg,
-                       long flags, thread_t *new_thread, int waittime);
-
-    POSIX Threads:
-       int     tet_pthread_create(pthread_t *new_thread,
-                       pthread_attr_t *attr,
-                       void *(*start_routine)(void *), void *arg,
-                       int waittime);
-
-    NT Threads:
-       unsigned long tet_beginthreadex(void *security,
-                       unsigned int stack_size,
-                       unsigned int (__stdcall *start_routine)(void *),
-                       void *arg, unsigned int flags,
-                       unsigned int *new_thread, int waittime);
-
-    All Threads:
-       void    tet_cln_threads(int signum);
-       void    tet_thrtab_reset(void);
-
-DESCRIPTION:
-
-       Tet_thr_create(), tet_pthread_create() and tet_beginthreadex() are
-       wrappers for thr_create(), pthread_create() and _beginthreadex()
-       respectively.  They store information about the new thread for use
-       by the TCM.  The waittime argument specifies the time (in seconds)
-       to wait for the thread to die if it is still active when the main
-       thread returns to the TCM.
-
-       Calls to tet_setblock() are made to distinguish journal output
-       from the new thread and from the calling thread before and
-       after creation of the new thread.
-
-       Tet_cln_threads() and tet_thrtab_reset() are not part of the
-       API.  They are used internally to clean up left-over threads
-       and to empty the thread table respectively.
-
-MODIFICATIONS:
-
-       Geoff Clare, UniSoft Ltd., September 1996
-       Added tet_pthread_create().
-
-       Geoff Clare, UniSoft Ltd., Oct 1996
-       Use TET_THR_EQUAL() to compare thread IDs.
-
-       Geoff Clare, UniSoft Ltd., June-July 1997
-       Changes to support NT threads.
-
-       Geoff Clare, UniSoft Ltd., December 1997
-       Support for threads implementations which may re-use a
-       thread ID immediately a previously allocated thread ID becomes
-       available.
-
-       Andrew Dingwall, UniSoft Ltd., February 1998
-       Use TETware-specific macros to access threads functions and
-       data items.
-
-       Andrew Dingwall, UniSoft Ltd., July 1998
-       Added support for shared API libraries.
-
-       Aaron Plattner, April 2010
-       Fixed warnings when compiled with GCC's -Wall option.
-
-************************************************************************/
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <sys/types.h>
-#  include <unistd.h>
-#  include <signal.h>
-#include <errno.h>
-#include <time.h>
-#include "dtmac.h"
-#include "dtthr.h"
-#include "sigsafe.h"
-#include "alarm.h"
-#include "error.h"
-#include "llist.h"
-#include "tet_api.h"
-#include "apilib.h"
-
-#ifndef NOTRACE
-#  include "ltoa.h"
-#endif
-
-#define KILLWAIT       5       /* seconds to wait for child to exit */
-#define THRKILLWAIT    12      /* secs to wait for thread after forcing
-                                  it to exit (should be > 2*KILLWAIT) */
-
-extern tet_mutex_t tet_thrtab_mtx;
-extern tet_mutex_t tet_thrwait_mtx;
-
-/* Thread table */
-struct thrtab {
-        struct thrtab *next;     /* ptr to next element - must be 1st */
-       struct thrtab *last;     /* ptr to previous element - must be 2nd */
-       tet_thread_t tid;
-       int waittime;
-};
-static struct thrtab *thrtab;
-
-struct wrap_arg {
-       void *(*start_routine)();
-       void *arg;
-};
-
-struct clnarg {
-       tet_thread_t tid;
-       int waittime;
-};
-
-static tet_thread_t    target_tid;
-static struct sigaction        oldsigact;
-static tet_cond_t      thrwait_cv;
-static int             joined;
-
-static void *  cln_thr2();
-static int     ttadd();
-
-static
-  void *
-start_wrapper(vwrap_arg)
-void *vwrap_arg;
-{
-       /* wrapper for user-specified thread start routine */
-
-       struct wrap_arg *wrap_arg = vwrap_arg;
-       void *(*start_routine)();
-       void *arg;
-       int newerrno = 0;
-       long newblock = 0;
-       long newsequence = 0;
-       int newchild = 0;
-       int newalrm_flag = 0;
-
-       /* set thread-specific data for new thread */
-       TET_THR_SETSPECIFIC(tet_errno_key, (void *)&newerrno);
-       TET_THR_SETSPECIFIC(tet_block_key, (void *)&newblock);
-       TET_THR_SETSPECIFIC(tet_sequence_key, (void *)&newsequence);
-       TET_THR_SETSPECIFIC(tet_child_key, (void *)&newchild);
-       TET_THR_SETSPECIFIC(tet_alrm_flag_key, (void *)&newalrm_flag);
-
-       tet_setblock();
-
-       start_routine = wrap_arg->start_routine;
-       arg = wrap_arg->arg;
-       TRACE2(tet_Tbuf, 6, "free wrap_arg = %s", tet_i2x(wrap_arg));
-       free((void *)wrap_arg);
-
-       return (*start_routine)(arg);
-}
-
-#  ifndef TET_POSIX_THREADS
-int
-tet_thr_create(stack_base, stack_size, start_routine, arg, flags,
-               new_thread, waittime)
-void *stack_base;
-size_t stack_size;
-void *(*start_routine)();
-void *arg;
-long flags;
-thread_t *new_thread;
-int waittime;
-#  else /* TET_POSIX_THREADS */
-int
-tet_pthread_create(new_thread, attr, start_routine, arg, waittime)
-pthread_t *new_thread;
-pthread_attr_t *attr;
-void *(*start_routine)();
-void *arg;
-int waittime;
-#  endif /* TET_POSIX_THREADS */
-{
-       tet_thread_t tid;
-       struct wrap_arg *wrap_arg;
-       struct thrtab *ttp;
-       int rtval;
-       int detached;
-
-       /* no API_LOCK here */
-
-       if (!start_routine)
-               return EINVAL;
-
-       /* put start routine and its argument in an argument to wrapper */
-
-       wrap_arg = (struct wrap_arg *) malloc(sizeof(*wrap_arg));
-       if (wrap_arg == NULL)
-               return ENOMEM;
-       TRACE2(tet_Tbuf, 6, "allocate wrap_arg = %s", tet_i2x(wrap_arg));
-       wrap_arg->start_routine = start_routine;
-       wrap_arg->arg = arg;
-
-       /* allocate a new entry in thread table, if not detached */
-
-#  ifndef TET_POSIX_THREADS
-       detached = (flags & THR_DETACHED);
-#  else
-       {
-               int dstate;
-               if (attr != NULL &&
-                   pthread_attr_getdetachstate(attr, &dstate) == 0)
-                       detached = (dstate == PTHREAD_CREATE_DETACHED);
-               else
-                       detached = 0;
-       }
-#  endif /* TET_POSIX_THREADS */
-
-       if (!detached)
-       {
-               ttp = (struct thrtab *) malloc(sizeof(*ttp));
-               if (ttp == NULL)
-               {
-                       TRACE2(tet_Tbuf, 6, "free wrap_arg = %s",
-                               tet_i2x(wrap_arg));
-                       free((void *)wrap_arg);
-                       return ENOMEM;
-               }
-               TRACE2(tet_Tbuf, 6, "allocate thrtab entry = %s", tet_i2x(ttp));
-       }
-
-/* ????
- * should block tet_blockable_sigs here? (and unblock after
- * thrtab update) - means passing old sigset to wrapper
- */
-
-#  ifndef TET_POSIX_THREADS
-       rtval = thr_create(stack_base, stack_size, start_wrapper,
-               (void *)wrap_arg, flags, &tid);
-#  else
-       rtval = pthread_create(&tid, attr, start_wrapper, (void *)wrap_arg);
-#  endif /* TET_POSIX_THREADS */
-
-       if (!detached)
-       {
-               int added = 0;
-
-               if (rtval == 0)
-               {
-                       /* store new thread ID and waittime in table */
-                       ttp->tid = tid;
-                       ttp->waittime = waittime;
-                       added = ttadd(ttp);
-               }
-
-               if (!added)
-               {
-                       TRACE2(tet_Tbuf, 6, "free thrtab entry = %s",
-                               tet_i2x(ttp));
-                       free((void *)ttp);
-               }
-       }
-
-       if (new_thread)
-               *new_thread = tid;
-
-       tet_setblock();
-
-       /* wrap_arg is freed in start_wrapper after it has finished with it */
-
-       return rtval;
-}
-
-
-static void
-do_oldabort(sig)
-int sig;
-{
-       /* wrong thread received SIGABRT signal - try to do what it
-          would have done */
-
-       sigaction(SIGABRT, &oldsigact, (struct sigaction *)NULL);
-       if (oldsigact.sa_handler == SIG_DFL)
-       {
-               abort();
-               fatal(0, "abort() returned!!!", (char *)0);
-       }
-       else if (oldsigact.sa_handler != SIG_IGN)
-       {
-               /* hope it wasn't expecting more arguments */
-               (*oldsigact.sa_handler)(sig);
-       }
-       /* else SIG_IGN: all we can do is return (something might get EINTR) */
-}
-
-static void
-make_thr_exit(sig)
-int sig;
-{
-       /* signal handler used to force the target thread to exit when
-          it is sent a SIGABRT with TET_THR_KILL() */
-
-       if (!TET_THR_EQUAL(TET_THR_SELF(), target_tid))
-       {
-               do_oldabort(sig);
-               return;
-       }
-
-       if (tet_child > 0)
-               tet_killw(tet_child, KILLWAIT);
-
-       TET_THR_EXIT((void *)0);
-}
-
-TET_IMPORT void tet_cln_threads(signum)
-int signum;
-{
-       /* clean up any left-over threads */
-
-       tet_thread_t tid2;
-       time_t start_time;
-       int err, waittime = 0;
-       struct thrtab *ttp, *ttpnext;
-       struct clnarg arg;
-
-       if (signum == 0)
-               start_time = time((time_t *)0);
-
-       MTX_LOCK(&tet_thrtab_mtx);
-
-       TET_COND_INIT(&thrwait_cv);
-
-       for (ttp = thrtab; ttp; ttp = ttpnext)
-       {
-               ttpnext = ttp->next; /* save value before ttp is removed */
-
-               /* If we are cleaning up on receiving a signal, leave
-                  wait time as zero, otherwise use wait time specified
-                  in the original tet_thr_create() call (minus the time
-                  since the TP ended). */
-               if (signum == 0)
-                       waittime = ttp->waittime - 
-                                  (time((time_t *)0) - start_time);
-
-               joined = 0;
-
-               /* call cln_thr2() in a new thread */
-               arg.tid = ttp->tid;
-               arg.waittime = waittime;
-               if ((err = TET_THR_CREATE(cln_thr2, (void *) &arg, &tid2)) != 0)
-                       fatal(err, "thr_create() failed in tet_cln_threads()",
-                               (char *)0);
-
-               /*
-                * If the target thread exits within waittime, cln_thr2
-                * will see this via TET_COND_TIMEDWAIT() and will return.
-                * If not, it will try to force the target thread to exit
-                * from a SIGABRT signal handler, and will do another
-                * TET_COND_TIMEDWAIT().  If the target thread is blocking
-                * SIGABRT the TET_THR_JOIN() below will hang and cln_thr2
-                * will time out on a second TET_COND_TIMEDWAIT().  If this
-                * happens we give up - we could arrange to longjmp out of
-                * the TET_THR_JOIN(), but this would leave a rogue thread
-                * which could interfere with later TP's.
-                */
-
-               if (!TET_THR_EQUAL(ttp->tid, tid2))
-                       TET_THR_JOIN(ttp->tid, (void **) NULL);
-               TET_MUTEX_LOCK(&tet_thrwait_mtx);
-               joined = 1;
-               TET_COND_SIGNAL(&thrwait_cv);
-               TET_MUTEX_UNLOCK(&tet_thrwait_mtx);
-               TET_THR_JOIN(tid2, (void **) NULL);
-               tet_listremove((struct llist **) &thrtab, (struct llist *) ttp);
-               TRACE2(tet_Tbuf, 6, "free thrtab entry = %s", tet_i2x(ttp));
-               free((void *)ttp);
-       }
-       thrtab = NULL;
-
-       TET_COND_DESTROY(&thrwait_cv);
-
-       MTX_UNLOCK(&tet_thrtab_mtx);
-}
-
-static void *
-cln_thr2(arg)
-void *arg;
-{
-       /* force the specified thread to exit, after timeout of waittime
-          (this function is executed in a new thread) */
-
-       struct clnarg *carg = (struct clnarg *)arg;
-       struct sigaction sa;
-       tet_timestruc_t abstime;
-       int err;
-
-       if (carg->waittime > 0)
-       {
-               TET_MUTEX_LOCK(&tet_thrwait_mtx);
-               abstime.tv_sec = time((time_t *)0) + carg->waittime;
-               abstime.tv_nsec = 0;
-               while (!joined)
-               {
-                       err = TET_COND_TIMEDWAIT(&thrwait_cv,
-                               &tet_thrwait_mtx, &abstime);
-                       if (err != EINTR)
-                               break;
-               }
-               if (joined)
-                       err = 0;
-               TET_MUTEX_UNLOCK(&tet_thrwait_mtx);
-               if (err == 0)
-                       return (void *)0;
-       }
-
-       /* Install a SIGABRT handler which calls TET_THR_EXIT() and send the
-          target thread a SIGABRT.  Don't restore the old handler until
-          we know our handler has been executed */
-       target_tid = carg->tid;
-       sa.sa_handler = make_thr_exit;
-       sa.sa_flags = 0; 
-       sigemptyset(&sa.sa_mask);
-       sigaction(SIGABRT, &sa, &oldsigact);
-       err = TET_THR_KILL(carg->tid, SIGABRT);
-       switch (err)
-       {
-       case 0:
-               break;
-       case ESRCH:
-               /* thread has gone away already */
-               sigaction(SIGABRT, &oldsigact, (struct sigaction *)0);
-               return (void *)0;
-       default:
-               fatal(err, "TET_THR_KILL() failed in cln_thr2()", (char *)0);
-       }
-
-       TET_MUTEX_LOCK(&tet_thrwait_mtx);
-       abstime.tv_sec = time((time_t *)0) + THRKILLWAIT;
-       abstime.tv_nsec = 0;
-       while (!joined)
-       {
-               err = TET_COND_TIMEDWAIT(&thrwait_cv, &tet_thrwait_mtx,
-                       &abstime);
-               if (err != EINTR)
-                       break;
-       }
-       if (joined)
-               err = 0;
-       TET_MUTEX_UNLOCK(&tet_thrwait_mtx);
-       if (err == 0)
-               sigaction(SIGABRT, &oldsigact, (struct sigaction *)0);
-       else if (err != ETIME)
-               fatal(err, "TET_COND_TIMEDWAIT() failed in cln_thr2()",
-                       (char *) 0);
-       else
-               fatal(0, "cln_thr2() caller thread did not return from 
TET_THR_JOIN()",
-                       (char *)0);
-
-       return (void *)0;
-}
-
-
-void
-tet_thrtab_reset()
-{
-       /* empty the thread table */
-
-       struct thrtab *ttp, *ttpnext;
-
-       /* no MTX_LOCK here - function only called when just one thread
-          exists, e.g. in child after fork1(), and/or when thrtab mutex
-          is already locked */
-
-       for (ttp = thrtab; ttp; ttp = ttpnext)
-       {
-               ttpnext = ttp->next;
-               tet_listremove((struct llist **) &thrtab, (struct llist *) ttp);
-               free((void *)ttp);
-       }
-       thrtab = NULL;
-}
-
-static int
-ttadd(newttp)
-struct thrtab *newttp;
-{
-       /* add or update a thread in the thread table */
-       /* return 1 if entry added, 0 if existing entry updated */
-
-       register struct thrtab *ttp;
-       int added = 0;
-
-       MTX_LOCK(&tet_thrtab_mtx);
-
-       /* check if the tid/handle is already in the list
-          (thread ID's can be reused) */
-
-       for (ttp = thrtab; ttp; ttp = ttp->next)
-               if (
-                   TET_THR_EQUAL(ttp->tid, newttp->tid)
-               )
-                       break;
-
-       if (ttp)
-       {
-               /* update the existing entry */
-               *ttp = *newttp;
-       }
-       else
-       {
-               /* insert new entry */
-               tet_listinsert((struct llist **) &thrtab,
-                       (struct llist *) newttp);
-               added = 1;
-       }
-
-       MTX_UNLOCK(&tet_thrtab_mtx);
-
-       return added;
-}
-
diff --git a/src/tet3/inetlib/poll.c.orig b/src/tet3/inetlib/poll.c.orig
deleted file mode 100644
index cc5da41caefc..000000000000
--- a/src/tet3/inetlib/poll.c.orig
+++ /dev/null
@@ -1,219 +0,0 @@
-/*
- *      SCCS:  @(#)poll.c      1.9 (98/09/01) 
- *
- *     UniSoft Ltd., London, England
- *
- * (C) Copyright 1992 X/Open Company Limited
- *
- * All rights reserved.  No part of this source code may be reproduced,
- * stored in a retrieval system, or transmitted, in any form or by any
- * means, electronic, mechanical, photocopying, recording or otherwise,
- * except as stated in the end-user licence agreement, without the prior
- * permission of the copyright owners.
- *
- * X/Open and the 'X' symbol are trademarks of X/Open Company Limited in
- * the UK and other countries.
- */
-
-/************************************************************************
-
-SCCS:          @(#)poll.c      1.9 98/09/01 TETware release 3.3
-NAME:          poll.c
-PRODUCT:       TETware
-AUTHOR:                Andrew Dingwall, UniSoft Ltd.
-DATE CREATED:  April 1992
-
-DESCRIPTION:
-       required transport-specific library interface
-
-       poll remote process connections for the posibility of i/o
-
-MODIFICATIONS:
-       Andrew Dingwall, UniSoft Ltd., November 1992
-       AIX-specific modifications.
-
-       Andrew Dingwall, UniSoft Ltd., July 1998
-       Now that AIX is UNIX98-compliant we don't need the AIX-specific
-       modifications any more.
-       Provision of FD_SET macro and friends now only if _XOPEN_SOURCE
-       is not defined.
-
-       Aaron Plattner, April 2010
-       Fixed warnings when compiled with GCC's -Wall option.
-
-************************************************************************/
-
-#include <errno.h>
-#include <sys/types.h>
-#  if defined(_AIX) && !defined(_XOPEN_SOURCE)
-#    include <sys/select.h>
-#  endif /* _AIX */
-#  include <sys/time.h>
-#  include <netinet/in.h>
-#include "dtmac.h"
-#include "dtmsg.h"
-#include "ptab.h"
-#include "error.h"
-#include "tptab_in.h"
-#include "server_in.h"
-#include "tslib.h"
-
-#ifndef NOTRACE
-#include "ltoa.h"
-#endif
-
-
-/*
-** compatability for systems with pre-BSD4.3 select() call -
-**     only one long in fd_set
-**
-** in UniPlus V.2, fd_set is already typedefed in <sys/types.h>
-** on systems where this is not done, you will need something like
-**
-**     typedef struct { long fd_bits[1]; } fd_set;
-**
-** here as well
-*/
-
-#ifndef _XOPEN_SOURCE
-#    ifndef FD_SET
-
-#      define  FD_SET(n, p)    ((p)->fds_bits[0] |= (1L << (n)))
-#      define  FD_CLR(n, p)    ((p)->fds_bits[0] &= ~(1L << (n)))
-#      define  FD_ISSET(n, p)  ((p)->fds_bits[0] & (1L << (n)))
-#      define  FD_ZERO(p)      ((p)->fds_bits[0] = 0L)
-
-#    endif /* FD_SET */
-#endif /* !_XOPEN_SOURCE */
-
-/*
-**     tet_ts_poll() - poll for connection attempts, and pending i/o
-**             to/from connected processes in the ptab list at *pp
-**
-**     return  1 if there is at least one i/o request to service
-**             0 if no requests arrive before the timeout expires
-**             -1 on error
-*/
-
-int tet_ts_poll(pp, timeout)
-struct ptab *pp;
-int timeout;
-{
-       register struct ptab *q;
-       register struct tptab *tp;
-       fd_set rfds, wfds, rd, wd;
-       int nfds, nfound, err;
-       struct timeval tv;
-       register struct timeval *tvp;
-       extern SOCKET tet_listen_sd;
-
-       TRACE2(tet_Tio, 4, "tet_ts_poll: timeout = %s", tet_i2a(timeout));
-
-       /* clear descriptor masks for select -
-               arrange to receive new connection notification */
-       FD_ZERO(&rfds);
-       FD_ZERO(&wfds);
-       if (tet_listen_sd != INVALID_SOCKET) {
-               TRACE2(tet_Tio, 6, "poll listen sd %s for reading",
-                       tet_i2a(tet_listen_sd));
-               FD_SET(tet_listen_sd, &rfds);
-               nfds = tet_listen_sd + 1;
-       }
-       else
-               nfds = 0;
-
-       /* set fd_set bits according to process state */
-       for (q = pp; q; q = q->pt_next) {
-               ASSERT(q->pt_magic == PT_MAGIC);
-               tp = (struct tptab *) q->pt_tdata;
-               if (tp->tp_sd == INVALID_SOCKET)
-                       continue;
-               switch (q->pt_state) {
-               case PS_IDLE:
-                       q->pt_state = PS_RCVMSG;
-                       /* fall through */
-               case PS_RCVMSG:
-                       TRACE2(tet_Tio, 6, "poll sd %s for reading",
-                               tet_i2a(tp->tp_sd));
-                       FD_SET(tp->tp_sd, &rfds);
-                       if (tp->tp_sd >= nfds)
-                               nfds = tp->tp_sd + 1;
-                       break;
-               case PS_CONNECT:
-               case PS_SNDMSG:
-                       TRACE2(tet_Tio, 6, "poll sd %s for writing",
-                               tet_i2a(tp->tp_sd));
-                       FD_SET(tp->tp_sd, &wfds);
-                       if (tp->tp_sd >= nfds)
-                               nfds = tp->tp_sd + 1;
-                       break;
-               }
-       }
-
-       /* set select timeout */
-       if (timeout >= 0) {
-               tv.tv_sec = timeout;
-               tv.tv_usec = 0;
-               tvp = &tv;
-       }
-       else
-               tvp = (struct timeval *) 0;
-
-       /* do the select operation -
-               we use temporary copies of rfds and wfds because they
-               get trashed if select returns with EINTR */
-       do {
-               TRACE3(tet_Tio, 8, "select: rfds = %s, wfds = %s",
-                       tet_l2x(rfds.fds_bits[0]), tet_l2x(wfds.fds_bits[0]));
-               rd = rfds;
-               wd = wfds;
-               err = 0;
-               if ((nfound = select(nfds, &rd, &wd, (fd_set *) 0, tvp)) == 
SOCKET_ERROR)
-                       err = SOCKET_ERRNO;
-       } while (nfound == SOCKET_ERROR && err == SOCKET_EINTR);
-       rfds = rd;
-       wfds = wd;
-
-       if (nfound >= 0)
-               TRACE2(tet_Tio, 6, "select returns %s", tet_i2a(nfound));
-
-       if (nfound == SOCKET_ERROR) {
-               error(err, "select() failed", (char *) 0);
-               return(-1);
-       }
-       else if (nfound == 0)
-               return(0);
-
-       /* accept a new connection if one is pending on the listen socket */
-       if (tet_listen_sd != INVALID_SOCKET && FD_ISSET(tet_listen_sd, &rfds)) {
-               TRACE1(tet_Tio, 6, "i/o possible on listen sd");
-               FD_CLR(tet_listen_sd, &rfds);
-               tet_ss_tsaccept();
-               nfound--;
-       }
-
-       /* arrange to service processes where i/o is possible */
-       for (q = pp; q && nfound >= 0; q = q->pt_next) {
-               ASSERT(q->pt_magic == PT_MAGIC);
-               tp = (struct tptab *) q->pt_tdata;
-               if (FD_ISSET(tp->tp_sd, &wfds)) {
-                       TRACE2(tet_Tio, 6, "i/o possible on write sd %s",
-                               tet_i2a(tp->tp_sd));
-                       nfound--;
-                       if (q->pt_state == PS_CONNECT) {
-                               q->pt_state = PS_SNDMSG;
-                               q->pt_flags = (q->pt_flags & ~PF_INPROGRESS) | 
PF_CONNECTED;
-                       }
-                       q->pt_flags |= PF_ATTENTION;
-               }
-               if (FD_ISSET(tp->tp_sd, &rfds)) {
-                       TRACE2(tet_Tio, 6, "i/o possible on read sd %s",
-                               tet_i2a(tp->tp_sd));
-                       nfound--;
-                       q->pt_flags |= PF_ATTENTION;
-               }
-       }
-
-       return(1);
-}
-
diff --git a/src/tet3/inetlib/rdwr.c.orig b/src/tet3/inetlib/rdwr.c.orig
deleted file mode 100644
index 9b9a06feb305..000000000000
--- a/src/tet3/inetlib/rdwr.c.orig
+++ /dev/null
@@ -1,472 +0,0 @@
-/*
- *      SCCS:  @(#)rdwr.c      1.14 (98/09/01) 
- *
- *     UniSoft Ltd., London, England
- *
- * (C) Copyright 1992 X/Open Company Limited
- *
- * All rights reserved.  No part of this source code may be reproduced,
- * stored in a retrieval system, or transmitted, in any form or by any
- * means, electronic, mechanical, photocopying, recording or otherwise,
- * except as stated in the end-user licence agreement, without the prior
- * permission of the copyright owners.
- *
- * X/Open and the 'X' symbol are trademarks of X/Open Company Limited in
- * the UK and other countries.
- */
-
-/************************************************************************
-
-SCCS:          @(#)rdwr.c      1.14 98/09/01 TETware release 3.3
-NAME:          rdwr.c
-PRODUCT:       TETware
-AUTHOR:                Andrew Dingwall, UniSoft Ltd.
-DATE CREATED:  April 1992
-
-DESCRIPTION:
-       required transport-specific library interfaces
-
-       functions to perform i/o on remote process connections
-
-MODIFICATIONS:
-       Geoff Clare, UniSoft Ltd., August 1996
-       Changes for TETware.
-
-       Geoff Clare, UniSoft Ltd., Sept 1996
-       Ignore SIGPIPE instead of catching it.
-
-       Andrew Dingwall, UniSoft Ltd., February 1998
-       Use TETware-specific macros to access threads functions and
-       data items.
-
-       Andrew Dingwall, UniSoft Ltd., July 1998
-       Added support for shared API libraries.
-
-       Aaron Plattner, April 2010
-       Fixed warnings when compiled with GCC's -Wall option.
-
-************************************************************************/
-
-#include <stdio.h>
-#include <sys/types.h>
-#include <errno.h>
-#  include <signal.h>
-#  include <unistd.h>
-#  include <netinet/in.h>
-#include "dtmac.h"
-#include "dtmsg.h"
-#include "dtthr.h"
-#include "ptab.h"
-#include "tptab_in.h"
-#include "bstring.h"
-#include "error.h"
-#include "ltoa.h"
-#include "dtetlib.h"
-#include "tslib.h"
-#include "server_bs.h"
-
-#ifndef NOTRACE
-static char msghdr[] = "message header";
-static char msgdata[] = "message data";
-#endif
-
-/* declarations for static functions */
-static int doread PROTOLIST((struct ptab *));
-static int bs2md PROTOLIST((char *, struct ptab *));
-static int md2bs PROTOLIST((struct ptab *));
-
-
-/*
-**     tet_ts_rcvmsg() - recieve an inet message on a socket with
-**             at least some data to read
-**
-**     set one of PF_INPROGRESS, PF_IODONE or PF_IOERR on return
-**     change connected process state to PS_DEAD on EOF
-**
-**     return an ER_ code to show the state of the local receive processing
-*/
-
-int tet_ts_rcvmsg(pp)
-register struct ptab *pp;
-{
-       register struct tptab *tp = (struct tptab *) pp->pt_tdata;
-       register int rc;
-
-       /* set up variables if first attempt to read this message */
-       if ((pp->pt_flags & PF_INPROGRESS) == 0) {
-               tp->tp_cnt = DM_HDRSZ;
-               tp->tp_ptr = tp->tp_buf;
-               pp->pt_flags |= (PF_INPROGRESS | PF_RCVHDR);
-               TRACE2(tet_Tio, 4, "rcvmsg: read %s bytes header",
-                       tet_i2a(tp->tp_cnt));
-       }
-
-       /* process the next bit of the message */
-       switch (pp->pt_flags & PF_RCVHDR) {
-       case PF_RCVHDR:
-               /* read the message header */
-               if ((rc = doread(pp)) <= 0) {
-                       if (rc < 0)
-                               pp->pt_flags &= ~PF_RCVHDR;
-                       return(ER_OK);
-               }
-               TDUMP(tet_Tio, 10, tp->tp_buf, DM_HDRSZ, msghdr);
-               pp->pt_flags &= ~PF_RCVHDR;
-               tet_bs2dtmhdr(tp->tp_buf, &pp->ptm_hdr, DM_HDRSZ);
-               if (pp->ptm_magic != DTM_MAGIC && pp->ptm_len) {
-                       /* we are probably out of sync with sender */
-                       error(0, "received bad message header,",
-                               "ignored message data");
-                       pp->ptm_len = 0;
-               }
-               if (pp->ptm_len <= 0) {
-                       /* no data portion */
-                       pp->pt_flags |= PF_IODONE;
-                       return(ER_OK);
-               }
-               if (BUFCHK(&tp->tp_buf, &tp->tp_len, pp->ptm_len) < 0) {
-                       /* can't grow data buffer */
-                       pp->pt_flags |= PF_IODONE;
-                       return(ER_ERR);
-               }
-               pp->pt_flags |= PF_INPROGRESS;
-               tp->tp_ptr = tp->tp_buf;
-               tp->tp_cnt = pp->ptm_len;
-               TRACE2(tet_Tio, 4, "rcvmsg: read %s bytes data",
-                       tet_i2a(tp->tp_cnt));
-               /* fall through */
-       default:
-               /* read the message data */
-               if (doread(pp) <= 0)
-                       return(ER_OK);
-               TDUMP(tet_Tio, 10, tp->tp_buf, pp->ptm_len, msgdata);
-               if ((rc = bs2md(tp->tp_buf, pp)) != ER_OK) {
-                       pp->pt_flags |= PF_IODONE;
-                       return(rc);
-               }
-               pp->pt_flags |= PF_IODONE;
-               break;
-       }
-
-       return(ER_OK);
-}
-
-/*
-**     doread() - common read processing for both header and data
-**
-**     return  1 when done
-**             0 for not done
-**             -1 on error
-*/
-
-static int doread(pp)
-register struct ptab *pp;
-{
-       register struct tptab *tp = (struct tptab *) pp->pt_tdata;
-       register int cnt, rc = -1;
-       int err;
-
-       TRACE3(tet_Tio, 4, "doread: expect %s bytes on sd %s",
-               tet_i2a(tp->tp_cnt), tet_i2a(tp->tp_sd));
-
-       do {
-               err = 0;
-               if ((cnt = recv(tp->tp_sd, (void *) tp->tp_ptr, tp->tp_cnt, 0)) 
< 0)
-                       err = SOCKET_ERRNO;
-       } while (cnt < 0 && err == SOCKET_EINTR);
-
-       if (cnt < 0) {
-               /* read error */
-               TRACE2(tet_Tio, 4, "read error, errno = %s", tet_errname(err));
-               switch (err) {
-               case SOCKET_ECONNRESET:
-                       error(0, "unexpected EOF", tet_r2a(&pp->pt_rid));
-                       pp->pt_state = PS_DEAD;
-                       break;
-               case SOCKET_EWOULDBLOCK:
-                       if (pp->pt_flags & PF_NBIO)
-                               return(0);
-                       /* else fall through */
-               default:
-                       pp->pt_flags |= PF_IOERR;
-                       break;
-               }
-       }
-       else if (cnt == 0) {
-               /* end-of-file */
-               TRACE1(tet_Tio, 4, "encountered EOF");
-               pp->pt_state = PS_DEAD;
-       }
-       else if ((tp->tp_cnt -= cnt) > 0) {
-               /* partial read - come back for more later */
-               TRACE3(tet_Tio, 4, "partial read: wanted %s, received %s",
-                       tet_i2a(tp->tp_cnt + cnt), tet_i2a(cnt));
-               tp->tp_ptr += cnt;
-               return(0);
-       }
-       else {
-               /* all done for now */
-               TRACE1(tet_Tio, 4, "this read complete");
-               rc = 1;
-       }
-
-       if (pp->pt_state == PS_DEAD)
-               pp->pt_flags |= PF_IODONE;
-
-       if (pp->pt_flags & PF_IOERR)
-               error(err, "socket read error", tet_r2a(&pp->pt_rid));
-
-       /* all non-zero return codes come here */
-       pp->pt_flags &= ~PF_INPROGRESS;
-       return(rc);
-}
-
-/*
-**     tet_ts_sndmsg() - send a message to a connected process
-**
-**     set one of PF_INPROGRESS, PF_IODONE or PF_IOERR on return
-**
-**     return an ER_ code to show the state of the local send processing
-*/
-
-int tet_ts_sndmsg(pp)
-register struct ptab *pp;
-{
-       register struct tptab *tp = (struct tptab *) pp->pt_tdata;
-       register int rc, err;
-
-#  ifdef TET_THREADS
-       sigset_t newset, oldset;
-#  endif /* TET_THREADS */
-       SIG_T (*pipe_save)();
-
-       /* set up variables for this message on first time through */
-       if ((pp->pt_flags & PF_INPROGRESS) == 0) {
-               do {
-                       err = 0;
-                       tp->tp_cnt = tet_dtmhdr2bs(&pp->ptm_hdr, tp->tp_buf);
-                       if (pp->ptm_len <= 0)
-                               rc = 0;
-                       else if ((rc = md2bs(pp)) < 0)
-                               if (pp->pt_flags & PF_SERVER) {
-                                       pp->pt_flags |= PF_IODONE;
-                                       return(rc);
-                               }
-                               else {
-                                       pp->ptm_rc = ER_ERR;
-                                       pp->ptm_len = 0;
-                                       TRACE2(tet_Tserv, 3,
-                                               "md2bs failed, new rc = %s",
-                                               tet_ptrepcode(pp->ptm_rc));
-                                       err = 1;
-                                       continue;
-                               }
-                       TDUMP(tet_Tio, 10, tp->tp_buf, tp->tp_cnt, msghdr);
-                       if (rc > 0) {
-                               TDUMP(tet_Tio, 10, tp->tp_buf + tp->tp_cnt,
-                                       rc, msgdata);
-                               tp->tp_cnt += rc;
-                       }
-                       tet_dmlen2bs(rc, tp->tp_buf);
-               } while (err);
-               tp->tp_ptr = tp->tp_buf;
-               pp->pt_flags |= PF_INPROGRESS;
-       }
-
-       TRACE3(tet_Tio, 4, "sendmsg: want to write %s bytes on sd %s",
-               tet_i2a(tp->tp_cnt), tet_i2a(tp->tp_sd));
-
-       /* write out the message -
-               Ignore SIGPIPE and detect broken connections via errno.
-               Signals just cause the write to be restarted (in an attempt
-               to cope with systems without restartable system calls) */
-#  ifndef TET_THREADS
-       pipe_save = signal(SIGPIPE, SIG_IGN);
-#  else
-       /* just block the signal for now so as to avoid interfering with
-          another thread's usage of SIGPIPE */
-       sigemptyset(&newset);
-       sigaddset(&newset, SIGPIPE);
-       TET_THR_SIGSETMASK(SIG_BLOCK, &newset, &oldset);
-#  endif /* TET_THREADS */
-
-       do {
-               err = 0;
-               if ((rc = send(tp->tp_sd, (void *) tp->tp_ptr, tp->tp_cnt, 0)) 
< 0)
-                       err = SOCKET_ERRNO;
-       } while (rc < 0 && err == SOCKET_EINTR);
-
-#  ifndef TET_THREADS
-       signal(SIGPIPE, (SIG_FUNC_T (*) ()) pipe_save);
-#  else
-       if (rc < 0 && (err == EPIPE || err == ECONNRESET))
-       {
-               /* a SIGPIPE is pending: get rid of it by setting it to be
-                  ignored then unblocking it.  This could interfere
-                  with another thread's usage of SIGPIPE, but the
-                  chances are very small.  Note that we unblock SIGPIPE
-                  explicitly, since it may be a member of "oldset". */
-               pipe_save = signal(SIGPIPE, SIG_IGN);
-               TET_THR_SIGSETMASK(SIG_UNBLOCK, &newset, (sigset_t *) 0);
-
-               /* now restore the original mask and handler */
-               TET_THR_SIGSETMASK(SIG_SETMASK, &oldset, (sigset_t *) 0);
-               signal(SIGPIPE, (SIG_FUNC_T (*) ()) pipe_save);
-       }
-       else
-               TET_THR_SIGSETMASK(SIG_SETMASK, &oldset, (sigset_t *) 0);
-#  endif /* TET_THREADS */
-
-       /* set state and flags according to results */
-       if (rc < 0) {
-               /* write error */
-               TRACE2(tet_Tio, 4, "write error, errno = %s", tet_errname(err));
-               switch (err) {
-               case EPIPE:
-               case SOCKET_ECONNRESET:
-                       error(0, "process connection broken",
-                               tet_r2a(&pp->pt_rid));
-                       pp->pt_flags |= PF_IODONE;
-                       pp->pt_state = PS_DEAD;
-                       break;
-               case SOCKET_EWOULDBLOCK:
-                       if (pp->pt_flags & PF_NBIO)
-                               return(ER_OK);
-                       /* else fall through */
-               default:
-                       error(err, "socket write error", tet_r2a(&pp->pt_rid));
-                       pp->pt_flags |= PF_IOERR;
-                       break;
-               }
-       }
-       else if ((tp->tp_cnt -= rc) > 0) {
-               /* partial write - try again later */
-               TRACE3(tet_Tio, 4, "partial write: requested %s, only wrote %s",
-                       tet_i2a(tp->tp_cnt + rc), tet_i2a(rc));
-               tp->tp_ptr += rc;
-               return(ER_OK);
-       }
-       else {
-               /* all done */
-               TRACE1(tet_Tio, 4, "write complete");
-               pp->pt_flags |= PF_IODONE;
-       }
-
-       /* here if no more data to write now */
-       pp->pt_flags &= ~PF_INPROGRESS;
-       return(ER_OK);
-}
-
-/*
-**     bs2md() - convert machine-independent message data to internal format
-**             depending on message type
-**
-**     return ER_OK if successful, or -ve error code on error
-*/
-
-static int bs2md(bp, pp)
-char *bp;
-struct ptab *pp;
-{
-       register int rc;
-
-       if ((pp->pt_flags & PF_SERVER) == 0)
-               pp->pt_savreq = pp->ptm_req;
-
-       switch (pp->pt_savreq) {
-       case OP_NULL:
-               pp->ptm_len = 0;
-               rc = ER_OK;
-               break;
-       default:
-               if ((rc = tet_ss_bs2md(bp, pp)) < 0)
-                       pp->ptm_len = 0;
-               else {
-                       pp->ptm_len = (short) rc;
-                       rc = ER_OK;
-               }
-               break;
-       }
-
-       return(rc);
-}
-
-/*
-**     md2bs() - convert message data to machine-independent format
-**             depending on message type
-**
-**     return the number of bytes occupied by the message, or -ve error code
-**     on error
-*/
-
-static int md2bs(pp)
-register struct ptab *pp;
-{
-       register struct tptab *tp = (struct tptab *) pp->pt_tdata;
-       register int len = 0;
-
-       /* work out the required buffer size */
-       switch (pp->ptm_req) {
-       case OP_NULL:
-               len = pp->ptm_len;
-               break;
-       }
-
-       /* check that the buffer is big enough */
-       if (len > 0 && BUFCHK(&tp->tp_buf, &tp->tp_len, tp->tp_cnt + len) < 0)
-               return(ER_ERR);
-
-       /* copy the internal data into the machine-independent buffer */
-       switch (pp->ptm_req) {
-       case OP_NULL:
-               bcopy(pp->ptm_data, tp->tp_buf + tp->tp_cnt, len);
-               break;
-       default:
-               len = tet_ss_md2bs(pp, &tp->tp_buf, &tp->tp_len, tp->tp_cnt);
-               break;
-       }
-
-       return(len);
-}
-
-/*
-**     tet_ts_dead() - perform transport-specific actions for a
-**             dead connected process
-*/
-
-void tet_ts_dead(pp)
-register struct ptab *pp;
-{
-       register struct tptab *tp = (struct tptab *) pp->pt_tdata;
-
-       TRACE2(tet_Tio, 4, "tet_ts_dead: close sd %s", tet_i2a(tp->tp_sd));
-
-       SOCKET_CLOSE(tp->tp_sd);
-       tp->tp_sd = INVALID_SOCKET;
-       pp->pt_flags &= ~(PF_CONNECTED | PF_INPROGRESS);
-}
-
-/*
-**     tet_ts_startup() - perform transport-specific actions on startup
-**
-**     there is no return on error
-*/
-
-TET_IMPORT void tet_ts_startup()
-{
-
-       /* nothing */
-
-}
-
-/*
-**     tet_ts_cleanup() - perform transport-specific actions before exiting
-*/
-
-void tet_ts_cleanup()
-{
-
-       /* nothing */
-
-}
-
diff --git a/src/tet3/tccd/log.c.orig b/src/tet3/tccd/log.c.orig
deleted file mode 100644
index 8a2452900a45..000000000000
--- a/src/tet3/tccd/log.c.orig
+++ /dev/null
@@ -1,184 +0,0 @@
-/*
- *      SCCS:  @(#)log.c       1.12 (98/09/01) 
- *
- *     UniSoft Ltd., London, England
- *
- * (C) Copyright 1992 X/Open Company Limited
- *
- * All rights reserved.  No part of this source code may be reproduced,
- * stored in a retrieval system, or transmitted, in any form or by any
- * means, electronic, mechanical, photocopying, recording or otherwise,
- * except as stated in the end-user licence agreement, without the prior
- * permission of the copyright owners.
- *
- * X/Open and the 'X' symbol are trademarks of X/Open Company Limited in
- * the UK and other countries.
- */
-
-/************************************************************************
-
-SCCS:          @(#)log.c       1.12 98/09/01 TETware release 3.3
-NAME:          log.c
-PRODUCT:       TETware
-AUTHOR:                Andrew Dingwall, UniSoft Ltd.
-DATE CREATED:  April 1992
-
-DESCRIPTION:
-       tccd error reporting functions
-
-MODIFICATIONS:
-       Andrew Dingwall, UniSoft Ltd., July 1997
-       added support the MT DLL version of the C runtime support library
-       on Win32 systems
-
-       Andrew Dingwall, UniSoft Ltd., July 1998
-       Added support for shared API libraries.
-
-       Aaron Plattner, April 2010
-       Fixed warnings when compiled with GCC's -Wall option.
-
-************************************************************************/
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <time.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include "dtmac.h"
-#include "error.h"
-#include "globals.h"
-#include "dtmsg.h"
-#include "ptab.h"
-#include "tccd.h"
-#include "dtetlib.h"
-
-
-/* the log file stream pointer */
-static FILE *lfp = stderr;
-
-
-/* static function declarations */
-static FILE *getlogfp PROTOLIST((void));
-static char *loghdr PROTOLIST((void));
-
-
-/*
-**     loginit() - open the TCCD log file
-*/
-
-void loginit()
-{
-       FILE *fp;
-       int n;
-       struct STAT_ST stbuf;
-       static char devnull[] = "/dev/null";
-       static char buf[BUFSIZ];
-       extern char *Logfile;
-
-       /* make sure that the logfile open will get a fd > 2, otherwise
-               all kinds of trouble breaks out when we dup fds later */
-       for (n = 0; n < 3; n++)
-               if (FSTAT(n, &stbuf) < 0 && OPEN(devnull, O_RDONLY, 0) < 0)
-                       fatal(errno, "can't open", devnull);
-       errno = 0;
-
-       /* open the log file */
-       if ((fp = fopen(Logfile, "a")) == NULL)
-               fatal(errno, "can't open log file", Logfile);
-
-       /* allow anyone to read/write to the logfile */
-       CHMOD(Logfile, (mode_t)S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH);
-
-       /* attach stderr to the logfile */
-       errno = 0;
-       if ((lfp = freopen(Logfile, "a", stderr)) != stderr) {
-               lfp = fp;
-               fatal(errno, "can't reopen stderr as", Logfile);
-       }
-
-       fclose(fp);
-
-       setbuf(lfp, buf);
-
-       if (tet_fappend(FILENO(lfp)) < 0)
-               exit(1);
-}
-
-/*
-**     logent() - make an entry in the TCCD log file
-*/
-
-void logent(s1, s2)
-char *s1, *s2;
-{
-       register FILE *fp;
-
-       fp = getlogfp();
-
-       fprintf(fp, "%s: %s", loghdr(), s1);
-       if (s2 && *s2)
-               fprintf(fp, " %s", s2);
-       putc('\n', fp);
-       fflush(fp);
-}
-
-/*
-**     logerror() - TCCD error printing routine
-*/
-
-void logerror(errnum, file, line, s1, s2)
-int errnum, line;
-char *file, *s1, *s2;
-{
-       tet_prerror(getlogfp(), errnum, loghdr(), file, line, s1, s2);
-}
-
-/*
-**     loghdr() - construct a TCCD error message preamble
-**             and return a pointer thereto
-*/
-
-static char *loghdr()
-{
-       static char *month[] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun",
-               "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" };
-       time_t t;
-       register struct tm *tp;
-       static char header[50];
-
-       t = time((time_t *) 0);
-       tp = localtime(&t);
-       sprintf(header, "%.16s (%d) %d %s %d:%02d:%02d",
-               tet_progname, tet_mypid, tp->tm_mday, month[tp->tm_mon],
-               tp->tm_hour, tp->tm_min, tp->tm_sec);
-
-       return(header);
-}
-
-/*
-**     getlogfp() - return the logfile stream pointer
-*/
-
-static FILE *getlogfp()
-{
-       struct STAT_ST stbuf;
-       static FILE *cfp;
-       static int cfd = -1;
-       static char console[] = "/dev/console";
-
-
-       if (!lfp || FSTAT(FILENO(lfp), &stbuf) < 0) {
-               if (!cfp) {
-                       if (cfd < 0)
-                               cfd = OPEN(console, O_WRONLY | O_NOCTTY, 0);
-                       if (cfd >= 0)
-                               cfp = FDOPEN(cfd, "w");
-               }
-               return(cfp);
-       }
-       else
-               return(lfp);
-}
-
diff --git a/src/tet3/tcclib/lsdir.c.orig b/src/tet3/tcclib/lsdir.c.orig
deleted file mode 100644
index 353eb479963c..000000000000
--- a/src/tet3/tcclib/lsdir.c.orig
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- *     SCCS: @(#)lsdir.c       1.3 (98/11/26)
- *
- *     UniSoft Ltd., London, England
- *
- * (C) Copyright 1996 X/Open Company Limited
- *
- * All rights reserved.  No part of this source code may be reproduced,
- * stored in a retrieval system, or transmitted, in any form or by any
- * means, electronic, mechanical, photocopying, recording or otherwise,
- * except as stated in the end-user licence agreement, without the prior
- * permission of the copyright owners.
- * A copy of the end-user licence agreement is contained in the file
- * Licence which accompanies this distribution.
- * 
- * X/Open and the 'X' symbol are trademarks of X/Open Company Limited in
- * the UK and other countries.
- */
-
-/************************************************************************
-
-SCCS:          @(#)lsdir.c     1.3 98/11/26 TETware release 3.3
-NAME:          lsdir.c
-PRODUCT:       TETware
-AUTHOR:                Andrew Dingwall, UniSoft Ltd.
-DATE CREATED:  October 1996
-
-DESCRIPTION:
-       function to generate a directory listing
-
-       this function moved from tccd/tsfile.c to here
-
-MODIFICATIONS:
-       Andrew Dingwall, UniSoft Ltd., March 1998
-       Excluded "." from the list of directory entries returned by
-       tcf_lsdir() - it's not used anywhere.
-
-       Andrew Dingwall, UniSoft Ltd., November 1998
-       added <sys/types.h> for the benefit of FreeBSD
-
-       Aaron Plattner, April 2010
-       Fixed warnings when compiled with GCC's -Wall option.
-
-************************************************************************/
-
-#include <stdio.h>
-#include <sys/types.h>
-#include <string.h>
-#include <errno.h>
-#include "dtmac.h"
-#include "tetdir.h"
-#include "error.h"
-#include "dtetlib.h"
-#include "tcclib.h"
-
-
-/*
-**     tcf_lsdir() - return a pointer to a list of pointers to directory 
entries
-**
-**     return (char **) 0 on error
-**
-**     the return list excludes "." and ".."
-*/
-
-char **tcf_lsdir(dir)
-char *dir;
-{
-       register DIR *dirp;
-       register struct dirent *dp;
-       register int n, nfiles;
-       register char **fip;
-       char **files = (char **) 0;
-       int flen = 0;
-
-       /* open the directory */
-       if ((dirp = OPENDIR(dir)) == (DIR *) 0) {
-               error(errno, "can't open", dir);
-               return((char **) 0);
-       }
-
-       /* count the files in the directory and store their names */
-       nfiles = 0;
-       while ((dp = READDIR(dirp)) != (struct dirent *) 0) {
-               if (!strcmp(dp->d_name, ".") || !strcmp(dp->d_name, ".."))
-                       continue;
-               n = (nfiles + 2) * sizeof *files;
-               if (BUFCHK((char **) &files, &flen, n) < 0) {
-                       break;
-               }
-               fip = files + nfiles;
-               if ((*fip = tet_strstore(dp->d_name)) == (char *) 0) {
-                       break;
-               }
-               *++fip = (char *) 0;
-               nfiles++;
-       }
-       CLOSEDIR(dirp);
-
-       return(files);
-}
-
diff --git a/src/tet3/tcm/makefile.orig b/src/tet3/tcm/makefile.orig
deleted file mode 100644
index acd0d3132918..000000000000
--- a/src/tet3/tcm/makefile.orig
+++ /dev/null
@@ -1,143 +0,0 @@
-#
-#      SCCS:  @(#)makefile     1.13 (98/09/01) 
-#
-#      UniSoft Ltd., London, England
-#
-# (C) Copyright 1992 X/Open Company Limited
-# (C) Copyright 1994 UniSoft Ltd.
-#
-# All rights reserved.  No part of this source code may be reproduced,
-# stored in a retrieval system, or transmitted, in any form or by any
-# means, electronic, mechanical, photocopying, recording or otherwise,
-# except as stated in the end-user licence agreement, without the prior
-# permission of the copyright owners.
-#
-# X/Open and the 'X' symbol are trademarks of X/Open Company Limited in
-# the UK and other countries.
-#
-#
-# ************************************************************************
-#
-# SCCS:        @(#)makefile    1.13 98/09/01 TETware release 3.3
-# NAME:                makefile
-# PRODUCT:     TETware
-# AUTHOR:      Andrew Dingwall, UniSoft Ltd.
-# DATE CREATED:        June 1992
-#
-# DESCRIPTION:
-#      tcm makefile
-# 
-# MODIFICATIONS:
-#      Denis McConalogue, UniSoft Limited, September 1993
-#      adapted from the makefile in src/dtet/tcm/makefile.
-# 
-#      Andrew Dingwall, UniSoft Ltd., December 1993
-#      Enhancements for FIFO transport interface.
-#      Moved lists of transport-specific files to ts.mk
-#
-#      Geoff Clare, UniSoft Ltd., August 1996
-#      Changes for TETWare.
-#
-#      Geoff Clare, UniSoft Ltd., Sept 1996
-#      Changes for TETware-Lite.
-#
-#      Geoff Clare, UniSoft Ltd., Oct 1996
-#      restructured tcm source to avoid "ld -r"
-#
-#      Andrew Dingwall, UniSoft Ltd., August 1998
-#      Added support for shared libraries.
-#
-# ************************************************************************
-
-include ../../defines.mk
-include ../ts.mk
-
-LOCAL_TET_CDEFS = $(TET_CDEFS)
-LOCAL_DTET_CDEFS = $(DTET_CDEFS)
-LOCAL_CDEFS =
-LOCAL_COPTS = $(COPTS)
-LOCAL_CC = $(CC)
-
-# TET_CFLAGS and DTET_CFLAGS are set in ../common.mk
-include ../common.mk
-
-
-LIBNAME = $(LIBDAPI)
-
-# generic C build targets
-ALL_GN = tcm$O tcmchild$O
-TARGETS_GN = $(LIB)/tcm$O $(LIB)/tcmchild$O
-
-# additional targets when building the TCM in Distributed TETware
-ALL_DIST = tcmrem$O
-TARGETS_DIST = $(LIB)/tcmrem$O
-
-# this sets ALL_TS, TARGETS_TS and TCM_OFILES_TS
-include ts.mk
-
-# C build targets
-ALL = $(ALL_GN) $(ALL_TS)
-TARGETS = $(TARGETS_GN) $(TARGETS_TS)
-
-# C++ build targets
-# (tcmrem$O isn't supported in the C++ API)
-ALLC = Ctcm$O Ctcmchild$O
-TARGETSC = $(LIB)/Ctcm$O $(LIB)/Ctcmchild$O
-
-all: $(ALL) lib_made
-
-allC: $(ALLC)
-
-install: $(TARGETS) lib_made
-
-installC: $(TARGETSC)
-
-# this sets TCM_OFILES
-TCMSRC = 
-APISHLIBSRC =
-include shared.mk
-
-$(LIB)/tcm$O: tcm$O
-       cp $? $@
-
-$(LIB)/tcmrem$O: tcmrem$O
-       cp $? $@
-
-$(LIB)/tcmchild$O: tcmchild$O
-       cp $? $@
-
-$(LIB)/Ctcm$O: Ctcm$O
-       cp $? $@
-
-$(LIB)/Ctcmchild$O: Ctcmchild$O
-       cp $? $@
-
-OFILES = $(TCM_OFILES)
-
-lib_made: $(OFILES)
-       if test -f lib_made; then \
-               $(AR) rv $(LIBNAME) $? ;\
-       else \
-               $(AR) rv $(LIBNAME) `$(LORDER) $(OFILES) | $(TSORT)` ;\
-       fi
-       $(RANLIB) $(LIBNAME)
-       touch lib_made
-
-.PRECIOUS: $(LIBNAME)
-
-
-CLEAN clean:
-       rm -f $(OFILES) $(ALL) $(ALLC) dynlink_gen_made
-
-CLOBBER clobber: clean
-       rm -f $(TARGETS) $(TARGETSC) lib_made
-
-FORCE FRC: clobber all
-
-
-# remove suffix rules from this makefile
-# all .o files are made by explicit rules
-.SUFFIXES:
-
-.SUFFIXES: .none
-
diff --git a/src/tet3/tcm/shared.mk.orig b/src/tet3/tcm/shared.mk.orig
deleted file mode 100644
index ff19b483d3f0..000000000000
--- a/src/tet3/tcm/shared.mk.orig
+++ /dev/null
@@ -1,175 +0,0 @@
-#
-#      SCCS: @(#)shared.mk     1.4 (98/09/01)
-#
-#      UniSoft Ltd., London, England
-#
-# (C) Copyright 1996 X/Open Company Limited
-#
-# All rights reserved.  No part of this source code may be reproduced,
-# stored in a retrieval system, or transmitted, in any form or by any
-# means, electronic, mechanical, photocopying, recording or otherwise,
-# except as stated in the end-user licence agreement, without the prior
-# permission of the copyright owners.
-# A copy of the end-user licence agreement is contained in the file
-# Licence which accompanies this distribution.
-# 
-# X/Open and the 'X' symbol are trademarks of X/Open Company Limited in
-# the UK and other countries.
-#
-# ************************************************************************
-#
-# SCCS:        @(#)shared.mk   1.4 98/09/01
-# NAME:                shared.mk
-# PRODUCT:     TETware
-# AUTHOR:      Geoff Clare, UniSoft Ltd.
-# DATE CREATED:        October 1996
-#
-# DESCRIPTION:
-#      make include file, shared between tcm, tcmthr, tcmshlib and tcmthrshlib
-# 
-# MODIFICATIONS:
-#
-#      Andrew Dingwall, UniSoft Ltd., August 1998
-#      Added support for shared libraries.
-#
-# ************************************************************************
-
-#
-# tcm object files that go in the API library
-#
-
-# list of object files to be included in shared API libraries
-TCM_SHARED_OFILES = ictp$O $(TCM_SHARED_OFILES_TS)
-
-# list of object files to be included in the static part of the shared
-# API libraries
-TCM_STATIC_OFILES = child$O ckversion$O dtcm$O dynlink$O tcmfuncs$O \
-       $(TCM_STATIC_OFILES_TS)
-
-# list of object files to be included in the static API libraries
-TCM_OFILES = $(TCM_SHARED_OFILES) $(TCM_STATIC_OFILES)
-
-# compilations using TET_CFLAGS
-
-child$O: $(TCMSRC)child.c
-       $(LOCAL_CC) $(TET_CFLAGS) -c $(TCMSRC)child.c
-
-ckversion$O: $(TCMSRC)ckversion.c
-       $(LOCAL_CC) $(TET_CFLAGS) -c $(TCMSRC)ckversion.c
-
-dynlink$O: $(TCMSRC)dynlink.c dynlink_gen_made
-       $(LOCAL_CC) -I$(APISHLIBSRC). $(TET_CFLAGS) -c $(TCMSRC)dynlink.c
-
-# note that the dependences in the following rule are incomplete,
-# but it's the best we can do;
-# the higher level makefile makes api*shlib before tcm*shlib, so it doesn't
-# usually matter
-dynlink_gen_made:
-       @set -x;                                                        \
-       if test -n "$(APISHLIBSRC)";                                    \
-       then                                                            \
-               cd $(APISHLIBSRC);                                      \
-               $(MAKE) dynlink.gen;                                    \
-       fi
-       touch $@
-
-ictp$O: $(TCMSRC)ictp.c
-       $(LOCAL_CC) $(TET_CFLAGS) -c $(TCMSRC)ictp.c
-
-tcm$O: $(TCMSRC)tcm.c
-       $(LOCAL_CC) $(TET_CFLAGS) -c $(TCMSRC)tcm.c
-
-tcmchild$O: $(TCMSRC)tcmchild.c
-       $(LOCAL_CC) $(TET_CFLAGS) -c $(TCMSRC)tcmchild.c
-
-tcmfuncs$O: $(TCMSRC)tcmfuncs.c
-       $(LOCAL_CC) $(TET_CFLAGS) -c $(TCMSRC)tcmfuncs.c
-
-tcmrem$O: $(TCMSRC)tcmrem.c
-       $(LOCAL_CC) $(TET_CFLAGS) -c $(TCMSRC)tcmrem.c
-
-tcm_bs$O: $(TCMSRC)tcm_bs.c
-       $(LOCAL_CC) $(TET_CFLAGS) -c $(TCMSRC)tcm_bs.c
-
-# compilations using DTET_CFLAGS
-
-dtcm$O: $(TCMSRC)dtcm.c
-       $(LOCAL_CC) $(DTET_CFLAGS) -c $(TCMSRC)dtcm.c
-
-tcm_in$O: $(TCMSRC)tcm_in.c
-       $(LOCAL_CC) $(DTET_CFLAGS) -c $(TCMSRC)tcm_in.c
-
-tcm_xt$O: $(TCMSRC)tcm_xt.c
-       $(LOCAL_CC) $(DTET_CFLAGS) -c $(TCMSRC)tcm_xt.c
-
-# C++ compilations
-
-Ctcm$O: $(TCMSRC)tcm.c
-       rm -f Ctcm.$(C_SUFFIX)
-       cp $(TCMSRC)tcm.c Ctcm.$(C_SUFFIX)
-       $(C_PLUS) $(TET_CFLAGS) -I$(TCMSRC). -c Ctcm.$(C_SUFFIX)
-       rm -f Ctcm.$(C_SUFFIX)
-
-Ctcmchild$O: $(TCMSRC)tcmchild.c
-       rm -f Ctcmchild.$(C_SUFFIX)
-       cp $(TCMSRC)tcmchild.c Ctcmchild.$(C_SUFFIX)
-       $(C_PLUS) $(TET_CFLAGS) -I$(TCMSRC). -c Ctcmchild.$(C_SUFFIX)
-       rm -f Ctcmchild.$(C_SUFFIX)
-
-
-# dependencies
-
-Ctcm$O tcm$O: $(INC)/apilib.h $(INC)/dtetlib.h $(INC)/dtmac.h $(INC)/dtmsg.h \
-       $(INC)/dtthr.h $(INC)/error.h $(INC)/globals.h $(INC)/ptab.h \
-       $(INC)/server.h $(INC)/sigsafe.h $(INC)/synreq.h $(INC)/tslib.h \
-       $(TCMSRC)tcmfuncs.h
-
-Ctcmchild$O tcmchild$O: $(INC)/dtetlib.h $(INC)/dtmac.h $(INC)/dtmsg.h \
-       $(INC)/dtthr.h $(INC)/error.h $(INC)/globals.h $(INC)/ptab.h \
-       $(INC)/server.h $(INC)/servlib.h $(INC)/sigsafe.h $(INC)/synreq.h \
-       $(INC)/tslib.h $(TCMSRC)tcmfuncs.h
-
-child$O: $(DINC)/tet_api.h $(INC)/alarm.h $(INC)/apilib.h $(INC)/dtetlib.h \
-       $(INC)/dtmac.h $(INC)/dtmsg.h $(INC)/dtthr.h $(INC)/error.h \
-       $(INC)/globals.h $(INC)/sigsafe.h $(INC)/synreq.h $(TCMSRC)tcmfuncs.h
-
-ckversion$O: $(DINC)/tet_api.h $(INC)/apilib.h $(INC)/dtmac.h \
-       $(INC)/globals.h $(TCMSRC)tcmfuncs.h ../apilib/version.c
-
-dtcm$O: $(DINC)/tet_api.h $(INC)/alarm.h $(INC)/apilib.h $(INC)/bstring.h \
-       $(INC)/dtetlib.h $(INC)/dtmac.h $(INC)/dtmsg.h $(INC)/dtthr.h \
-       $(INC)/error.h $(INC)/ltoa.h $(INC)/servlib.h $(INC)/sigsafe.h \
-       $(INC)/synreq.h $(TCMSRC)tcmfuncs.h
-
-dynlink$O: $(DINC)/tet_api.h $(INC)/apilib.h $(INC)/dtmac.h $(INC)/dtmsg.h \
-       $(INC)/dtthr.h $(INC)/error.h $(INC)/globals.h $(INC)/ptab.h \
-       $(INC)/server.h $(INC)/server_bs.h $(INC)/server_in.h $(INC)/synreq.h \
-       $(TCMSRC)tcmfuncs.h
-
-ictp$O: $(DINC)/tet_api.h $(DINC)/tet_jrnl.h $(INC)/apilib.h $(INC)/dtetlib.h \
-       $(INC)/dtmac.h $(INC)/dtmsg.h $(INC)/dtthr.h $(INC)/error.h \
-       $(INC)/globals.h $(INC)/ltoa.h $(INC)/servlib.h $(INC)/synreq.h \
-       $(TCMSRC)tcmfuncs.h
-
-tcm_bs$O: $(INC)/avmsg.h $(INC)/dtetlib.h $(INC)/dtmac.h $(INC)/dtmsg.h \
-       $(INC)/error.h $(INC)/ptab.h $(INC)/server_bs.h $(INC)/valmsg.h \
-       $(TCMSRC)tcmfuncs.h
-
-tcm_in$O: $(INC)/dtetlib.h $(INC)/dtmac.h $(INC)/dtmsg.h $(INC)/error.h \
-       $(INC)/globals.h $(INC)/inetlib_in.h $(INC)/ltoa.h $(INC)/ptab.h \
-       $(INC)/server.h $(INC)/tptab_in.h $(INC)/tsinfo_in.h \
-       $(TCMSRC)tcmfuncs.h
-
-tcm_xt$O: $(INC)/dtetlib.h $(INC)/dtmac.h $(INC)/dtmsg.h $(INC)/error.h \
-       $(INC)/ltoa.h $(INC)/ptab.h $(INC)/server.h $(INC)/tptab_xt.h \
-       $(INC)/tsinfo_xt.h $(INC)/xtilib_xt.h $(TCMSRC)tcmfuncs.h
-
-tcmfuncs$O: $(DINC)/tet_api.h $(INC)/apilib.h $(INC)/dtetlib.h \
-       $(INC)/dtmac.h $(INC)/dtmsg.h $(INC)/error.h $(INC)/globals.h \
-       $(INC)/ltoa.h $(INC)/ptab.h $(INC)/server.h $(INC)/servlib.h \
-       $(INC)/synreq.h $(INC)/tslib.h $(TCMSRC)tcmfuncs.h
-
-tcmrem$O: $(INC)/dtetlib.h $(INC)/dtmac.h $(INC)/dtmsg.h $(INC)/error.h \
-       $(INC)/globals.h $(INC)/ptab.h $(INC)/server.h $(INC)/sigsafe.h \
-       $(INC)/synreq.h $(INC)/tslib.h $(TCMSRC)tcmfuncs.h
-
diff --git a/src/tet3/tcm/tcm.c.orig b/src/tet3/tcm/tcm.c.orig
deleted file mode 100644
index 47c90b3737ab..000000000000
--- a/src/tet3/tcm/tcm.c.orig
+++ /dev/null
@@ -1,355 +0,0 @@
-/*
- *      SCCS:  @(#)tcm.c       1.17 (98/09/01) 
- *
- *     UniSoft Ltd., London, England
- *
- * (C) Copyright 1992 X/Open Company Limited
- *
- * All rights reserved.  No part of this source code may be reproduced,
- * stored in a retrieval system, or transmitted, in any form or by any
- * means, electronic, mechanical, photocopying, recording or otherwise,
- * except as stated in the end-user licence agreement, without the prior
- * permission of the copyright owners.
- *
- * X/Open and the 'X' symbol are trademarks of X/Open Company Limited in
- * the UK and other countries.
- */
-
-/************************************************************************
-
-SCCS:          @(#)tcm.c       1.17 98/09/01 TETware release 3.3
-NAME:          tcm.c
-PRODUCT:       TETware
-AUTHOR:                Andrew Dingwall, UniSoft Ltd.
-DATE CREATED:  April 1992
-
-DESCRIPTION:
-       tcm main() and client-related functions
-
-MODIFICATIONS:
-       Denis McConalogue, UniSoft Limited, June 1993
-       API enhancements - combined [ms]tcmfuncs.c into this file.
-
-       Denis McConalogue, UniSoft Limited, September 1993
-       changed tet_tcmptype() to set process type PT_MTCM for
-       all non-distributed test cases (executing on master or
-       slave systems).
-
-       Andrew Dingwall, UniSoft Ltd., August 1996
-       changes for TETware
-
-       Geoff Clare, UniSoft Ltd., Sept 1996
-       changes for TETware-Lite
-
-       Geoff Clare, UniSoft Ltd., Oct 1996
-       restructured tcm source to avoid "ld -r"
-       (this file was mtcmfuncs.c - moved main() and other things here)
-
-       Andrew Dingwall, UniSoft Ltd., April 1997
-       initialise tet_pname in case it gets used (in tet_dtcmerror())
-       before it can be set up in tet_tcm*_main()
-
-       Andrew Dingwall, UniSoft Ltd., June 1997
-       initialised tet_tcmlast to the hightest possible value
-
-       Andrew Dingwall, UniSoft Ltd., July 1998
-       Added support for shared API libraries.
-
-       Aaron Plattner, April 2010
-       Fixed warnings when compiled with GCC's -Wall option.
-
-************************************************************************/
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <stdio.h>
-#  include <signal.h>
-#  include <unistd.h>
-#include "dtmac.h"
-#include "dtmsg.h"
-#include "dtthr.h"
-#include "globals.h"
-#include "tcmfuncs.h"
-#ifndef TET_LITE /* -START-LITE-CUT- */
-#  include "error.h"
-#  include "ptab.h"
-#  include "synreq.h"
-#  include "server.h"
-#  include "tslib.h"
-#endif         /* -END-LITE-CUT- */
-#include "dtetlib.h"
-#include "sigsafe.h"
-
-extern int     tet_tcm_main PROTOLIST((int, char **));
-extern void    tet_dtcmerror PROTOLIST((int, char *, int, char *, char *));
-
-TET_EXPORT char *tet_pname = "<unknown>";
-TET_EXPORT int tet_thistest = 0;
-TET_EXPORT int tet_nosigreset = 0;     /* has no effect in WIN32 */
-
-#ifndef TET_LITE /* -START-LITE-CUT- */
-TET_EXPORT long tet_snid = -1L;                /* sync id */
-TET_EXPORT long tet_xrid = -1L;                /* xres id */
-TET_EXPORT int *tet_snames;            /* system name list */
-TET_EXPORT int tet_Nsname;             /* number of system names */
-TET_EXPORT struct ptab *tet_sdptab, *tet_xdptab;
-                                       /* ptab elements for syncd and xresd */
-int tet_psysid = -1;                   /* parent's system id */
-#endif         /* -END-LITE-CUT- */
-
-TET_EXPORT sigset_t tet_blockable_sigs;
-
-#ifdef TET_THREADS
-TET_EXPORT tet_thread_t tet_start_tid;
-#endif /* TET_THREADS */
-
-#ifdef __cplusplus
-}
-#endif
-
-/*
-**     main() is the main program for the Test Case Manager (TCM).
-**     It is simply a wrapper for tet_tcm_main().
-*/
-
-#ifdef PROTOTYPES
-int main(int argc, char **argv)
-#else
-int main(argc, argv)
-int    argc;
-char   **argv;
-#endif
-{
-
-#ifdef TET_LITE                                        /* -LITE-CUT-LINE- */
-#  define MYPTYPE      PT_MTCM
-#  define MYSYSID      0
-#else                                          /* -START-LITE-CUT- */
-#  define MYPTYPE      -1
-#  define MYSYSID      -1
-#endif                                         /* -END-LITE-CUT- */
-
-       /* must be first */
-       tet_init_globals(argc > 0 ? tet_basename(*argv) : "TCM",
-               MYPTYPE, MYSYSID, tet_dtcmerror, tet_genfatal);
-
-       /*
-       ** make sure that we are linked with the right version of
-       ** the API library
-       */
-       tet_check_apilib_version();
-
-
-       return tet_tcm_main(argc, argv);
-}
-
-#ifndef TET_LITE /* -START-LITE-CUT- */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
-**     tet_tcm_async() - do an automatic sync from the MTCM
-*/
-
-#ifdef PROTOTYPES
-TET_EXPORT int tet_tcm_async(long spno, int vote, int timeout,
-           struct synreq *synreq, int *nsys)
-#else
-TET_EXPORT int tet_tcm_async(spno, vote, timeout, synreq, nsys)
-long spno;
-int vote, timeout, *nsys;
-struct synreq *synreq;
-#endif
-{
-       return(tet_sdasync(tet_snid, tet_xrid, spno, vote, timeout, synreq, 
nsys));
-}
-
-/*
-**     tet_tcmptype() - return process type for a TCM
-**
-**     In TETware there is almost no difference between "master" and
-**     "slave" TCMs and this function is only used to decide which
-**     TCMs in a distributed test case should inform XRESD of IC and
-**     TP start and end.
-**     Someone has to do it so it might as well be the first (or only)
-**     system in the system list.
-*/
-
-int tet_tcmptype PROTOLIST((void))
-{
-       int sys1;
-
-       sys1 = tet_snames ? *tet_snames : -1;
-
-       return (tet_mysysid == sys1 ? PT_MTCM : PT_STCM);
-}
-
-/*
-**     tet_ss_dead() - server-specific dead process handler
-**
-**     should only be called from tet_si_service() when a server dies
-**     unexpectedly
-**
-**     server logoff routines do not come here
-*/
-
-#ifdef PROTOTYPES
-TET_EXPORT void tet_ss_dead(struct ptab *pp)
-#else
-TET_EXPORT void tet_ss_dead(pp)
-struct ptab *pp;
-#endif
-{
-       /* emit a diagnostic if this is unexpected */
-       if ((pp->pt_flags & PF_LOGGEDOFF) == 0)
-               error(0, "server connection closed", tet_r2a(&pp->pt_rid));
-
-       pp->pt_flags = (pp->pt_flags & ~PF_LOGGEDON) | PF_LOGGEDOFF;
-}
-
-/*
-**     tet_ss_connect() - connect to remote process
-*/
-
-#ifdef PROTOTYPES
-TET_EXPORT void tet_ss_connect(struct ptab *pp)
-#else
-TET_EXPORT void tet_ss_connect(pp)
-struct ptab *pp;
-#endif
-{
-       tet_ts_connect(pp);
-}
-
-/*
-**     tet_ss_ptalloc(), tet_ss_ptfree()  - allocate and free server-specific
-**             ptab data area
-**
-**     tcm does not make use of server-specific data
-*/
-
-#ifdef PROTOTYPES
-TET_EXPORT int tet_ss_ptalloc(struct ptab *pp)
-#else
-TET_EXPORT int tet_ss_ptalloc(pp)
-struct ptab *pp;
-#endif
-{
-       pp->pt_sdata = (char *) 0;
-       return(0);
-}
-
-/* ARGSUSED */
-#ifdef PROTOTYPES
-TET_EXPORT void tet_ss_ptfree(struct ptab *pp)
-#else
-TET_EXPORT void tet_ss_ptfree(pp)
-struct ptab *pp;
-#endif
-{
-       /* nothing */
-}
-
-/*
-**     tet_ss_serverloop() - server-specific server loop
-**
-**     this may be called from tet_si_servwait() if non-blocking message i/o
-**     would block
-**
-**     tcm does not do non-blocking i/o, so this should never occur
-*/
-
-TET_EXPORT int tet_ss_serverloop PROTOLIST((void))
-{
-       error(0, "internal error - serverloop called!", (char *) 0);
-       return(-1);
-}
-
-/*
-**     tet_ss_process() - server-specific request process routine
-**
-**     would be called from tet_si_service() when state is PS_PROCESS
-**
-**     tcm only uses tet_si_clientloop() which itself returns as soon as a
-**     process reaches this state, so tet_ss_process() should never be called
-**/
-
-#ifdef PROTOTYPES
-TET_EXPORT void tet_ss_process(struct ptab *pp)
-#else
-TET_EXPORT void tet_ss_process(pp)
-struct ptab *pp;
-#endif
-{
-       error(0, "internal error - tet_ss_process called!",
-               tet_r2a(&pp->pt_rid));
-}
-
-/*
- * The following functions are simply wrappers for the real functions
- * in tcm_bs.c, tcm_in.c and tcm_xt.c.  This is done so that tccd, xresd
- * and syncd cannot resolve these symbols in libapi.a.
- */
-
-extern int tet_tcm_bs2md PROTOLIST((char *, struct ptab *));
-
-#ifdef PROTOTYPES
-TET_EXPORT int tet_ss_bs2md(char *from, struct ptab *pp)
-#else
-TET_EXPORT int tet_ss_bs2md(from, pp)
-char *from;
-struct ptab *pp;
-#endif
-{
-       return tet_tcm_bs2md(from, pp);
-}
-
-extern int tet_tcm_md2bs PROTOLIST((struct ptab *, char **, int *, int));
-
-#ifdef PROTOTYPES
-TET_EXPORT int tet_ss_md2bs(struct ptab *pp, char **bp, int *lp, int offs)
-#else
-TET_EXPORT int tet_ss_md2bs(pp, bp, lp, offs)
-struct ptab *pp;
-char **bp;
-int *lp, offs;
-#endif
-{
-       return tet_tcm_md2bs(pp, bp, lp, offs);
-}
-
-extern int tet_tcm_tsconnect PROTOLIST((struct ptab *));
-
-#ifdef PROTOTYPES
-TET_EXPORT int tet_ss_tsconnect(struct ptab *pp)
-#else
-TET_EXPORT int tet_ss_tsconnect(pp)
-struct ptab *pp;
-#endif
-{
-       return tet_tcm_tsconnect(pp);
-}
-
-extern int tet_tcm_tsinfo PROTOLIST((struct ptab *, int));
-
-#ifdef PROTOTYPES
-TET_EXPORT int tet_ss_tsinfo(struct ptab *pp, int ptype)
-#else
-TET_EXPORT int tet_ss_tsinfo(pp, ptype)
-struct ptab *pp;
-int ptype;
-#endif
-{
-       return tet_tcm_tsinfo(pp, ptype);
-}
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* -END-LITE-CUT- */
-
diff --git a/src/tet3/tcm/tcmchild.c.orig b/src/tet3/tcm/tcmchild.c.orig
deleted file mode 100644
index 59a9e515dea7..000000000000
--- a/src/tet3/tcm/tcmchild.c.orig
+++ /dev/null
@@ -1,371 +0,0 @@
-/*
- *      SCCS:  @(#)tcmchild.c  1.13 (98/09/01) 
- *
- *     UniSoft Ltd., London, England
- *
- * (C) Copyright 1992 X/Open Company Limited
- *
- * All rights reserved.  No part of this source code may be reproduced,
- * stored in a retrieval system, or transmitted, in any form or by any
- * means, electronic, mechanical, photocopying, recording or otherwise,
- * except as stated in the end-user licence agreement, without the prior
- * permission of the copyright owners.
- *
- * X/Open and the 'X' symbol are trademarks of X/Open Company Limited in
- * the UK and other countries.
- */
-
-/************************************************************************
-
-SCCS:          @(#)tcmchild.c  1.13 98/09/01 TETware release 3.3
-NAME:          tcmchild.c
-PRODUCT:       TETware
-AUTHOR:                Andrew Dingwall, UniSoft Ltd.
-DATE CREATED:  October 1992
-
-DESCRIPTION:
-       tcm main() and client-related functions for processes
-       started by tet_exec() and tet_spawn()
-
-MODIFICATIONS:
-       Denis McConalogue, UniSoft Limited, September 1993
-       changed tet_tcmptype() to set process type PT_MTCM for
-       non-distributed test cases executing on remote or
-       local systems.
-
-       Andrew Dingwall, UniSoft Ltd., August 1996
-       changes for TETware
-
-       Geoff Clare, UniSoft Ltd., Sept 1996
-       changes for TETware-Lite
-
-       Geoff Clare, UniSoft Ltd., Oct 1996
-       restructured tcm source to avoid "ld -r"
-       (this file was ctcmfuncs.c - moved main() and other things here)
-
-       Andrew Dingwall, UniSoft Ltd., April 1997
-       initialise tet_pname in case it gets used (in tet_dtcmerror())
-       before it can be set up in tet_tcm*_main()
-
-       Andrew Dingwall, UniSoft Ltd., July 1998
-       Added support for shared API libraries.
-       Note that this includes a change to the calling convention for
-       child processes.
-
-       Aaron Plattner, April 2010
-       Fixed warnings when compiled with GCC's -Wall option.
-
-************************************************************************/
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <stdio.h>
-#  include <signal.h>
-#include "dtmac.h"
-#include "dtmsg.h"
-#include "dtthr.h"
-#include "globals.h"
-#include "tcmfuncs.h"
-#include "error.h"
-#ifndef TET_LITE /* -START-LITE-CUT- */
-#  include "ptab.h"
-#  include "synreq.h"
-#  include "server.h"
-#  include "tslib.h"
-#  include "servlib.h"
-#endif         /* -END-LITE-CUT- */
-#include "dtetlib.h"
-#include "sigsafe.h"
-
-extern int     tet_tcmc_main PROTOLIST((int, char **));
-extern void    tet_dtcmerror PROTOLIST((int, char *, int, char *, char *));
-
-TET_EXPORT char *tet_pname = "<unknown>";
-TET_EXPORT int tet_thistest = -1;
-
-#ifndef TET_LITE /* -START-LITE-CUT- */
-int tet_psysid = -1;                   /* parent's system id */
-TET_EXPORT long tet_snid = -1L;                /* sync id */
-TET_EXPORT long tet_xrid = -1L;                /* xres id */
-TET_EXPORT int *tet_snames;            /* system name list */
-TET_EXPORT int tet_Nsname;             /* number of system names */
-TET_EXPORT struct ptab *tet_sdptab, *tet_xdptab;
-                                       /* ptab elements for syncd and xresd */
-#endif         /* -END-LITE-CUT- */
-
-TET_EXPORT sigset_t tet_blockable_sigs;
-
-#ifdef TET_THREADS
-TET_EXPORT tet_thread_t tet_start_tid;
-#endif /* TET_THREADS */
-
-#ifdef __cplusplus
-}
-#endif
-
-/*
-**     main() is the main program for processes started by tet_exec().
-**     It is simply a wrapper for tet_tcmc_main().
-*/
-
-#ifdef PROTOTYPES
-int main(int argc, char **argv)
-#else
-int main(argc, argv)
-int    argc;
-char   **argv;
-#endif
-{
-
-#ifdef TET_LITE                                        /* -LITE-CUT-LINE- */
-#  define MYPTYPE      PT_MTCM
-#  define MYSYSID      0
-#else                                          /* -START-LITE-CUT- */
-#  define MYPTYPE      -1
-#  define MYSYSID      -1
-#endif                                         /* -END-LITE-CUT- */
-
-       /* must be first */
-       tet_init_globals(argc > 0 ? tet_basename(*argv) : "child process 
controller",
-               MYPTYPE, MYSYSID, tet_dtcmerror, tet_genfatal);
-
-       /*
-       ** make sure that we are linked with the right version of
-       ** the API library
-       */
-       tet_check_apilib_version();
-
-
-       return tet_tcmc_main(argc, argv);
-}
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifndef TET_LITE /* -START-LITE-CUT- */
-
-/*
-**     tet_tcm_async() - dummy auto-sync function for child TCMs
-**
-**     child TCMs do not do auto-syncs, so this function should only be
-**     called with spno == SV_EXEC_SPNO from tet_tcminit()
-*/
-
-/* ARGSUSED */
-#ifdef PROTOTYPES
-TET_EXPORT int tet_tcm_async(long spno, int vote, int timeout,
-           struct synreq *synreq, int *nsys)
-#else
-TET_EXPORT int tet_tcm_async(spno, vote, timeout, synreq, nsys)
-long spno;
-int vote, timeout, *nsys;
-struct synreq *synreq;
-#endif
-{
-       ASSERT(spno == SV_EXEC_SPNO);
-
-       tet_sderrno = ER_OK;
-       return(0);
-}
-
-/*
-**     tet_tcmptype() - return process type for a TCM
-**
-**     In TETware there is almost no difference between "master" and
-**     "slave" TCMs and this function is only used to decide which
-**     TCMs in a distributed test case should inform XRESD of IC and
-**     TP start and end.
-**     Someone has to do it so it might as well be the first (or only)
-**     system in the system list.
-*/
-
-int tet_tcmptype PROTOLIST((void))
-{
-       int sys1;
-
-       sys1 = tet_snames ? *tet_snames : -1;
-
-       return (tet_mysysid == sys1 ? PT_MTCM : PT_STCM);
-}
-
-/*
-**     tet_ss_dead() - server-specific dead process handler
-**
-**     should only be called from tet_si_service() when a server dies
-**     unexpectedly
-**
-**     server logoff routines do not come here
-*/
-
-#ifdef PROTOTYPES
-TET_EXPORT void tet_ss_dead(struct ptab *pp)
-#else
-TET_EXPORT void tet_ss_dead(pp)
-struct ptab *pp;
-#endif
-{
-       /* emit a diagnostic if this is unexpected */
-       if ((pp->pt_flags & PF_LOGGEDOFF) == 0)
-               error(0, "server connection closed", tet_r2a(&pp->pt_rid));
-
-       pp->pt_flags = (pp->pt_flags & ~PF_LOGGEDON) | PF_LOGGEDOFF;
-}
-
-/*
-**     tet_ss_connect() - connect to remote process
-*/
-
-#ifdef PROTOTYPES
-TET_EXPORT void tet_ss_connect(struct ptab *pp)
-#else
-TET_EXPORT void tet_ss_connect(pp)
-struct ptab *pp;
-#endif
-{
-       tet_ts_connect(pp);
-}
-
-/*
-**     tet_ss_ptalloc(), tet_ss_ptfree()  - allocate and free server-specific
-**             ptab data area
-**
-**     tcm does not make use of server-specific data
-*/
-
-#ifdef PROTOTYPES
-TET_EXPORT int tet_ss_ptalloc(struct ptab *pp)
-#else
-TET_EXPORT int tet_ss_ptalloc(pp)
-struct ptab *pp;
-#endif
-{
-       pp->pt_sdata = (char *) 0;
-       return(0);
-}
-
-/* ARGSUSED */
-#ifdef PROTOTYPES
-TET_EXPORT void tet_ss_ptfree(struct ptab *pp)
-#else
-void tet_ss_ptfree(pp)
-struct ptab *pp;
-#endif
-{
-       /* nothing */
-}
-
-/*
-**     tet_ss_serverloop() - server-specific server loop
-**
-**     this may be called from tet_si_servwait() if non-blocking message i/o
-**     would block
-**
-**     tcm does not do non-blocking i/o, so this should never occur
-*/
-
-TET_EXPORT int tet_ss_serverloop PROTOLIST((void))
-{
-       error(0, "internal error - serverloop called!", (char *) 0);
-       return(-1);
-}
-
-/*
-**     tet_ss_process() - server-specific request process routine
-**
-**     would be called from tet_si_service() when state is PS_PROCESS
-**
-**     tcm only uses tet_si_clientloop() which itself returns as soon as a
-**     process reaches this state, so tet_ss_process() should never be called
-**/
-
-#ifdef PROTOTYPES
-TET_EXPORT void tet_ss_process(struct ptab *pp)
-#else
-TET_EXPORT void tet_ss_process(pp)
-struct ptab *pp;
-#endif
-{
-       error(0, "internal error - tet_ss_process called!",
-               tet_r2a(&pp->pt_rid));
-}
-
-/*
- * The following functions are simply wrappers for the real functions
- * in tcm_bs.c, tcm_in.c and tcm_xt.c.  This is done so that tccd, xresd
- * and syncd cannot resolve these symbols in libapi.a.
- */
-
-extern int tet_tcm_bs2md PROTOLIST((char *, struct ptab *));
-
-#ifdef PROTOTYPES
-TET_EXPORT int tet_ss_bs2md(char *from, struct ptab *pp)
-#else
-TET_EXPORT int tet_ss_bs2md(from, pp)
-char *from;
-struct ptab *pp;
-#endif
-{
-       return tet_tcm_bs2md(from, pp);
-}
-
-extern int tet_tcm_md2bs PROTOLIST((struct ptab *pp, char **bp, int *lp,
-       int offs));
-
-#ifdef PROTOTYPES
-TET_EXPORT int tet_ss_md2bs(struct ptab *pp, char **bp, int *lp, int offs)
-#else
-TET_EXPORT int tet_ss_md2bs(pp, bp, lp, offs)
-struct ptab *pp;
-char **bp;
-int *lp, offs;
-#endif
-{
-       return tet_tcm_md2bs(pp, bp, lp, offs);
-}
-
-extern int tet_tcm_tsconnect PROTOLIST((struct ptab *));
-
-#ifdef PROTOTYPES
-TET_EXPORT int tet_ss_tsconnect(struct ptab *pp)
-#else
-TET_EXPORT int tet_ss_tsconnect(pp)
-struct ptab *pp;
-#endif
-{
-       return tet_tcm_tsconnect(pp);
-}
-
-extern int tet_tcm_tsinfo PROTOLIST((struct ptab *, int));
-
-#ifdef PROTOTYPES
-TET_EXPORT int tet_ss_tsinfo(struct ptab *pp, int ptype)
-#else
-TET_EXPORT int tet_ss_tsinfo(pp, ptype)
-struct ptab *pp;
-int ptype;
-#endif
-{
-       return tet_tcm_tsinfo(pp, ptype);
-}
-
-#endif /* -END-LITE-CUT- */
-
-
-/*
-**     tet_callfuncname() - return name of tcmchild's calling function
-**             for use in error messages
-*/
-
-char *tet_callfuncname PROTOLIST((void))
-{
-       return("tet_exec() or tet_spawn()");
-}
-
-#ifdef __cplusplus
-}
-#endif
-
diff --git a/src/tet3/tcmshlib/makefile.orig b/src/tet3/tcmshlib/makefile.orig
deleted file mode 100644
index 1631e6f22c48..000000000000
--- a/src/tet3/tcmshlib/makefile.orig
+++ /dev/null
@@ -1,139 +0,0 @@
-#
-#      SCCS: @(#)makefile      1.1 (98/09/01)
-#
-#      UniSoft Ltd., London, England
-#
-# Copyright (c) 1998 The Open Group
-# All rights reserved.
-#
-# No part of this source code may be reproduced, stored in a retrieval
-# system, or transmitted, in any form or by any means, electronic,
-# mechanical, photocopying, recording or otherwise, except as stated in
-# the end-user licence agreement, without the prior permission of the
-# copyright owners.
-# A copy of the end-user licence agreement is contained in the file
-# Licence which accompanies this distribution.
-# 
-# Motif, OSF/1, UNIX and the "X" device are registered trademarks and
-# IT DialTone and The Open Group are trademarks of The Open Group in
-# the US and other countries.
-#
-# X/Open is a trademark of X/Open Company Limited in the UK and other
-# countries.
-#
-# ************************************************************************
-#
-# SCCS:        @(#)makefile    1.1 98/09/01 TETware release 3.3
-# NAME:                makefile
-# PRODUCT:     TETware
-# AUTHOR:      Andrew Dingwall, UniSoft Ltd.
-# DATE CREATED:        August 1998
-#
-# DESCRIPTION:
-#      makefile used to build the shared library tcms and the static
-#      part of the API shared library
-# 
-# MODIFICATIONS:
-# 
-# ************************************************************************
-
-include ../../defines.mk
-include ../ts.mk
-
-LOCAL_TET_CDEFS = $(TET_CDEFS)
-LOCAL_DTET_CDEFS = $(DTET_CDEFS)
-LOCAL_CDEFS = -DTET_SHLIB
-LOCAL_COPTS = $(COPTS)
-LOCAL_CC = $(CC)
-
-# TET_CFLAGS and DTET_CFLAGS are set in ../common.mk
-include ../common.mk
-
-
-LIBNAME = $(LIB)/libtcm_s$A
-
-# generic C build targets
-ALL_GN = tcm$O tcmchild$O
-TARGETS_GN = $(LIB)/tcm_s$O $(LIB)/tcmchild_s$O
-
-# additional targets when building the TCM in Distributed TETware
-ALL_DIST = tcmrem$O
-TARGETS_DIST_S = $(LIB)/tcmrem_s$O
-
-# this sets ALL_TS, TARGETS_TS_S and TCM_OFILES_TS
-include ../tcm/ts.mk
-
-# C build targets
-ALL = $(ALL_GN) $(ALL_TS)
-TARGETS = $(TARGETS_GN) $(TARGETS_TS_S)
-
-# C++ build targets
-# (tcmrem$O isn't supported in the C++ API)
-ALLC = Ctcm$O Ctcmchild$O
-TARGETSC = $(LIB)/Ctcm_s$O $(LIB)/Ctcmchild_s$O
-
-
-all: $(ALL) lib_made
-
-allC: $(ALLC)
-
-install: $(TARGETS) lib_made
-
-installC: $(TARGETSC)
-
-# tcm/shared.mk contains a definition of TCM_STATIC_OFILES
-TCMSRC = ../tcm/
-APISHLIBSRC = ../apishlib/
-include ../tcm/shared.mk
-
-# apilib/shared.mk contains a definition of API_STATIC_OFILES
-APISRC = ../apilib/
-include ../apilib/shared.mk
-
-
-$(LIB)/tcm_s$O: tcm$O
-       cp $? $@
-
-$(LIB)/tcmrem_s$O: tcmrem$O
-       cp $? $@
-
-$(LIB)/tcmchild_s$O: tcmchild$O
-       cp $? $@
-
-$(LIB)/Ctcm_s$O: Ctcm$O
-       cp $? $@
-
-$(LIB)/Ctcmchild_s$O: Ctcmchild$O
-       cp $? $@
-
-
-OFILES = $(TCM_STATIC_OFILES) $(API_STATIC_OFILES)
-
-lib_made: $(OFILES)
-       if test -f lib_made; then \
-               $(AR) rv $(LIBNAME) $? ;\
-       else \
-               $(AR) rv $(LIBNAME) `$(LORDER) $(OFILES) | $(TSORT)` ;\
-       fi
-       $(RANLIB) $(LIBNAME)
-       touch lib_made
-
-.PRECIOUS: $(LIBNAME)
-
-
-CLEAN clean:
-       rm -f $(ALL) $(ALLC) $(OFILES) dynlink_gen_made
-
-CLOBBER clobber: clean
-       rm -f $(TARGETS) $(TARGETSC) $(LIBNAME) lib_made
-
-FORCE FRC: clobber all
-
-
-# remove suffix rules from this makefile
-# all .o files are made by explicit rules
-.SUFFIXES:
-
-.SUFFIXES: .none
-
-
diff --git a/src/tet3/tcmthr/makefile.orig b/src/tet3/tcmthr/makefile.orig
deleted file mode 100644
index a8627e32589d..000000000000
--- a/src/tet3/tcmthr/makefile.orig
+++ /dev/null
@@ -1,129 +0,0 @@
-#
-#      SCCS: @(#)makefile      1.10 (98/09/01)
-#
-#      UniSoft Ltd., London, England
-#
-# (C) Copyright 1996 X/Open Company Limited
-#
-# All rights reserved.  No part of this source code may be reproduced,
-# stored in a retrieval system, or transmitted, in any form or by any
-# means, electronic, mechanical, photocopying, recording or otherwise,
-# except as stated in the end-user licence agreement, without the prior
-# permission of the copyright owners.
-# A copy of the end-user licence agreement is contained in the file
-# Licence which accompanies this distribution.
-# 
-# X/Open and the 'X' symbol are trademarks of X/Open Company Limited in
-# the UK and other countries.
-#
-# ************************************************************************
-#
-# SCCS:        @(#)makefile    1.10 98/09/01
-# NAME:                makefile
-# PRODUCT:     TETware
-# AUTHOR:      Geoff Clare, UniSoft Ltd.
-# DATE CREATED:        August 1996
-#
-# DESCRIPTION:
-#      tcmthr makefile
-# 
-# MODIFICATIONS:
-#      Geoff Clare, UniSoft Ltd., Oct 1996
-#      Restructured tcm source to avoid "ld -r".
-#      Use ../tcm/shared.mk.
-#
-#      Andrew Dingwall, UniSoft Ltd., July 1998
-#      Added support for shared API libraries.
-#
-# ************************************************************************
-
-include ../../defines.mk
-include ../ts.mk
-
-LOCAL_TET_CDEFS = $(TET_THR_CDEFS)
-LOCAL_DTET_CDEFS = $(DTET_THR_CDEFS)
-LOCAL_CDEFS = -DTET_THREADS
-LOCAL_COPTS = $(THR_COPTS)
-LOCAL_CC = $(CC)
-
-# TET_CFLAGS and DTET_CFLAGS are set in ../common.mk
-include ../common.mk
-
-
-LIBNAME = $(LIBTHRAPI)
-
-# generic C build targets
-ALL_GN = tcm$O tcmchild$O
-TARGETS_GN = $(LIB)/thrtcm$O $(LIB)/thrtcmchild$O
-
-# additional targets when building the TCM in Distributed TETware
-# (tcmrem$O isn't supported in a thread-safe API)
-ALL_DIST =
-TARGETS_DIST =
-
-# this sets TCM_OFILES_TS
-include ../tcm/ts.mk
-
-# C build targets
-# (tcmrem$O isn't supported in the thread-safe API)
-ALL = $(ALL_GN)
-TARGETS = $(TARGETS_GN)
-
-# C++ build targets
-# (tcmrem$O isn't supported in the C++ API)
-ALLC = Ctcm$O Ctcmchild$O
-TARGETSC = $(LIB)/Cthrtcm$O $(LIB)/Cthrtcmchild$O
-
-all: $(ALL) lib_made
-
-allC: $(ALLC)
-
-install: $(TARGETS) lib_made
-
-installC: $(TARGETSC)
-
-# this sets TCM_OFILES
-TCMSRC = ../tcm/
-APISHLIBSRC =
-include ../tcm/shared.mk
-
-$(LIB)/thrtcm$O: tcm$O
-       cp $? $@
-
-$(LIB)/thrtcmchild$O: tcmchild$O
-       cp $? $@
-
-$(LIB)/Cthrtcm$O: Ctcm$O
-       cp $? $@
-
-$(LIB)/Cthrtcmchild$O: Ctcmchild$O
-       cp $? $@
-
-OFILES = $(TCM_OFILES)
-
-lib_made: $(OFILES)
-       if test -f lib_made; then \
-               $(AR) rv $(LIBNAME) $? ;\
-       else \
-               $(AR) rv $(LIBNAME) `$(LORDER) $(OFILES) | $(TSORT)` ;\
-       fi
-       $(RANLIB) $(LIBNAME)
-       touch lib_made
-
-.PRECIOUS: $(LIBNAME)
-
-CLEAN clean:
-       rm -f $(OFILES) $(ALL) $(ALLC) dynlink_gen_made
-
-CLOBBER clobber: clean
-       rm -f $(TARGETS) $(TARGETSC) lib_made
-
-FORCE FRC: clobber all
-
-
-# remove suffix rules from this makefile
-# all .o files are made by explicit rules
-.SUFFIXES:
-
-.SUFFIXES: .none
-
-- 
2.9.3

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to