summaryrefslogtreecommitdiff
path: root/devel/asmutils/files/patch-lib_testm.c
blob: f677332c498e259b5346cf02a4548b06cd1d8484 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
--- lib/testm.c.orig	Fri Jul 20 14:02:56 2001
+++ lib/testm.c	Wed Jan 26 15:35:47 2005
@@ -16,10 +16,22 @@
 # define __USE_BSD 1
 # define __USE_XOPEN 1
 # define __USE_SVID 1
-#include <math.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <assert.h>
+
+#define	M_LOG2E		1.4426950408889634074	/* log 2e */
+#define	M_LOG10E	0.43429448190325182765	/* log 10e */
+#define	M_LN2		0.69314718055994530942	/* log e2 */
+#define	M_LN10		2.30258509299404568402	/* log e10 */
+#define	M_E		2.7182818284590452354	/* e */
+#define	M_PI		3.14159265358979323846	/* pi */
+#if __FreeBSD_version < 501103
+extern char __infinity[];
+#define	HUGE_VAL	(*(double *) __infinity)
+#else
+#define	HUGE_VAL	__builtin_huge_val()
+#endif
 
 #ifndef NAN
 #define NAN (0./0.)