summaryrefslogtreecommitdiff
path: root/print/xdvik/patches/patch-ab
blob: 4de305bb293def7347df0f01133db79228bcfde4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
$NetBSD: patch-ab,v 1.2 2017/09/06 16:49:47 wiz Exp $

Make sure xdvik compiles even if floor is defined by the OS (which is
the case on Mac OS 10.4 at least)

--- special.c.orig	2008-05-03 12:45:10.000000000 -0700
+++ special.c
@@ -181,7 +181,9 @@ static Boolean parse_color (const char *
 #define	MAX_PEN_SIZE	7	/* Max pixels of pen width */
 #define	TWOPI		(3.14159265359 * 2.0)
 
+#ifndef floor
 extern double floor(double);
+#endif
 #define	rint(x)	floor((x) + 0.5)
 
 static int xx[MAXPOINTS], yy[MAXPOINTS];	/* Path in milli-inches */