From 7e7af8c9208b1769e3b89927f0756dcc291a5a6f Mon Sep 17 00:00:00 2001 From: David Nadlinger Date: Fri, 31 May 2013 21:35:00 +0200 Subject: [PATCH] Prefer Port over #if-switching on the compiler. The issue might have to be revisited (with proper testing) for FreeBSD or ARM. --- dmd2/constfold.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/dmd2/constfold.c b/dmd2/constfold.c index 3b4c9111..1afc55b9 100644 --- a/dmd2/constfold.c +++ b/dmd2/constfold.c @@ -488,10 +488,6 @@ Expression *Mod(Type *type, Expression *e1, Expression *e2) c = Port::fmodl(e1->toReal(), r2) + Port::fmodl(e1->toImaginary(), r2) * I; #elif defined(IN_GCC) c = complex_t(e1->toReal() % r2, e1->toImaginary() % r2); -#elif (defined(__FreeBSD__) && __FreeBSD_version < 800000) || defined(__arm__) || defined(__thumb__) - // freebsd is kinda messed up. the STABLE branch doesn't support C99's fmodl !?! - // arm also doesn't like fmodl - c = complex_t(fmod(e1->toReal(), r2), fmod(e1->toImaginary(), r2)); #else c = complex_t(Port::fmodl(e1->toReal(), r2), Port::fmodl(e1->toImaginary(), r2)); #endif @@ -503,10 +499,6 @@ Expression *Mod(Type *type, Expression *e1, Expression *e2) c = Port::fmodl(e1->toReal(), i2) + Port::fmodl(e1->toImaginary(), i2) * I; #elif defined(IN_GCC) c = complex_t(e1->toReal() % i2, e1->toImaginary() % i2); -#elif (defined(__FreeBSD__) && __FreeBSD_version < 800000) || defined(__arm__) || defined(__thumb__) - // freebsd is kinda messed up. the STABLE branch doesn't support C99's fmodl !?! - // arm also doesn't like fmodl - c = complex_t(fmod(e1->toReal(), i2), fmod(e1->toImaginary(), i2)); #else c = complex_t(Port::fmodl(e1->toReal(), i2), Port::fmodl(e1->toImaginary(), i2)); #endif