On Fri, Jul 9, 2010 at 6:50 PM, Andrew Dougherty <doughera@lafayette.edu> wrote: > Here is a proposed patch to enable 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. In > either case, you simply use PERL_STATIC_INLINE. > > This patch differs from the first version in that it allows for other > spellings of "inline", including "__inline__" (useful even under gcc > -ansi, which cflags.SH will "helpfully" try to invoke), and, for > completeness, "__inline" and "_inline", which are variations used by > recent and older Microsoft compilers, and possibly some other > compilers too. > > I'd appreciate it if folks could give this a try and let me know of > any problems. You don't need metaconfig at all -- this patch applies > directly to bleadperl. Specifically, after you run Configure as > usual, grep for 'd_static_inline' and 'perl_static_inline" in config.sh > and see if they match what you think they should be. thanks (particularly) for the Configure-ready version heres what sh Configure -des ... produced. Checking to see if your system supports struct statfs... Yes, it does. Checking to see if your struct statfs has f_flags field... No, it doesn't. Checking to see if your system supports static inline... Your compiler supports static __inline__. Checking how to access stdio streams by file descriptor number... I can't figure out how to access stdio streams by file descriptor number. strcoll() found. 2 comments: - no whitespace after the test output, in contrast to the other tests done by Configure (yes, unimportant in the extreme) - is it worth testing all alternatives ? this is unnecessary, but might provide a teensy bit more info wrt what compilers support which variations. mine likes "static __inline__" [jimc@groucho perl-git]$ gcc --version gcc (GCC) 4.4.4 20100630 (Red Hat 4.4.4-10) Copyright (C) 2010 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.Thread Previous | Thread Next