Browse Source

* interp.c: Include float.h and define SIGTRAP if _WIN32.

WIN32 -> _WIN32.
	* (trap):  Do do SYS_chown for _WIN32.
gdb-4_18-branch
Stu Grossman 30 years ago
parent
commit
2717217130
  1. 6
      sim/sh/ChangeLog
  2. 15
      sim/sh/interp.c

6
sim/sh/ChangeLog

@ -1,3 +1,9 @@
Fri Apr 18 18:57:04 1997 Stu Grossman (grossman@critters.cygnus.com)
* interp.c: Include float.h and define SIGTRAP if _WIN32.
WIN32 -> _WIN32.
* (trap): Do do SYS_chown for _WIN32.
Fri Apr 18 13:33:09 1997 Doug Evans <dje@canuck.cygnus.com> Fri Apr 18 13:33:09 1997 Doug Evans <dje@canuck.cygnus.com>
* interp.c (sim_resume): Fix argument to poll_quit. * interp.c (sim_resume): Fix argument to poll_quit.

15
sim/sh/interp.c

@ -35,6 +35,11 @@
#include <math.h> #include <math.h>
#ifdef _WIN32
#include <float.h> /* Needed for _isnan() */
#define isnan _isnan
#endif
#ifndef SIGBUS #ifndef SIGBUS
#define SIGBUS SIGSEGV #define SIGBUS SIGSEGV
#endif #endif
@ -43,6 +48,10 @@
#define SIGQUIT SIGTERM #define SIGQUIT SIGTERM
#endif #endif
#ifndef SIGTRAP
#define SIGTRAP 5
#endif
#define O_RECOMPILE 85 #define O_RECOMPILE 85
#define DEFINE_TABLE #define DEFINE_TABLE
#define DISASSEMBLER_TABLE #define DISASSEMBLER_TABLE
@ -341,7 +350,7 @@ int empty[16];
#define TL(x) if ((x) == prevlock) stalls++; #define TL(x) if ((x) == prevlock) stalls++;
#define TB(x,y) if ((x) == prevlock || (y)==prevlock) stalls++; #define TB(x,y) if ((x) == prevlock || (y)==prevlock) stalls++;
#if defined(__GO32__) || defined(WIN32) #if defined(__GO32__) || defined(_WIN32)
int sim_memory_size = 19; int sim_memory_size = 19;
#else #else
int sim_memory_size = 24; int sim_memory_size = 24;
@ -479,7 +488,7 @@ trap (i, regs, memory, maskl, maskw, little_endian)
switch (regs[4]) switch (regs[4])
{ {
#if !defined(__GO32__) && !defined(WIN32) #if !defined(__GO32__) && !defined(_WIN32)
case SYS_fork: case SYS_fork:
regs[0] = fork (); regs[0] = fork ();
break; break;
@ -578,9 +587,11 @@ trap (i, regs, memory, maskl, maskw, little_endian)
} }
break; break;
#ifndef _WIN32
case SYS_chown: case SYS_chown:
regs[0] = chown (ptr (regs[5]), regs[6], regs[7]); regs[0] = chown (ptr (regs[5]), regs[6], regs[7]);
break; break;
#endif /* _WIN32 */
case SYS_chmod: case SYS_chmod:
regs[0] = chmod (ptr (regs[5]), regs[6]); regs[0] = chmod (ptr (regs[5]), regs[6]);
break; break;

Loading…
Cancel
Save