- publishing free software manuals
GNU Scientific Library Reference Manual - Revised Second Edition (v1.8)
by M. Galassi, J. Davies, J. Theiler, B. Gough, G. Jungman, M. Booth, F. Rossi
Paperback (6"x9"), 636 pages, 60 figures
ISBN 0954161734
RRP £24.99 ($39.99)

Get a printed copy>>>

2.5 Inline functions

The inline keyword is not part of the original ANSI C standard (C89) and the library does not export any inline function definitions by default. However, the library provides optional inline versions of performance-critical functions by conditional compilation. The inline versions of these functions can be included by defining the macro HAVE_INLINE when compiling an application,

$ gcc -Wall -c -DHAVE_INLINE example.c

If you use autoconf this macro can be defined automatically. If you do not define the macro HAVE_INLINE then the slower non-inlined versions of the functions will be used instead.

Note that the actual usage of the inline keyword is extern inline, which eliminates unnecessary function definitions in GCC. If the form extern inline causes problems with other compilers a stricter autoconf test can be used, see section C Autoconf Macros.

ISBN 0954161734GNU Scientific Library Reference Manual - Revised Second Edition (v1.8)See the print edition