From d87194ae3ea8bd00ad3db80d877c40af74ea67a7 Mon Sep 17 00:00:00 2001 From: Juan Jose Garcia Ripoll Date: Mon, 3 Aug 2009 00:06:00 +0200 Subject: [PATCH] In src/gmp/gmp-h.in, changed the definition of __GMP_EXTERN_INLINE to include the fixes from MPIR (The semantics of extern inline has changed between releases of gcc) --- src/gmp/gmp-h.in | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/gmp/gmp-h.in b/src/gmp/gmp-h.in index b5581d848..8a70b1e25 100644 --- a/src/gmp/gmp-h.in +++ b/src/gmp/gmp-h.in @@ -419,11 +419,28 @@ typedef __mpq_struct *mpq_ptr; /* gcc has __inline__ in all modes, including strict ansi. Give a prototype for an inline too, so as to correctly specify "dllimport" on windows, in case the function is called rather than inlined. */ + #ifdef __GNUC__ -#define __GMP_EXTERN_INLINE extern __inline__ +#if defined(__APPLE_CC__) && (__APPLE_CC__ != 1) /* FSF GCC sets this flag to 1\ + on Apple machines */ + +#if ! (__APPLE_CC__ >= 5465 && __STDC_VERSION__ >= 199901L) +#define __GMP_EXTERN_INLINE extern __inline__ #define __GMP_INLINE_PROTOTYPES 1 #endif +#else /*GNU CC*/ + +#if defined(__GNUC_STDC_INLINE__) || defined (__GNUC_GNU_INLINE__) +#define __GMP_EXTERN_INLINE extern __inline__ __attribute__((__gnu_inline__)) +#else +#define __GMP_EXTERN_INLINE extern __inline__ +#endif +#define __GMP_INLINE_PROTOTYPES 1 + +#endif +#endif + /* DEC C (eg. version 5.9) supports "static __inline foo()", even in -std1 strict ANSI mode. Inlining is done even when not optimizing (ie. -O0 mode, which is the default), but an unnecessary local copy of foo is