From 49def6e99b1cad1d87c93f7caa4d60f8b83cbe9d Mon Sep 17 00:00:00 2001 From: Ali Gholami Rudi Date: Thu, 23 Aug 2012 18:44:24 +0430 Subject: [PATCH] mupdf: define a private MIN() macro mupdf should not define its helper macros in its interface headers. With this patch fbpdf can be compiled with mupdf-1.1. --- mupdf.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mupdf.c b/mupdf.c index a45d4d5..e868dbc 100644 --- a/mupdf.c +++ b/mupdf.c @@ -4,6 +4,8 @@ #include "draw.h" #include "doc.h" +#define MIN_(a, b) ((a) < (b) ? (a) : (b)) + struct doc { fz_context *ctx; fz_document *pdf; @@ -29,8 +31,8 @@ int doc_draw(struct doc *doc, fbval_t *bitmap, int p, int rows, int cols, int zo rect = fz_bound_page(doc->pdf, page); rect = fz_transform_rect(ctm, rect); bbox = fz_round_rect(rect); - w = MIN(cols, rect.x1 - rect.x0); - h = MIN(rows, rect.y1 - rect.y0); + w = MIN_(cols, rect.x1 - rect.x0); + h = MIN_(rows, rect.y1 - rect.y0); pix = fz_new_pixmap_with_bbox(doc->ctx, fz_device_rgb, bbox); fz_clear_pixmap_with_value(doc->ctx, pix, 0xff); -- 2.11.4.GIT