Re: guile: going the way of DEATH

Todd Larason (jtl@molehill.org)
Sat, 15 Aug 1998 03:00:18 -0700

On 980814, Jim Blandy wrote:
> So the definitions in the header file need to be `inline' and
> `extern', while the definitions in the library need to be ordinary.
> Oh, and you have to make sure all this works properly when you're not
> using GCC. Sounds like a case for some serious CPP grunging.

inline.h:

#ifndef INLINE
#if defined(GCC) /* && major > 2 || (major == 2 && minor >= 7), or whenever inlines started being supported well */
#define INLINE inline extern
#endif
#endif

#ifdef INLINE
inline exterm void
func(void)
{
/* body */
}
#else
/* For non-inlining compilers */
extern void func(void);
#endif

inline.c:
#define INLINE
#include "inline.h"
#undef INLINE

Not TOO bad, I don't think.