diff options
author | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2008-08-21 03:03:23 +0000 |
---|---|---|
committer | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2008-08-21 03:03:23 +0000 |
commit | 0910d8883bcda3df3ac17268d381e47fe2627117 (patch) | |
tree | e91f4a7bd4f529ae2e3ed55f668d7fd12ca29bba /mpfr-impl.h | |
parent | 8f55b6e07735546fa3759715689e98acd91d91f3 (diff) | |
download | mpfr-0910d8883bcda3df3ac17268d381e47fe2627117.tar.gz |
mpfr-impl.h: as not all ICC versions define the __ICC macro (only
the __INTEL_COMPILER macro can be defined), define the __MPFR_ICC
and __MPFR_GNUC macros in another way.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@5579 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'mpfr-impl.h')
-rw-r--r-- | mpfr-impl.h | 34 |
1 files changed, 19 insertions, 15 deletions
diff --git a/mpfr-impl.h b/mpfr-impl.h index 5bc2adad5..dc6122596 100644 --- a/mpfr-impl.h +++ b/mpfr-impl.h @@ -109,31 +109,35 @@ MA 02110-1301, USA. */ # define __MPFR_STDC(version) 0 #endif -#if defined(__GNUC__) && defined(__GNUC_MINOR__) && !defined(__ICC) -# define __MPFR_GNUC(a, i) \ - (MPFR_VERSION_NUM(__GNUC__,__GNUC_MINOR__,0)>=MPFR_VERSION_NUM(a,i,0)) +#if defined(__ICC) +# define __MPFR_ICC(a,b,c) (__ICC >= (a)*100+(b)*10+(c)) +#elif defined(__INTEL_COMPILER) +# define __MPFR_ICC(a,b,c) (__INTEL_COMPILER >= (a)*100+(b)*10+(c)) #else -# define __MPFR_GNUC(a, i) 0 +# define __MPFR_ICC(a,b,c) 0 #endif -#if defined(__GLIBC__) && defined(__GLIBC_MINOR__) -# define __MPFR_GLIBC(a, i) \ - (MPFR_VERSION_NUM(__GLIBC__,__GLIBC_MINOR__,0)>=MPFR_VERSION_NUM(a,i,0)) +#if defined(__GNUC__) && defined(__GNUC_MINOR__) && ! __MPFR_ICC(0,0,0) +# define __MPFR_GNUC(a,i) \ + (MPFR_VERSION_NUM(__GNUC__,__GNUC_MINOR__,0) >= MPFR_VERSION_NUM(a,i,0)) #else -# define __MPFR_GLIBC(a, i) 0 +# define __MPFR_GNUC(a,i) 0 #endif -#if defined(__GNU_MP_VERSION)&&defined(__GNU_MP_VERSION_MINOR)&&defined(__GNU_MP_VERSION_PATCHLEVEL) -# define __MPFR_GMP(a, b, c) \ -(MPFR_VERSION_NUM(__GNU_MP_VERSION,__GNU_MP_VERSION_MINOR,__GNU_MP_VERSION_PATCHLEVEL) >= MPFR_VERSION_NUM(a,b,c)) +#if defined(__GLIBC__) && defined(__GLIBC_MINOR__) +# define __MPFR_GLIBC(a,i) \ + (MPFR_VERSION_NUM(__GLIBC__,__GLIBC_MINOR__,0) >= MPFR_VERSION_NUM(a,i,0)) #else -# define __MPFR_GMP(a, b, c) 0 +# define __MPFR_GLIBC(a,i) 0 #endif -#if defined(__ICC) -# define __MPFR_ICC(a,b,c) (__ICC >= (a)*100+(b)*10+c) +#if defined(__GNU_MP_VERSION) && \ + defined(__GNU_MP_VERSION_MINOR) && \ + defined(__GNU_MP_VERSION_PATCHLEVEL) +# define __MPFR_GMP(a,b,c) \ + (MPFR_VERSION_NUM(__GNU_MP_VERSION,__GNU_MP_VERSION_MINOR,__GNU_MP_VERSION_PATCHLEVEL) >= MPFR_VERSION_NUM(a,b,c)) #else -# define __MPFR_ICC(a,b,c) 0 +# define __MPFR_GMP(a,b,c) 0 #endif |