diff options
Diffstat (limited to 'Build/source/texk/web2c/xetexdir/pdfimage.cpp')
-rw-r--r-- | Build/source/texk/web2c/xetexdir/pdfimage.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/Build/source/texk/web2c/xetexdir/pdfimage.cpp b/Build/source/texk/web2c/xetexdir/pdfimage.cpp index c5eb2fedcec..21af77c6572 100644 --- a/Build/source/texk/web2c/xetexdir/pdfimage.cpp +++ b/Build/source/texk/web2c/xetexdir/pdfimage.cpp @@ -18,6 +18,13 @@ #include "XeTeX_ext.h" +/* use our own fmin function because it seems to be missing on certain platforms */ +inline double +my_fmin(double x, double y) +{ + return (x < y) ? x : y; +} + int pdf_get_rect(char* filename, int page_num, int pdf_box, realrect* box) { @@ -66,8 +73,8 @@ pdf_get_rect(char* filename, int page_num, int pdf_box, realrect* box) break; } - box->x = 72 / 72.27 * fmin(r->x1, r->x2); - box->y = 72 / 72.27 * fmin(r->y1, r->y2); + box->x = 72 / 72.27 * my_fmin(r->x1, r->x2); + box->y = 72 / 72.27 * my_fmin(r->y1, r->y2); box->wd = 72 / 72.27 * fabs(r->x2 - r->x1); box->ht = 72 / 72.27 * fabs(r->y2 - r->y1); |