diff -cr fpu-emu/fpu_entr.c d:fpu-emu/fpu_entr.c
*** fpu-emu/fpu_entr.c	Sat Mar 26 13:04:24 1994
--- d:fpu-emu/fpu_entr.c	Mon Nov 07 19:38:10 1994
***************
*** 1,3 ****
--- 1,4 ----
+ /* fpu_entr.c -- changed for emx by Eberhard Mattes -- Nov 1994 */
  /*---------------------------------------------------------------------------+
   |  fpu_entry.c                                                              |
   |                                                                           |
***************
*** 179,184 ****
--- 180,186 ----
  
    FPU_ORIG_EIP = FPU_EIP;
  
+ #ifndef EMX
    if ( !addr_modes.vm86 )
      {
        /* user code space? */
***************
*** 194,199 ****
--- 196,202 ----
  	  math_abort(FPU_info,SIGILL);
  	}
      }
+ #endif
  
    FPU_lookahead = 1;
    if (current->flags & PF_PTRACED)
diff -cr fpu-emu/fpu_syst.h d:fpu-emu/fpu_syst.h
*** fpu-emu/fpu_syst.h	Wed Feb 16 12:07:56 1994
--- d:fpu-emu/fpu_syst.h	Mon Nov 07 19:38:28 1994
***************
*** 1,3 ****
--- 1,4 ----
+ /* fpu_syst.h -- changed for emx by Eberhard Mattes -- Nov 1994 */
  /*---------------------------------------------------------------------------+
   |  fpu_system.h                                                             |
   |                                                                           |
***************
*** 17,23 ****
--- 18,28 ----
  
  /* This sets the pointer FPU_info to point to the argument part
     of the stack frame of math_emulate() */
+ #ifndef EMX
  #define SETUP_DATA_AREA(arg)    FPU_info = (struct info *) &arg
+ #else
+ #define SETUP_DATA_AREA(arg)    FPU_info = (struct info *) arg
+ #endif
  
  #define I387			(current->tss.i387)
  #define FPU_info		(I387.soft.info)
***************
*** 28,34 ****
--- 33,44 ----
  #define FPU_EAX			(FPU_info->___eax)
  #define FPU_EFLAGS		(FPU_info->___eflags)
  #define FPU_EIP			(FPU_info->___eip)
+ #ifndef EMX
  #define FPU_ORIG_EIP		(FPU_info->___orig_eip)
+ #else
+ #define FPU_ORIG_EIP		orig_eip
+ extern int orig_eip;
+ #endif
  
  #define FPU_lookahead           (I387.soft.lookahead)
  #define FPU_entry_eip           (I387.soft.entry_eip)
diff -cr fpu-emu/get_addr.c d:fpu-emu/get_addr.c
*** fpu-emu/get_addr.c	Sat Mar 26 13:04:24 1994
--- d:fpu-emu/get_addr.c	Mon Nov 07 19:38:40 1994
***************
*** 1,3 ****
--- 1,4 ----
+ /* get_addr.c -- changed for emx by Eberhard Mattes -- Nov 1994 */
  /*---------------------------------------------------------------------------+
   |  get_address.c                                                            |
   |                                                                           |
***************
*** 41,52 ****
--- 42,64 ----
  
  static int reg_offset_vm86[] = {
  	offsetof(struct info,___cs),
+ #ifndef EMX
  	offsetof(struct info,___vm86_ds),
  	offsetof(struct info,___vm86_es),
  	offsetof(struct info,___vm86_fs),
  	offsetof(struct info,___vm86_gs),
+ #else /* EMX */
+ 	offsetof(struct info,___ds),
+ 	offsetof(struct info,___es),
+ 	offsetof(struct info,___fs),
+ 	offsetof(struct info,___gs),
+ #endif /* EMX */
  	offsetof(struct info,___ss),
+ #ifndef EMX
  	offsetof(struct info,___vm86_ds)
+ #else /* EMX */
+ 	offsetof(struct info,___ds)
+ #endif /* EMX */
        };
  
  #define VM86_REG_(x) (*(unsigned short *) \
diff -cr fpu-emu/include/linux/math_emu.h d:fpu-emu/include/linux/math_emu.h
*** fpu-emu/include/linux/math_emu.h	Wed Feb 16 12:07:56 1994
--- d:fpu-emu/include/linux/math_emu.h	Mon Nov 07 19:38:52 1994
***************
*** 1,3 ****
--- 1,4 ----
+ /* math_emu.h -- changed for emx by Eberhard Mattes -- Nov 1994 */
  #ifndef _LINUX_MATH_EMU_H
  #define _LINUX_MATH_EMU_H
  
***************
*** 14,19 ****
--- 15,21 ----
     following a device-not-present interrupt, part of it saved
     automatically by the 80386/80486.
     */
+ #ifndef EMX
  struct info {
  	long ___orig_eip;
  	long ___ret_from_system_call;
***************
*** 39,43 ****
--- 41,68 ----
  	long ___vm86_fs;
  	long ___vm86_gs;
  };
+ #else
+ struct info {
+ 	short ___gs;
+ 	short ___fs;
+ 	short ___es;
+ 	short ___ds;
+ 	long ___edi;
+ 	long ___esi;
+ 	long ___ebp;
+ 	long ___esp_1;
+ 	long ___ebx;
+ 	long ___edx;
+ 	long ___ecx;
+ 	long ___eax;
+ 	long ___errcd;
+ 	long ___eip;
+ 	long ___cs;
+ 	long ___eflags;
+ 	long ___esp;
+ 	long ___ss;
+ };
+ #endif /* EMX */
  
  #endif
+ /* linux/math_emu.h */
