From e8644cf2ee8767ee5b9025542e333da85590c94f Mon Sep 17 00:00:00 2001 From: Bill-Gray Date: Thu, 8 Jun 2023 21:50:19 -0400 Subject: [PATCH] Fix to enable g++ compilation on M1/M2 processors (issue #37). --- lsquare.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lsquare.cpp b/lsquare.cpp index 16f318db..31694c35 100644 --- a/lsquare.cpp +++ b/lsquare.cpp @@ -44,10 +44,12 @@ idea for nearly-singular matrices. */ 112 bits of precision. Either is better than "ordinary" doubles with a mere 52 bits of precision. */ -#if ((__GNUC__ * 100) + __GNUC_MINOR__) >= 406 && !defined( __arm__) -#define ldouble __float128 +#if defined( __aarch64__) + #define ldouble _Float128 +#elif ((__GNUC__ * 100) + __GNUC_MINOR__) >= 406 && !defined( __arm__) + #define ldouble __float128 #else -#define ldouble long double + #define ldouble long double #endif #define LSQUARE struct lsquare