math.h has macros for isinf, isnan, isnormal, isfinite. remove teh
patches, it will just work. ok sthen@
This commit is contained in:
parent
03954f0126
commit
6d68596d52
@ -1,9 +1,9 @@
|
||||
# $OpenBSD: Makefile,v 1.3 2008/06/29 20:29:53 sthen Exp $
|
||||
# $OpenBSD: Makefile,v 1.4 2008/07/25 20:48:12 martynas Exp $
|
||||
|
||||
COMMENT= SVG vector drawing application
|
||||
|
||||
DISTNAME= inkscape-0.46
|
||||
PKGNAME= ${DISTNAME}p1
|
||||
PKGNAME= ${DISTNAME}p2
|
||||
CATEGORIES= graphics
|
||||
|
||||
MAINTAINER= Benoit Chesneau <benoitc@metavers.net>
|
||||
|
@ -1,21 +0,0 @@
|
||||
$OpenBSD: patch-src_2geom_isnan_h,v 1.1.1.1 2008/04/04 14:37:26 landry Exp $
|
||||
--- src/2geom/isnan.h.orig Tue Mar 11 05:19:39 2008
|
||||
+++ src/2geom/isnan.h Fri Mar 28 16:02:54 2008
|
||||
@@ -32,7 +32,7 @@
|
||||
# define is_nan(_a) (__isnan(_a)) /* MacOSX/Darwin definition < 10.4 */
|
||||
#elif defined(WIN32) || defined(_isnan)
|
||||
# define is_nan(_a) (_isnan(_a)) /* Win32 definition */
|
||||
-#elif defined(isnan) || defined(__FreeBSD__)
|
||||
+#elif defined(isnan) || defined(__FreeBSD__) || defined(__OpenBSD__)
|
||||
# define is_nan(_a) (isnan(_a)) /* GNU definition */
|
||||
#else
|
||||
# define is_nan(_a) (std::isnan(_a))
|
||||
@@ -49,6 +49,8 @@
|
||||
# define is_finite(_a) (__isfinite(_a)) /* MacOSX/Darwin definition < 10.4 */
|
||||
#elif defined(isfinite)
|
||||
# define is_finite(_a) (isfinite(_a))
|
||||
+#elif defined(__OpenBSD__)
|
||||
+# define is_finite(_a) (finite(_a) && !is_nan(_a))
|
||||
#else
|
||||
# define is_finite(_a) (std::isfinite(_a))
|
||||
#endif
|
@ -1,34 +0,0 @@
|
||||
$OpenBSD: patch-src_isnan_h,v 1.1.1.1 2008/04/04 14:37:26 landry Exp $
|
||||
--- src/isnan.h.orig Tue Mar 25 10:32:24 2008
|
||||
+++ src/isnan.h Tue Mar 25 10:34:01 2008
|
||||
@@ -19,8 +19,11 @@
|
||||
* 2005 modification hereby placed in public domain. Probably supercedes the 2004 copyright
|
||||
* for the code itself.
|
||||
*/
|
||||
-
|
||||
+#if defined(__OpenBSD__)
|
||||
+#include <cmath>
|
||||
+#else
|
||||
#include <math.h>
|
||||
+#endif
|
||||
/* You might try changing the above to <cmath> if you have problems.
|
||||
* Whether you use math.h or cmath, you may need to edit the .cpp file
|
||||
* and/or other .h files to use the same header file.
|
||||
@@ -32,7 +35,7 @@
|
||||
# define isNaN(_a) (__isnan(_a)) /* MacOSX/Darwin definition < 10.4 */
|
||||
#elif defined(WIN32) || defined(_isnan)
|
||||
# define isNaN(_a) (_isnan(_a)) /* Win32 definition */
|
||||
-#elif defined(isnan) || defined(__FreeBSD__) || defined(__osf__)
|
||||
+#elif defined(isnan) || defined(__FreeBSD__) || defined(__osf__) || defined(__OpenBSD__)
|
||||
# define isNaN(_a) (isnan(_a)) /* GNU definition */
|
||||
#elif defined (SOLARIS_2_8) && __GNUC__ == 3 && __GNUC_MINOR__ == 2
|
||||
# define isNaN(_a) (isnan(_a)) /* GNU definition */
|
||||
@@ -53,7 +56,7 @@
|
||||
# define isFinite(_a) (_isfinite(_a))
|
||||
#elif defined(isfinite)
|
||||
# define isFinite(_a) (isfinite(_a))
|
||||
-#elif defined(__osf__)
|
||||
+#elif defined(__osf__) || defined(__OpenBSD__)
|
||||
# define isFinite(_a) (finite(_a) && !isNaN(_a))
|
||||
#elif defined (SOLARIS_2_8) && __GNUC__ == 3 && __GNUC_MINOR__ == 2
|
||||
#include <ieeefp.h>
|
@ -1,17 +0,0 @@
|
||||
$OpenBSD: patch-src_isnormal_h,v 1.1.1.1 2008/04/04 14:37:26 landry Exp $
|
||||
--- src/isnormal.h.orig Sat Mar 29 12:23:26 2008
|
||||
+++ src/isnormal.h Sat Mar 29 12:28:01 2008
|
||||
@@ -9,7 +9,12 @@
|
||||
|
||||
#include <ieeefp.h>
|
||||
#define isnormal(x) (fpclass(x) >= FP_NZERO)
|
||||
-
|
||||
+
|
||||
+#elif defined(__OpenBSD__) && !defined(isnormal)
|
||||
+
|
||||
+ #include <math.h>
|
||||
+ #define isnormal(_a) (finite(_a) && ((_a) != 0.0))
|
||||
+
|
||||
#else
|
||||
|
||||
using std::isnormal;
|
Loading…
Reference in New Issue
Block a user