$NetBSD: patch-aa,v 1.4 2006/03/06 23:02:13 joerg Exp $ --- src/pdfobj.c.orig 2006-03-06 22:44:45.000000000 +0000 +++ src/pdfobj.c @@ -2529,14 +2529,18 @@ pdf_compare_reference (pdf_obj *ref1, pd data1 = (pdf_indirect *) ref1->data; data2 = (pdf_indirect *) ref2->data; +#define COMPARE(x,y) ((x) > (y) ? 1 : -1) + if (data1->dirty != data2->dirty) - return (int) (data1->dirty - data2->dirty); + return COMPARE(data1->dirty, data2->dirty); if (data1->dirty_file != data2->dirty_file) - return (int) (data1->dirty_file - data2->dirty_file); + return COMPARE(data1->dirty_file, data2->dirty_file); if (data1->label != data2->label) - return (int) (data1->label - data2->label); + return COMPARE(data1->label, data2->label); if (data1->generation != data2->generation) - return (int) (data1->generation - data2->generation); + return COMPARE(data1->generation, data2->generation); + +#undef COMPARE return 0; }