diff --git a/gfx/cairo/cairo/src/cairoint.h b/gfx/cairo/cairo/src/cairoint.h index 37b672b46e8..d9b675dca40 100644 --- a/gfx/cairo/cairo/src/cairoint.h +++ b/gfx/cairo/cairo/src/cairoint.h @@ -161,6 +161,13 @@ CAIRO_BEGIN_DECLS #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 #define ARRAY_LENGTH(__array) ((int) (sizeof (__array) / sizeof (__array[0]))) diff --git a/gfx/cairo/nonfatal-assertions.patch b/gfx/cairo/nonfatal-assertions.patch index e8d8751654a..dcbb904abd2 100644 --- a/gfx/cairo/nonfatal-assertions.patch +++ b/gfx/cairo/nonfatal-assertions.patch @@ -1,39 +1,17 @@ -Index: gfx/cairo/cairo/src/cairoint.h -=================================================================== -RCS file: /cvsroot/mozilla/gfx/cairo/cairo/src/cairoint.h,v -retrieving revision 1.34 -diff -u -p -1 -2 -r1.34 cairoint.h ---- gfx/cairo/cairo/src/cairoint.h 4 Apr 2007 01:09:16 -0000 1.34 -+++ gfx/cairo/cairo/src/cairoint.h 1 Jun 2007 02:05:18 -0000 -@@ -231,24 +231,31 @@ typedef void *cairo_mutex_t; - #define FALSE 0 - #endif - - #ifndef TRUE - #define TRUE 1 - #endif +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 MOZILLA_CAIRO_NOT_DEFINED -+/* Make assertions non-fatal */ ++#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 - #ifndef INT32_MAX - # ifdef INT_MAX - # define INT32_MAX INT_MAX - # define INT32_MIN INT_MIN - # else - # define INT32_MAX 2147483647 - # define INT32_MIN (-2147483647 - 1) - # endif - #endif #endif - /* Size in bytes of buffer to use off the stack per functions. + #undef ARRAY_LENGTH