diff -ur ../uae-0.8.25-orig/src/include/cia.h src/include/cia.h
--- ../uae-0.8.25-orig/src/include/cia.h	2001-07-07 22:51:37 +0900
+++ src/include/cia.h	2007-11-25 01:22:08 +0900
@@ -15,9 +15,3 @@
 
 extern void dumpcia (void);
 extern void rethink_cias (void);
-extern unsigned int ciaaicr,ciaaimask,ciabicr,ciabimask;
-extern unsigned int ciaacra,ciaacrb,ciabcra,ciabcrb;
-extern unsigned int ciabpra;
-extern unsigned long ciaata,ciaatb,ciabta,ciabtb;
-extern unsigned long ciaatod,ciabtod,ciaatol,ciabtol,ciaaalarm,ciabalarm;
-extern int ciaatlatch,ciabtlatch;
diff -ur ../uae-0.8.25-orig/src/include/drawing.h src/include/drawing.h
--- ../uae-0.8.25-orig/src/include/drawing.h	2005-07-02 00:53:26 +0900
+++ src/include/drawing.h	2007-11-25 01:22:08 +0900
@@ -31,7 +31,7 @@
 
 #define max_diwlastword (PIXEL_XPOS(maxhpos) + 16)
 
-extern int lores_factor, lores_shift, sprite_width;
+extern int lores_factor, lores_shift;
 
 STATIC_INLINE int coord_hw_to_window_x (int x)
 {
@@ -197,8 +197,6 @@
     int nr_color_changes, nr_sprites;
 };
 
-extern int next_sprite_entry;
-
 extern struct decision line_decisions[2 * (MAXVPOS+1) + 1];
 extern struct draw_info line_drawinfo[2][2 * (MAXVPOS+1) + 1];
 
diff -ur ../uae-0.8.25-orig/src/include/inputdevice.h src/include/inputdevice.h
--- ../uae-0.8.25-orig/src/include/inputdevice.h	2005-07-03 01:24:06 +0900
+++ src/include/inputdevice.h	2007-11-25 01:22:08 +0900
@@ -24,7 +24,6 @@
     int (*get_widget_type)(int,int,char*,uae_u32*);
     int (*get_widget_first)(int,int);
 };
-extern struct inputdevice_functions idev[3];
 extern struct inputdevice_functions inputdevicefunc_joystick;
 extern struct inputdevice_functions inputdevicefunc_mouse;
 extern struct inputdevice_functions inputdevicefunc_keyboard;
diff -ur ../uae-0.8.25-orig/src/include/memory.h src/include/memory.h
--- ../uae-0.8.25-orig/src/include/memory.h	2005-07-02 01:23:32 +0900
+++ src/include/memory.h	2007-11-25 01:22:08 +0900
@@ -72,7 +72,6 @@
 } addrbank;
 
 extern uae_u8 *filesysory;
-extern uae_u8 *rtarea;
 
 extern addrbank chipmem_bank;
 extern addrbank kickmem_bank;
diff -ur ../uae-0.8.25-orig/src/inputdevice.c src/inputdevice.c
--- ../uae-0.8.25-orig/src/inputdevice.c	2005-07-03 01:23:50 +0900
+++ src/inputdevice.c	2007-11-25 01:22:08 +0900
@@ -105,6 +105,8 @@
 static uae_u8 mouse_settings_reset[MAX_INPUT_SETTINGS][MAX_INPUT_DEVICES];
 static uae_u8 joystick_settings_reset[MAX_INPUT_SETTINGS][MAX_INPUT_DEVICES];
 
+static struct inputdevice_functions idev[3];
+
 static int isdevice (struct uae_input_device *id)
 {
     int i, j;
@@ -511,12 +513,12 @@
 
 /* Mousehack stuff */
 
-static int ievent_alive = 0;
-static int lastmx, lastmy;
+static int mousehack_ievent_alive = 0;
+static int mousehack_lastmx, mousehack_lastmy;
 
 int mousehack_alive (void)
 {
-    return ievent_alive > 0;
+    return mousehack_ievent_alive > 0;
 }
 
 uae_u32 mousehack_helper (void)
@@ -525,22 +527,22 @@
 
 #ifdef PICASSO96
     if (picasso_on) {
-	mousexpos = lastmx - picasso96_state.XOffset;
-	mouseypos = lastmy - picasso96_state.YOffset;
+	mousexpos = mousehack_lastmx - picasso96_state.XOffset;
+	mouseypos = mousehack_lastmy - picasso96_state.YOffset;
     } else
 #endif
     {
 	if (mouse_y[0] >= gfxvidinfo.height)
 	    mouse_y[0] = gfxvidinfo.height - 1;
-	mouseypos = coord_native_to_amiga_y (lastmy) << 1;
-	mousexpos = coord_native_to_amiga_x (lastmx);
+	mouseypos = coord_native_to_amiga_y (mousehack_lastmy) << 1;
+	mousexpos = coord_native_to_amiga_x (mousehack_lastmx);
     }
 
     switch (m68k_dreg (regs, 0)) {
     case 0:
-	return ievent_alive ? -1 : needmousehack ();
+	return mousehack_ievent_alive ? -1 : needmousehack ();
     case 1:
-	ievent_alive = 10;
+	mousehack_ievent_alive = 10;
 	if (!mousehack_allowed ())
 	    return 0;
 	return mousexpos;
@@ -1324,8 +1326,8 @@
     input_read = 1;
     input_vpos = 0;
     inputdevice_handle_inputcode ();
-    if (ievent_alive > 0)
-	ievent_alive--;
+    if (mousehack_ievent_alive > 0)
+	mousehack_ievent_alive--;
 #ifdef ARCADIA
     if (arcadia_rom)
 	arcadia_vsync ();
@@ -1334,7 +1336,7 @@
 
 void inputdevice_reset (void)
 {
-    ievent_alive = 0;
+    mousehack_ievent_alive = 0;
 }
 
 static void setbuttonstateall (struct uae_input_device *id, struct uae_input_device2 *id2, int button, int state)
@@ -1739,8 +1741,6 @@
     return 0;
 }
 
-static struct inputdevice_functions idev[3];
-
 void inputdevice_init (void)
 {
     idev[IDTYPE_JOYSTICK] = inputdevicefunc_joystick;
@@ -2264,9 +2264,9 @@
 	*oldm_p = data;
 	*mouse_p += d;
 	if (axis == 0)
-	    lastmx = data;
+	    mousehack_lastmx = data;
 	else
-	    lastmy = data;
+	    mousehack_lastmy = data;
     }
     v = (int)(d > 0 ? d + 0.5 : d - 0.5);
     fract1[mouse][axis] += d;
