straighten out header includes, comment on Forward declarations
[model-checker.git] / common.h
index d4823dbfa5895b13a5f960d3f4ff3c9f5d7c3216..bb66c3a7f5d9cab70b680a8f2f42b89c7c468547 100644 (file)
--- a/common.h
+++ b/common.h
@@ -2,6 +2,7 @@
 #define __COMMON_H__
 
 #include <stdio.h>
+#include <stdlib.h>
 
 //#define CONFIG_DEBUG
 
 #define DBG_ENABLED() (0)
 #endif
 
+#define ASSERT(expr) \
+do { \
+       if (!(expr)) { \
+               fprintf(stderr, "Error: assertion failed in %s at line %d\n", __FILE__, __LINE__); \
+               exit(1); \
+       } \
+} while (0);
+
+
 void * myMalloc(size_t size);
 void myFree(void *ptr);