From 7a5fcb2f18733783e27f8f649f64464d39becf8b Mon Sep 17 00:00:00 2001 From: joerg Date: Mon, 6 Mar 2006 23:02:13 +0000 Subject: Use a macro to compare values based on comparisions. Don't subtract them and return it as int, since subtracting of pointers to incomplete types is not defined (FILE on DragonFly) or the result might be a multiple of INT_MAX (LP64). Bump revision. --- print/dvipdfmx/Makefile | 4 ++-- print/dvipdfmx/distinfo | 3 ++- print/dvipdfmx/patches/patch-aa | 27 +++++++++++++++++++++++++++ 3 files changed, 31 insertions(+), 3 deletions(-) create mode 100644 print/dvipdfmx/patches/patch-aa diff --git a/print/dvipdfmx/Makefile b/print/dvipdfmx/Makefile index 045b82ea684..5c4f8066330 100644 --- a/print/dvipdfmx/Makefile +++ b/print/dvipdfmx/Makefile @@ -1,8 +1,8 @@ -# $NetBSD: Makefile,v 1.23 2006/02/05 23:10:36 joerg Exp $ +# $NetBSD: Makefile,v 1.24 2006/03/06 23:02:13 joerg Exp $ DISTNAME= dvipdfmx-20050831 PKGNAME= ${DISTNAME:S/-/-0.0.0./} -PKGREVISION= 1 +PKGREVISION= 2 CATEGORIES= print converters MASTER_SITES= http://project.ktug.or.kr/dvipdfmx/snapshot/current/ diff --git a/print/dvipdfmx/distinfo b/print/dvipdfmx/distinfo index efc0c2ed53b..a00ce3958f0 100644 --- a/print/dvipdfmx/distinfo +++ b/print/dvipdfmx/distinfo @@ -1,6 +1,7 @@ -$NetBSD: distinfo,v 1.6 2006/01/15 21:26:41 minskim Exp $ +$NetBSD: distinfo,v 1.7 2006/03/06 23:02:13 joerg Exp $ SHA1 (dvipdfmx-20050831.tar.gz) = 331b41a7d139a166e7646c180e018463e2e54298 RMD160 (dvipdfmx-20050831.tar.gz) = 43c559fa663307998069ce79b49049d276484be4 Size (dvipdfmx-20050831.tar.gz) = 553761 bytes +SHA1 (patch-aa) = 436aa8f8c90ac8ad044d34cc53255ba089ae834e SHA1 (patch-ab) = 8725220e18a75c196b1519f961afccc7052664d2 diff --git a/print/dvipdfmx/patches/patch-aa b/print/dvipdfmx/patches/patch-aa new file mode 100644 index 00000000000..2ba772ddbf5 --- /dev/null +++ b/print/dvipdfmx/patches/patch-aa @@ -0,0 +1,27 @@ +$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; + } -- cgit v1.2.3