gfx/cairo/nonfatal-assertions.patch
author enndeakin@sympatico.ca
Mon, 03 Dec 2007 08:33:42 -0800
changeset 8591 f026e5054abb16e6897c71cacd70f21f6ebb27aa
parent 4141 e8cc84bb4b083c58a3f24b889ad3ed0ed406ab2c
child 10415 99224b77f8026554900a9991c3369da59651083b
permissions -rw-r--r--
Bug 401627, better way of handling click to close menu so that it doesn't reopen the menu again, r+sr=roc

diff -r b79d47dad1ea gfx/cairo/cairo/src/cairoint.h
--- a/gfx/cairo/cairo/src/cairoint.h	Fri Jun 08 18:09:53 2007 -0700
+++ b/gfx/cairo/cairo/src/cairoint.h	Fri Jun 29 09:18:02 2007 +0200
@@ -159,6 +159,13 @@ CAIRO_BEGIN_DECLS
 
 #ifndef M_PI
 #define M_PI 3.14159265358979323846
+#endif
+
+#ifndef NDEBUG
+#undef assert
+#define assert(expr) \
+    do { if (!(expr)) fprintf(stderr, "Assertion failed at %s:%d: %s\n", \
+          __FILE__, __LINE__, #expr); } while (0)
 #endif
 
 #undef  ARRAY_LENGTH