diff -Naur gmp-4.2.1-orig/gmp-h.in gmp-4.2.1/gmp-h.in --- gmp-4.2.1-orig/gmp-h.in 2006-04-11 12:10:15.000000000 -0600 +++ gmp-4.2.1/gmp-h.in 2007-11-12 01:35:00.000000000 -0600 @@ -416,11 +416,17 @@ inline" would be an acceptable substitute if the compiler (or linker) discards unused statics. */ -/* 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. */ + /* 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. + GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 + inline semantics, unless -fgnu89-inline is used. */ #ifdef __GNUC__ +#ifdef __GNUC_STDC_INLINE__ +#define __GMP_EXTERN_INLINE extern __inline__ __attribute__ ((__gnu_inline__)) +#else #define __GMP_EXTERN_INLINE extern __inline__ +#endif #define __GMP_INLINE_PROTOTYPES 1 #endif @@ -512,8 +518,10 @@ #if defined (__cplusplus) extern "C" { +#ifdef _GMP_H_HAVE_FILE using std::FILE; #endif +#endif #define mp_set_memory_functions __gmp_set_memory_functions __GMP_DECLSPEC void mp_set_memory_functions __GMP_PROTO ((void *(*) (size_t), diff -Naur gmp-4.2.1-orig/tests/cxx/t-locale.cc gmp-4.2.1/tests/cxx/t-locale.cc --- gmp-4.2.1-orig/tests/cxx/t-locale.cc 2006-03-14 09:57:54.000000000 -0600 +++ gmp-4.2.1/tests/cxx/t-locale.cc 2007-11-12 01:36:04.000000000 -0600 @@ -20,6 +20,7 @@ MA 02110-1301, USA. */ #include +#include #include #include "gmp.h"