Next: Long double, Previous: ANSI C Compliance, Up: Using the library
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 Autoconf Macros.