Index: Xwnmo/xjutil/init_w.c
--- Xwnmo/xjutil/init_w.c.orig
+++ Xwnmo/xjutil/init_w.c
@@ -35,6 +35,7 @@
 /*	Version 4.0
  */
 #include <stdio.h>
+#include <stdlib.h>
 #include "commonhd.h"
 #include "sdefine.h"
 #include "xjutil.h"
@@ -49,7 +50,7 @@
 		      LeaveWindowMask | ExposureMask)
 
 Display	*dpy = 0;
-Xjutil	*xjutil;
+extern Xjutil	*xjutil;
 
 char	xjutil_name[32] = {0};
 char	xjutil_name_ok[32] = {0};
@@ -64,9 +65,10 @@ XSetWindowAttributes attributes;
 Atom	wm_id = 0;
 Atom	wm_id1 = 0;
 
-Atom actual_type;
-int actual_format;
-unsigned long nitems, byte_after, leftover;
+extern Atom actual_type;
+extern int actual_format;
+extern unsigned long nitems, leftover;
+unsigned long byte_after;
 
 wchar_t dol_wchar_t;
 
@@ -76,7 +78,6 @@ env_state()
     char *p;
     char ret = '\0';
 #ifndef SYSVR2
-    extern char *index();
 #else
     extern char *strchr();
 #endif
