diff options
-rw-r--r-- | Build/source/texk/web2c/lib/texmfmp.c | 2 | ||||
-rw-r--r-- | Build/source/texk/web2c/xetexdir/pdfimage.cpp | 11 |
2 files changed, 10 insertions, 3 deletions
diff --git a/Build/source/texk/web2c/lib/texmfmp.c b/Build/source/texk/web2c/lib/texmfmp.c index 8d464a9a582..eb6636853a1 100644 --- a/Build/source/texk/web2c/lib/texmfmp.c +++ b/Build/source/texk/web2c/lib/texmfmp.c @@ -1602,7 +1602,7 @@ input_line P1C(FILE *, f) return true; } -#endif /* !XeTeX */ +#endif /* !XeTeX */ /* This string specifies what the `e' option does in response to an error message. */ 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); |