On Sun, Nov 29, 2009 at 03:42:34PM +0100, Tobias Nygren wrote:
> > Anybody knows how to solve this?
> Something like this?
> -static inline void *
> +#ifdef __GNUC__
> +static __inline__ void *
> +static void *
> lwp_getpcb(struct lwp *l)
I must say I'm not entirely enthusiastic about that. :-/
We should have something in sys/cdefs.h for inline functions anyway;
perhaps an expanded form of what's currently in games/sail/inlinedefs.h,
along the lines of:
#if defined(__GNUC__) && !defined(__GNUC_STDC_INLINE__)
/* gcc's non-C99 inline semantics */
#define __nb_inline extern __inline__
#elif defined(__STDC__) && __STDC_VERSION__ >= 199901L
/* C99 */
#define __nb_inline inline
/* not sure if this case really exists */
#define __nb_inline static __inline__
/* something else; static inline is safest */
#define __nb_inline static inline
I'm not especially attached to the symbol "__nb_inline". Suggestions?
David A. Holland