Add a Configure probe for static inline.
authorAndy Dougherty <doughera@lafayette.edu>
Thu, 22 Jul 2010 15:14:47 +0000 (11:14 -0400)
committerAndy Dougherty <doughera@lafayette.edu>
Thu, 22 Jul 2010 15:14:47 +0000 (11:14 -0400)
commit17a6c8e38505fd8d5700febfe392e470c9c5fff8
treed8b68a3b6d6ab3f8f2c3cd9249c1fbc8cdedd63f
parent964a4988d8d817b838ce779c43bc86d4e738c878
Add a Configure probe for static inline.

This patch enables Configure to probe for C99-style 'static inline'.
(That is, functions may be inlined, but will not be externally visible.)
The initial idea is that some common code in messy macros inside headers
might be simplified using inline functions.  If the compiler does not
support 'static inline', then a plain 'static' is used instead, along
with the consequent implications of a function call (though the compiler
may optimize away the function call and inline the function anyway).
In either case, you simply use  PERL_STATIC_INLINE.

This patch does not *use* this facility at all yet.  It is merely a
Configure patch to make the facility availble for others to experiment
with.

VMS and Windows files will still need to be manually updated.

Finally, before actually converting anything to inline functions, please
try to carefully evaluate the performance implications of any proposed
changes.  Compilers vary in what they will and will not convert to inline
functions, so it's worth proceeding slowly and carefully.

This patch results from a single new metaconfig unit, d_static_inline.U,
which I will separately upload to the metaconfig repository.
Configure
config_h.SH
perl.h