diff options
Diffstat (limited to 'mps/code/eventpro.c')
| -rw-r--r-- | mps/code/eventpro.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/mps/code/eventpro.c b/mps/code/eventpro.c index 5655d35171b..16cbf41d3c9 100644 --- a/mps/code/eventpro.c +++ b/mps/code/eventpro.c | |||
| @@ -356,20 +356,20 @@ void EventDestroy(EventProc proc, Event event) | |||
| 356 | 356 | ||
| 357 | /* Checking macros, copied from check.h */ | 357 | /* Checking macros, copied from check.h */ |
| 358 | 358 | ||
| 359 | #define CHECKLVALUE(lv1, lv2) \ | 359 | #define COMPATLVALUE(lv1, lv2) \ |
| 360 | ((void)sizeof((lv1) = (lv2)), (void)sizeof((lv2) = (lv1)), TRUE) | 360 | ((void)sizeof((lv1) = (lv2)), (void)sizeof((lv2) = (lv1)), TRUE) |
| 361 | 361 | ||
| 362 | #define CHECKTYPE(t1, t2) \ | 362 | #define COMPATTYPE(t1, t2) \ |
| 363 | (sizeof(t1) == sizeof(t2) && \ | 363 | (sizeof(t1) == sizeof(t2) && \ |
| 364 | CHECKLVALUE(*((t1 *)0), *((t2 *)0))) | 364 | COMPATLVALUE(*((t1 *)0), *((t2 *)0))) |
| 365 | 365 | ||
| 366 | #define CHECKFIELDAPPROX(s1, f1, s2, f2) \ | 366 | #define COMPATFIELDAPPROX(s1, f1, s2, f2) \ |
| 367 | (sizeof(((s1 *)0)->f1) == sizeof(((s2 *)0)->f2) && \ | 367 | (sizeof(((s1 *)0)->f1) == sizeof(((s2 *)0)->f2) && \ |
| 368 | offsetof(s1, f1) == offsetof(s2, f2)) | 368 | offsetof(s1, f1) == offsetof(s2, f2)) |
| 369 | 369 | ||
| 370 | #define CHECKFIELD(s1, f1, s2, f2) \ | 370 | #define COMPATFIELD(s1, f1, s2, f2) \ |
| 371 | (CHECKFIELDAPPROX(s1, f1, s2, f2) && \ | 371 | (COMPATFIELDAPPROX(s1, f1, s2, f2) && \ |
| 372 | CHECKLVALUE(((s1 *)0)->f1, ((s2 *)0)->f2)) | 372 | COMPATLVALUE(((s1 *)0)->f1, ((s2 *)0)->f2)) |
| 373 | 373 | ||
| 374 | 374 | ||
| 375 | /* EventProcCreate -- initialize the module */ | 375 | /* EventProcCreate -- initialize the module */ |
| @@ -383,8 +383,8 @@ Res EventProcCreate(EventProc *procReturn, Bool partial, | |||
| 383 | if (proc == NULL) return ResMEMORY; | 383 | if (proc == NULL) return ResMEMORY; |
| 384 | 384 | ||
| 385 | /* check event struct access */ | 385 | /* check event struct access */ |
| 386 | assert(CHECKFIELD(EventUnion, any.code, EventWSStruct, code)); | 386 | assert(COMPATFIELD(EventUnion, any.code, EventWSStruct, code)); |
| 387 | assert(CHECKFIELD(EventUnion, any.clock, EventWSStruct, clock)); | 387 | assert(COMPATFIELD(EventUnion, any.clock, EventWSStruct, clock)); |
| 388 | /* check use of labelTable */ | 388 | /* check use of labelTable */ |
| 389 | #if !defined(MPS_OS_FR) | 389 | #if !defined(MPS_OS_FR) |
| 390 | /* GCC -ansi -pedantic -Werror on FreeBSD will fail here | 390 | /* GCC -ansi -pedantic -Werror on FreeBSD will fail here |