This should fix ticket #3481 again. It keeps the same semantics as before when

the header is used for compiling with -std=c99 or -std=gnu99 and GCC4, which
has a reverted meaning of "extern inline" (now standard compliant).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29558 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stephan Aßmus 2009-03-16 09:40:33 +00:00
parent edb449545f
commit a6f9e71c98
1 changed files with 13 additions and 1 deletions

View File

@ -217,7 +217,19 @@ extern void _IO_free_backup_area(_IO_FILE *);
#ifdef __cplusplus
# define __INLINE inline
#else
# define __INLINE extern __inline
/* GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99
inline semantics. */
//#if __GNUC_PREREQ(4, 3) // <- Gives parse error. Don't know why.
# if 4 < __GNUC__ || (4 == __GNUC__ && 3 <= __GNUC_MINOR__)
# ifdef __STDC__VERSION__
# if __STDC__VERSION__ + 0 > 199900
# define __INLINE __attribute__((__extern_inline__)) __inline
# endif
# endif
# endif
# ifndef __INLINE
# define __INLINE extern __inline
# endif
#endif
__INLINE int