diff -ruN klic-3.003-2002-01-05/runtime/config/pvm/distrmon.c klic-3.003-2002-01-06/runtime/config/pvm/distrmon.c
--- klic-3.003-2002-01-05/runtime/config/pvm/distrmon.c	Sat Dec 29 12:46:20 2001
+++ klic-3.003-2002-01-06/runtime/config/pvm/distrmon.c	Sun Jan  6 11:54:00 2002
@@ -27,6 +27,8 @@
 
 #if defined(VPP) || defined(AP3000)
 static FILE *rmonfile;
+#else
+static int rmon_tid;
 #endif
 
 void
diff -ruN klic-3.003-2002-01-05/runtime/intrpt.c klic-3.003-2002-01-06/runtime/intrpt.c
--- klic-3.003-2002-01-05/runtime/intrpt.c	Tue Jan  1 14:17:47 2002
+++ klic-3.003-2002-01-06/runtime/intrpt.c	Sun Jan  6 11:58:53 2002
@@ -11,6 +11,8 @@
 #include "schedule.h"
 #ifdef DIST
 #include "rmon.h"
+#define GC_ON()    (perfmon_state.gc_on = 1)
+#define GC_OFF()   (perfmon_state.gc_on = 0)
 #else
 #define GC_ON()
 #define GC_OFF()
diff -ruN klic-3.003-2002-01-05/runtime/kmain.c klic-3.003-2002-01-06/runtime/kmain.c
--- klic-3.003-2002-01-05/runtime/kmain.c	Sat Jan  5 12:42:25 2002
+++ klic-3.003-2002-01-06/runtime/kmain.c	Sun Jan  6 11:57:59 2002
@@ -40,6 +40,9 @@
 #include "interpe.h"
 #include "rmon.h"
 
+#define IDLE_ON()  (perfmon_state.idle_on = 1)
+#define IDLE_OFF() (perfmon_state.idle_on = 0)
+
 int receive_message();
 q* gc_exp_table();
 q* gc_decode_stack();
diff -ruN klic-3.003-2002-01-05/runtime/profile.c klic-3.003-2002-01-06/runtime/profile.c
--- klic-3.003-2002-01-05/runtime/profile.c	Sat Jan  5 11:45:09 2002
+++ klic-3.003-2002-01-06/runtime/profile.c	Sun Jan  6 12:04:02 2002
@@ -16,6 +16,8 @@
 #include "interpe.h"
 #include "rmon.h"
 
+static int gather_prof_ready = 1;
+
 /*
  * Profiler support routines
  * static q* decode_send_profile(inbuf, allocp)
@@ -35,6 +37,7 @@
 combuf *inbuf;
 q *allocp;
 {
+  static int gathered_count = 0;
     declare_globals;
     long node;
     node = GET_BUFFER(inbuf);
diff -ruN klic-3.003-2002-01-05/runtime/rmon.h klic-3.003-2002-01-06/runtime/rmon.h
--- klic-3.003-2002-01-05/runtime/rmon.h	Fri Dec 28 13:46:47 2001
+++ klic-3.003-2002-01-06/runtime/rmon.h	Sun Jan  6 12:02:29 2002
@@ -37,18 +37,7 @@
 Extern volatile struct perfmon_counter perfmon_counter;
 
 Extern char* rmonnode;
-Extern int rmon_tid;
 
-#define IDLE_ON()  (perfmon_state.idle_on = 1)
-#define IDLE_OFF() (perfmon_state.idle_on = 0)
-#define GC_ON()    (perfmon_state.gc_on = 1)
-#define GC_OFF()   (perfmon_state.gc_on = 0)
-#define SEND_ON()  (perfmon_state.ms_on = 1)
-#define SEND_OFF() (perfmon_state.ms_on = 0)
-#define RECV_ON()  (perfmon_state.mr_on = 1)
-#define RECV_OFF() (perfmon_state.mr_on = 0)
-
-Extern int gather_prof_ready Init(1);
 struct profile_rec {
     long stimes;  /* sampling times */
     long itimes;  /* idle times */
@@ -58,7 +47,6 @@
 };
 
 Extern struct profile_rec* shoen_profile;
-Extern int gathered_count Init(0);
 
 Extern long* send_pbuf;
 
diff -ruN klic-3.003-2002-01-05/runtime/sendrecv.c klic-3.003-2002-01-06/runtime/sendrecv.c
--- klic-3.003-2002-01-05/runtime/sendrecv.c	Sat Jan  5 11:48:17 2002
+++ klic-3.003-2002-01-06/runtime/sendrecv.c	Sun Jan  6 11:59:58 2002
@@ -17,6 +17,11 @@
 #include "interpe.h"
 #include "rmon.h"
 
+#define SEND_ON()  (perfmon_state.ms_on = 1)
+#define SEND_OFF() (perfmon_state.ms_on = 0)
+#define RECV_ON()  (perfmon_state.mr_on = 1)
+#define RECV_OFF() (perfmon_state.mr_on = 0)
+
 extern combuf* backup_combuf();
 extern void send_packet();
 extern combuf* receive_packet();
