summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorDavid Schleef <ds@schleef.org>2010-08-27 23:37:54 -0700
committerDavid Schleef <ds@schleef.org>2010-08-27 23:37:54 -0700
commitc587322dea2125af4813e4b46ad94b15af3f8a15 (patch)
treeb274d16f2a6a0e3eaefc98c2a10a568a4f2d36e5 /testsuite
parenta71612319ecdb0d0f06c01331174f329b031ea14 (diff)
Fix MSVC build errors
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/memcpy_speed.c3
-rw-r--r--testsuite/show_parse.c4
2 files changed, 7 insertions, 0 deletions
diff --git a/testsuite/memcpy_speed.c b/testsuite/memcpy_speed.c
index f03bfec..25f96a9 100644
--- a/testsuite/memcpy_speed.c
+++ b/testsuite/memcpy_speed.c
@@ -84,6 +84,9 @@ main(int argc, char *argv[])
result = orc_program_compile (p);
}
+#ifndef M_LN2
+#define M_LN2 0.69314718055994530942
+#endif
orc_get_data_cache_sizes (&level1, &level2, &level3);
if (level3 > 0) {
max = (log(level3)/M_LN2 - 6.0) * 10 + 20;
diff --git a/testsuite/show_parse.c b/testsuite/show_parse.c
index f96fd5b..6796f6a 100644
--- a/testsuite/show_parse.c
+++ b/testsuite/show_parse.c
@@ -11,6 +11,10 @@
#include <math.h>
#include <string.h>
+#ifdef _MSC_VER
+#define isnan(x) _isnan(x)
+#endif
+
static char * read_file (const char *filename);
void output_code (OrcProgram *p, FILE *output);
void output_code_header (OrcProgram *p, FILE *output);