From cb505ee6950098ed7fb328b97a009a641fb8da06 Mon Sep 17 00:00:00 2001 From: Danny Smith Date: Wed, 8 Nov 2006 21:58:18 +0000 Subject: [ mingw-Bugs-1590623 ] * include/_mingw.h (__CRT_INLINE): Use __gnu_inline__ attribute in C99 mode. --- winsup/mingw/ChangeLog | 6 ++++++ winsup/mingw/include/_mingw.h | 17 +++++++++++------ 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/winsup/mingw/ChangeLog b/winsup/mingw/ChangeLog index 45d706561..e600b361b 100644 --- a/winsup/mingw/ChangeLog +++ b/winsup/mingw/ChangeLog @@ -1,3 +1,9 @@ +2006-11-09 Danny Smith + + [ mingw-Bugs-1590623 ] + * include/_mingw.h (__CRT_INLINE): Use __gnu_inline__ attribute + in C99 mode. + 2006-10-04 Corinna Vinschen * Makefile.in: Semi-revert semi-reversion of 2006-08-30 change, now diff --git a/winsup/mingw/include/_mingw.h b/winsup/mingw/include/_mingw.h index c0b1ac9fa..a8200d684 100644 --- a/winsup/mingw/include/_mingw.h +++ b/winsup/mingw/include/_mingw.h @@ -23,6 +23,7 @@ #ifndef __MINGW_H #define __MINGW_H + /* These are defined by the user (or the compiler) to specify how identifiers are imported from a DLL. @@ -104,12 +105,6 @@ # endif #endif /* __GNUC__ */ -#ifdef __cplusplus -#define __CRT_INLINE inline -#else -#define __CRT_INLINE extern __inline__ -#endif - #if defined (__GNUC__) && defined (__GNUC_MINOR__) #define __MINGW_GNUC_PREREQ(major, minor) \ (__GNUC__ > (major) \ @@ -118,6 +113,16 @@ #define __MINGW_GNUC_PREREQ(major, minor) 0 #endif +#ifdef __cplusplus +# define __CRT_INLINE inline +#else +# if ( __MINGW_GNUC_PREREQ(4, 3) && __STDC_VERSION__ >= 199901L) +# define __CRT_INLINE extern __attribute__((__gnu__inline__)) inline +# else +# define __CRT_INLINE extern __inline__ +# endif +#endif + #ifdef __cplusplus # define __UNUSED_PARAM(x) #else -- cgit v1.2.3