1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-18 00:50:44 -08:00
emacs/mps/qa/test/testlib/platform.c
Richard Tucker 91255f558e Change to use mmqasym.h
Copied from Perforce
 Change: 20768
 ServerID: perforce.ravenbrook.com
1999-05-04 15:28:17 +01:00

43 lines
848 B
C

/* $HopeName: MMQA_harness!testlib:platform.c(trunk.3) $
*/
#include "testlib.h"
/* that includes platform.h, so we don't need to */
#ifdef MPS_OS_SU
void *memmove(void *to, void *from, size_t bytes)
{
bcopy((char *)from, (char *)to, (int)bytes);
return to;
}
#endif
#ifdef MPS_OS_W3
LONG mySEHFilter(LPEXCEPTION_POINTERS info) {
LPEXCEPTION_RECORD er;
int write;
unsigned long address;
er = info->ExceptionRecord;
if (er->ExceptionCode == EXCEPTION_ACCESS_VIOLATION) {
write = er->ExceptionInformation[0];
address = er->ExceptionInformation[1];
report("memoryerror", "true");
if (write == 1) {
report("memoryop", "write");
} else { /* write == 0 */
report("memoryop", "read");
}
report("memoryaddr", "%ld", address);
myabort();
}
/* otherwise don't interfere */
return EXCEPTION_CONTINUE_SEARCH;
}
#endif