blob: 02f6b8149f8490d3360759d63be38ab2654e61f2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
$NetBSD: patch-aq,v 1.7 2014/07/22 12:13:28 wiz Exp $
Add workaround for lack of fmax/fmin on NetBSD<6 and DragonFly before 200204.
--- poppler/TextOutputDev.cc.orig Mon Jan 24 19:06:00 2011
+++ poppler/TextOutputDev.cc
@@ -64,6 +64,14 @@
#include "ICSupport.h"
#endif
+#if defined(__DragonFly__) || defined(__NetBSD__)
+#include <sys/param.h>
+#if !(defined(__DragonFly__) && __DragonFly_version >= 200204) && !(defined(__NetBSD__) && (__NetBSD_Version__ >= 599002100 || (__NetBSD_Version__ >= 501000000 && __NetBSD_Version__ < 599000000)))
+static double fmax(double x, double y) { if (isnan(x)) return y; if (isnan(y)) return x; return (x > y ? x : y);}
+static double fmin(double x, double y) { if (isnan(x)) return y; if (isnan(y)) return x; return (x < y ? x : y);}
+#endif
+#endif
+
//------------------------------------------------------------------------
// parameters
//------------------------------------------------------------------------
|