[cairo] Win32 Port

Mathieu Lacage Mathieu.Lacage at sophia.inria.fr
Thu Feb 10 04:43:20 PST 2005


For what it is worth, you can use the trick used by autoconf (I believe)
to detect these cases:

static char test_array[sizeof (int) - 5];

Which will not compile with every known compiler since negative-sized
arrays are illegal C.

All you have to do is to put these tests in one of the files you
compile...

regards,
Mathieu

On Thu, 2005-02-10 at 07:36 -0500, Carl Worth wrote:
> On Thu, 10 Feb 2005 12:15:33 +1100, "Matthew Allen" wrote:
> > Ok fixed the problem. I was compiling with a broken stdint.h,
> 
> Ouch. I'm glad you tracked that one down.
> 
> > Maybe it'd be nice to have a few runtime
> > assert(sizeof(???) == ???)'s to sanity check that critical types are
> > the right size?
> 
> I don't think so. I think this is approaching the:
> 
> 	assert (1 != 0)
> 
> level of paranoia, and I don't think those kinds of things help
> improve the code clarity. (Plus, there's nothing more annoying than
> having to fix bugs in assertion statements themselves, something that
> gets more common if we get too assert-crazy).
> 
> -Carl
> _______________________________________________
> cairo mailing list
> cairo at cairographics.org
> http://lists.freedesktop.org/mailman/listinfo/cairo
-- 




More information about the cairo mailing list