Mercurial > projects > ldc
diff dmd2/mtype.c @ 1188:442ab244c455
Apply small includes patch for FreeBSD. Thanks kimelto!
author | Christian Kamm <kamm incasoftware de> |
---|---|
date | Thu, 02 Apr 2009 19:16:44 +0200 |
parents | 4d366a75d95f |
children | 638d16625da2 |
line wrap: on
line diff
--- a/dmd2/mtype.c Wed Apr 01 00:52:31 2009 +0200 +++ b/dmd2/mtype.c Thu Apr 02 19:16:44 2009 +0200 @@ -9,7 +9,12 @@ // See the included readme.txt for details. #define __USE_ISOC99 1 // so signbit() gets defined + +#ifdef __DMC__ +#include <math.h> +#else #include <cmath> +#endif #include <stdio.h> #include <assert.h> @@ -31,18 +36,13 @@ //#define signbit 56 #endif -#if __APPLE__ -#include <cmath> -static double zero = 0; -#elif __MINGW32__ -#include <cmath> -static double zero = 0; -#elif __GNUC__ -#include <cmath> +#if __GNUC__ +#if !(defined (__SVR4) && defined (__sun)) #include <bits/nan.h> #include <bits/mathdef.h> +#endif +#endif static double zero = 0; -#endif #include "mem.h"