Hello all,
A small problem I came up against while working on an extension I'm
building to GSL.
Later versions of GSL (1.13+ I think?) have the gsl_inline.h header,
which defines various preprocessor macros with respect to inline
functions -- in particular, INLINE_FUN. This allows code to be defined
in header files in the form,
#ifdef HAVE_INLINE
INLINE_FUN int
gsl_foo(const gsl_rng *r)
{
/* something ... */
}
The problem is, of course, an extension can't necessarily assume a
particular version of GSL, so if I want it to be compatible with earlier
versions I can't assume the presence of gsl_inline.h.
So, this leads to the need to check for the version of GSL, and only if
it is high enough to call #include <gsl/gsl_inline.h>; something along
the lines of,
#include <gsl_version.h>
#if GSL_VERSION >= 1.13
#include <gsl/gsl_inline.h>
#else
#define INLINE_FUN extern inline
#endif
... except that since GSL_VERSION is actually a string "1.x" I'm not
sure I can do the comparison.
Is there any recommended procedure for dealing with this kind of version
compatibility in GSL?
Thanks & best wishes,
-- Joe
_______________________________________________
Help-gsl mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-gsl