aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-12-05 18:58:59 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-12-05 18:58:59 +0200
commita31dfac365feef7838b01b1efd3fe058c89484d7 (patch)
treef52ad0d5fe1bef7da35183ed7e1efecece4c8e3d
parent26fb0c3f00952782dacf457ff9d7ec7d76f260f4 (diff)
Prevent assert() expansion during ODB compilation
-rw-r--r--brep/package10
1 files changed, 10 insertions, 0 deletions
diff --git a/brep/package b/brep/package
index b3d4890..056e2a8 100644
--- a/brep/package
+++ b/brep/package
@@ -33,6 +33,16 @@ namespace brep
#include <bpkg/manifest>
+// Prevent assert() macro expansion in get/set expressions. This should
+// appear after all #include directives since the assert() macro is
+// redefined in each <assert.h> inclusion.
+//
+#ifdef ODB_COMPILER
+# undef assert
+# define assert assert
+void assert (int);
+#endif
+
// We have to keep these mappings at the global scope instead of inside
// the brep namespace because they need to be also effective in the
// bpkg namespace from which we "borrow" types (and some of them use