equal
deleted
inserted
replaced
28 |
28 |
29 #include "shmem_md.h" |
29 #include "shmem_md.h" |
30 #include "sysShmem.h" |
30 #include "sysShmem.h" |
31 #include "shmemBase.h" /* for exitTransportWithError */ |
31 #include "shmemBase.h" /* for exitTransportWithError */ |
32 |
32 |
|
33 /* Use THIS_FILE when it is available. */ |
|
34 #ifndef THIS_FILE |
|
35 #define THIS_FILE __FILE__ |
|
36 #endif |
|
37 |
33 /* |
38 /* |
34 * These functions are not completely universal. For now, they are used |
39 * These functions are not completely universal. For now, they are used |
35 * exclusively for Jbug's shared memory transport mechanism. They have |
40 * exclusively for Jbug's shared memory transport mechanism. They have |
36 * been implemented on Win32 only so far, so the abstractions may not be correct |
41 * been implemented on Win32 only so far, so the abstractions may not be correct |
37 * yet. |
42 * yet. |
42 #ifdef DEBUG |
47 #ifdef DEBUG |
43 #define sysAssert(expression) { \ |
48 #define sysAssert(expression) { \ |
44 if (!(expression)) { \ |
49 if (!(expression)) { \ |
45 exitTransportWithError \ |
50 exitTransportWithError \ |
46 ("\"%s\", line %d: assertion failure\n", \ |
51 ("\"%s\", line %d: assertion failure\n", \ |
47 __FILE__, __DATE__, __LINE__); \ |
52 THIS_FILE, __DATE__, __LINE__); \ |
48 } \ |
53 } \ |
49 } |
54 } |
50 #else |
55 #else |
51 #define sysAssert(expression) ((void) 0) |
56 #define sysAssert(expression) ((void) 0) |
52 #endif |
57 #endif |