Mercurial > projects > ldc
diff dmd/constfold.c @ 734:6dcab994ddc3
Fold in mandel's patch for ARM from #106
author | Christian Kamm <kamm incasoftware de> |
---|---|
date | Mon, 27 Oct 2008 16:36:59 +0100 |
parents | a26b0c5d5942 |
children | eee9efe5b51f |
line wrap: on
line diff
--- a/dmd/constfold.c Mon Oct 27 01:40:47 2008 +0100 +++ b/dmd/constfold.c Mon Oct 27 16:36:59 2008 +0100 @@ -487,9 +487,10 @@ c = fmodl(e1->toReal(), r2) + fmodl(e1->toImaginary(), r2) * I; #elif defined(IN_GCC) c = complex_t(e1->toReal() % r2, e1->toImaginary() % r2); -#elif defined(__FreeBSD__) && __FreeBSD_version < 800000 - // freebsd is kinda messed up. the STABLE branch doesn't support C99's fmodl !?! - c = complex_t(fmod(e1->toReal(), r2), fmod(e1->toImaginary(), r2)); +#elif (defined(__FreeBSD__) && __FreeBSD_version < 800000) || defined(__arm__) + // 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(fmodl(e1->toReal(), r2), fmodl(e1->toImaginary(), r2)); #endif @@ -501,9 +502,10 @@ c = fmodl(e1->toReal(), i2) + fmodl(e1->toImaginary(), i2) * I; #elif defined(IN_GCC) c = complex_t(e1->toReal() % i2, e1->toImaginary() % i2); -#elif defined(__FreeBSD__) && __FreeBSD_version < 800000 +#elif (defined(__FreeBSD__) && __FreeBSD_version < 800000) || defined(__arm__) // freebsd is kinda messed up. the STABLE branch doesn't support C99's fmodl !?! - c = complex_t(fmod(e1->toReal(), i2), fmod(e1->toImaginary(), i2)); + // arm also doesn't like fmodl + c = complex_t(fmod(e1->toReal(), i2), fmod(e1->toImaginary(), i2)); #else c = complex_t(fmodl(e1->toReal(), i2), fmodl(e1->toImaginary(), i2)); #endif