From 27e4ee4770aa29e65e1a8293a3189d2f9cf7a647 Mon Sep 17 00:00:00 2001 From: Luke Ceddia Date: Wed, 18 Aug 2021 22:07:40 +1000 Subject: [PATCH] Detect non-x86 based architectures --- internal/c/libqb.cpp | 2 +- internal/c/os.h | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/internal/c/libqb.cpp b/internal/c/libqb.cpp index 55363f1c5..d47719aad 100644 --- a/internal/c/libqb.cpp +++ b/internal/c/libqb.cpp @@ -64,7 +64,7 @@ return (word << shift) | (word >> (32 - shift)); uint64 qbr_longdouble_to_uint64(long double f){if (f<0) return(f-0.5f); else return(f+0.5f);} int32 qbr_float_to_long(float f){if (f<0) return(f-0.5f); else return(f+0.5f);} int32 qbr_double_to_long(double f){if (f<0) return(f-0.5f); else return(f+0.5f);} - void fpu_reinit() { // do nothing } + void fpu_reinit() { } // do nothing #else //QBASIC compatible rounding via FPU: //FLDS=load single diff --git a/internal/c/os.h b/internal/c/os.h index 9865681f9..869121445 100644 --- a/internal/c/os.h +++ b/internal/c/os.h @@ -40,6 +40,10 @@ #define QB64_32 #endif +#if !defined(i386) && !defined(__x86_64__) + #define QB64_NOT_X86 +#endif + /* common types (not quite an include guard, but allows an including * file to not have these included. *