You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ldc/0001-Fix-compilability-on-n...

36 lines
931 B

From 036e3d63037e7f8d9403526501ba95b741babc6f Mon Sep 17 00:00:00 2001
From: Martin Kinkelin <noone@nowhere.com>
Date: Thu, 5 Jul 2018 22:02:01 +0200
Subject: [PATCH 1/2] Fix compilability on non-x86 archs with 64-bit reals
---
dmd/root/longdouble.d | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/dmd/root/longdouble.d b/dmd/root/longdouble.d
index ba6cff0..c1cbc2b 100644
--- a/dmd/root/longdouble.d
+++ b/dmd/root/longdouble.d
@@ -10,10 +10,15 @@
module dmd.root.longdouble;
-static if (real.sizeof > 8)
- alias longdouble = real;
+version(CRuntime_Microsoft)
+{
+ static if (real.sizeof > 8)
+ alias longdouble = real;
+ else
+ alias longdouble = longdouble_soft;
+}
else
- alias longdouble = longdouble_soft;
+ alias longdouble = real;
// longdouble_soft needed when building the backend with
// Visual C or the frontend with LDC on Windows
--
2.17.1