From 1107edcc526be724072a585174a5408d9b1a1824 Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Sun, 9 Nov 2014 10:39:50 -0800 Subject: [PATCH] ffi_test: Fix compilation on Windows. --- vm/ffi_test.c | 5 +++++ vm/ffi_test.h | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/vm/ffi_test.c b/vm/ffi_test.c index 65b24faa71..06ce2b2af7 100644 --- a/vm/ffi_test.c +++ b/vm/ffi_test.c @@ -307,6 +307,9 @@ unsigned long long ffi_test_60(unsigned long long x) { return x; } +/* C99 features */ +#ifndef _MSC_VER + struct bool_and_ptr ffi_test_61() { struct bool_and_ptr bap; bap.b = true; @@ -327,3 +330,5 @@ struct ulonglong_pair ffi_test_63() { ullp.b = 0x1234567891234567; return ullp; } + +#endif diff --git a/vm/ffi_test.h b/vm/ffi_test.h index a36d66cf43..8326097a8a 100644 --- a/vm/ffi_test.h +++ b/vm/ffi_test.h @@ -203,6 +203,11 @@ FACTOR_EXPORT FACTOR_FASTCALL(struct test_struct_11) FACTOR_EXPORT signed long long ffi_test_59(signed long long x); FACTOR_EXPORT unsigned long long ffi_test_60(unsigned long long x); +/* C99 features */ +#ifndef _MSC_VER + +#include + struct bool_and_ptr { bool b; void* ptr; @@ -223,3 +228,5 @@ struct ulonglong_pair { }; FACTOR_EXPORT struct ulonglong_pair ffi_test_63(); + +#endif