By "true" I mean that they have prototypes, but no bodies.
So don't declare their prototypes under PERL_NO_INLINE_FUNCTIONS.
After some studying of http://www.greenend.org.uk/rjk/tech/inline.html
it seems like Perl is trying to implement the "simple portable" model.
But the functions listed as failing during porting/extrefs.t in Tru64:
they are neither fish nor fowl. Their prototypes are listed in
proto.h as PERL_STATIC_INLINE (which in Tru64 is "static inline"),
but since the test is built with -DPERL_NO_INLINE_FUNCTIONS,
the function bodies (which would be in inline.h) are not visible.
So they end up being body-less static inline prototypes, which is,
I believe, somewhat of an oxymoron.
The "complicated portable" model might be a more wortwhile longer
term goal: in that, there is no "static inline", and there would be
a new source file, say, inline.c. Now with the "simple portable",
the bodies might end up being compiled multiple times, multiple copies
ending up in different object files, depending on how smart the
compiler/linker is.
Another move could be that maybe there should be no prototypes at all
for inlineables, because having those is kind beside the point. How
well that would work across different compilers is unknown.
Yet another move, perhaps the simplest one, would be to move these
particular functions away from inline.h. But this would be just
dodging the larger problems discussed above.
EXp |void |av_reify |NN AV *av
ApdR |SV* |av_shift |NN AV *av
Apd |SV** |av_store |NN AV *av|SSize_t key|NULLOK SV *val
+#ifndef PERL_NO_INLINE_FUNCTIONS
AidR |SSize_t|av_top_index |NN AV *av
+#endif
AmpdR |SSize_t|av_tindex |NN AV *av
Apd |void |av_undef |NN AV *av
ApdoxM |SV** |av_create_and_unshift_one|NN AV **const avp|NN SV *const val
ApR |I32 |is_lvalue_sub
: Used in cop.h
XopR |I32 |was_lvalue_sub
+#ifndef PERL_NO_INLINE_FUNCTIONS
AiMRn |STRLEN |_is_utf8_char_slow|NN const U8 *s|NN const U8 *e
+#endif
ADMpPR |U32 |to_uni_upper_lc|U32 c
ADMpPR |U32 |to_uni_title_lc|U32 c
ADMpPR |U32 |to_uni_lower_lc|U32 c
Apd |MAGIC *|sv_magicext |NN SV *const sv|NULLOK SV *const obj|const int how \
|NULLOK const MGVTBL *const vtbl|NULLOK const char *const name \
|const I32 namlen
+#ifndef PERL_NO_INLINE_FUNCTIONS
Ein |bool |sv_only_taint_gmagic|NN SV *sv
+#endif
: exported for re.pm
EXp |MAGIC *|sv_magicext_mglob|NN SV *sv
ApdbamR |SV* |sv_mortalcopy |NULLOK SV *const oldsv
Ap |I32 |whichsig_sv |NN SV* sigsv
Ap |I32 |whichsig_pv |NN const char* sig
Ap |I32 |whichsig_pvn |NN const char* sig|STRLEN len
+#ifndef PERL_NO_INLINE_FUNCTIONS
: used to check for NULs in pathnames and other names
AiR |bool |is_safe_syscall|NN const char *pv|STRLEN len|NN const char *what|NN const char *op_name
+#endif
#ifdef PERL_CORE
inR |bool |should_warn_nl|NN const char *pv
#endif
|NN const U8* const typestr
#endif
+#ifndef PERL_NO_INLINE_FUNCTIONS
AiMn |void |append_utf8_from_native_byte|const U8 byte|NN U8** dest
+#endif
Apd |void |sv_setsv_flags |NN SV *dstr|NULLOK SV *sstr|const I32 flags
Apd |void |sv_catpvn_flags|NN SV *const dstr|NN const char *sstr|const STRLEN len \
#define _is_uni_perl_idcont(a) Perl__is_uni_perl_idcont(aTHX_ a)
#define _is_uni_perl_idstart(a) Perl__is_uni_perl_idstart(aTHX_ a)
#define _is_utf8_FOO(a,b) Perl__is_utf8_FOO(aTHX_ a,b)
-#define _is_utf8_char_slow S__is_utf8_char_slow
#define _is_utf8_idcont(a) Perl__is_utf8_idcont(aTHX_ a)
#define _is_utf8_idstart(a) Perl__is_utf8_idstart(aTHX_ a)
#define _is_utf8_mark(a) Perl__is_utf8_mark(aTHX_ a)
#define _to_utf8_upper_flags(a,b,c,d) Perl__to_utf8_upper_flags(aTHX_ a,b,c,d)
#define amagic_call(a,b,c,d) Perl_amagic_call(aTHX_ a,b,c,d)
#define amagic_deref_call(a,b) Perl_amagic_deref_call(aTHX_ a,b)
-#define append_utf8_from_native_byte S_append_utf8_from_native_byte
#define apply_attrs_string(a,b,c,d) Perl_apply_attrs_string(aTHX_ a,b,c,d)
#define atfork_lock Perl_atfork_lock
#define atfork_unlock Perl_atfork_unlock
#define av_push(a,b) Perl_av_push(aTHX_ a,b)
#define av_shift(a) Perl_av_shift(aTHX_ a)
#define av_store(a,b,c) Perl_av_store(aTHX_ a,b,c)
-#define av_top_index(a) S_av_top_index(aTHX_ a)
#define av_undef(a) Perl_av_undef(aTHX_ a)
#define av_unshift(a,b) Perl_av_unshift(aTHX_ a,b)
#define block_end(a,b) Perl_block_end(aTHX_ a,b)
#define isIDFIRST_lazy(a) Perl_isIDFIRST_lazy(aTHX_ a)
#define is_invariant_string Perl_is_invariant_string
#define is_lvalue_sub() Perl_is_lvalue_sub(aTHX)
-#define is_safe_syscall(a,b,c,d) S_is_safe_syscall(aTHX_ a,b,c,d)
#define is_uni_alnum(a) Perl_is_uni_alnum(aTHX_ a)
#define is_uni_alnum_lc(a) Perl_is_uni_alnum_lc(aTHX_ a)
#define is_uni_alnumc(a) Perl_is_uni_alnumc(aTHX_ a)
#define my_pclose(a) Perl_my_pclose(aTHX_ a)
#define my_popen(a,b) Perl_my_popen(aTHX_ a,b)
#endif
+#if !defined(PERL_NO_INLINE_FUNCTIONS)
+#define _is_utf8_char_slow S__is_utf8_char_slow
+#define append_utf8_from_native_byte S_append_utf8_from_native_byte
+#define av_top_index(a) S_av_top_index(aTHX_ a)
+#define is_safe_syscall(a,b,c,d) S_is_safe_syscall(aTHX_ a,b,c,d)
+#endif
#if (!defined(HAS_MEMCPY) && !defined(HAS_BCOPY)) || (!defined(HAS_MEMMOVE) && !defined(HAS_SAFE_MEMCPY) && !defined(HAS_SAFE_BCOPY))
#define my_bcopy Perl_my_bcopy
#endif
#define reg_temp_copy(a,b) Perl_reg_temp_copy(aTHX_ a,b)
#define report_uninit(a) Perl_report_uninit(aTHX_ a)
#define sv_magicext_mglob(a) Perl_sv_magicext_mglob(aTHX_ a)
-#define sv_only_taint_gmagic S_sv_only_taint_gmagic
#define validate_proto(a,b,c) Perl_validate_proto(aTHX_ a,b,c)
#define vivify_defelem(a) Perl_vivify_defelem(aTHX_ a)
#define yylex() Perl_yylex(aTHX)
#define invlist_trim S_invlist_trim
# endif
# endif
+# if !defined(PERL_NO_INLINE_FUNCTIONS)
+#define sv_only_taint_gmagic S_sv_only_taint_gmagic
+# endif
# if defined(DEBUGGING)
# if defined(PERL_IN_REGCOMP_C)
#define dump_trie(a,b,c,d) S_dump_trie(aTHX_ a,b,c,d)
#define PERL_ARGS_ASSERT__IS_UTF8_FOO \
assert(p)
-PERL_STATIC_INLINE STRLEN S__is_utf8_char_slow(const U8 *s, const U8 *e)
- __attribute__warn_unused_result__;
-#define PERL_ARGS_ASSERT__IS_UTF8_CHAR_SLOW \
- assert(s); assert(e)
-
PERL_CALLCONV bool Perl__is_utf8_idcont(pTHX_ const U8 *p)
__attribute__warn_unused_result__;
#define PERL_ARGS_ASSERT__IS_UTF8_IDCONT \
#define PERL_ARGS_ASSERT_AMAGIC_DEREF_CALL \
assert(ref)
PERL_CALLCONV bool Perl_amagic_is_enabled(pTHX_ int method);
-PERL_STATIC_INLINE void S_append_utf8_from_native_byte(const U8 byte, U8** dest);
-#define PERL_ARGS_ASSERT_APPEND_UTF8_FROM_NATIVE_BYTE \
- assert(dest)
PERL_CALLCONV I32 Perl_apply(pTHX_ I32 type, SV** mark, SV** sp);
#define PERL_ARGS_ASSERT_APPLY \
assert(mark); assert(sp)
/* PERL_CALLCONV SSize_t Perl_av_tindex(pTHX_ AV *av)
__attribute__warn_unused_result__; */
-PERL_STATIC_INLINE SSize_t S_av_top_index(pTHX_ AV *av)
- __attribute__warn_unused_result__;
-#define PERL_ARGS_ASSERT_AV_TOP_INDEX \
- assert(av)
-
PERL_CALLCONV void Perl_av_undef(pTHX_ AV *av);
#define PERL_ARGS_ASSERT_AV_UNDEF \
assert(av)
PERL_CALLCONV I32 Perl_is_lvalue_sub(pTHX)
__attribute__warn_unused_result__;
-PERL_STATIC_INLINE bool S_is_safe_syscall(pTHX_ const char *pv, STRLEN len, const char *what, const char *op_name)
- __attribute__warn_unused_result__;
-#define PERL_ARGS_ASSERT_IS_SAFE_SYSCALL \
- assert(pv); assert(what); assert(op_name)
-
PERL_CALLCONV bool Perl_is_uni_alnum(pTHX_ UV c)
__attribute__deprecated__
__attribute__warn_unused_result__
PERL_CALLCONV NV Perl_sv_nv(pTHX_ SV* sv);
#define PERL_ARGS_ASSERT_SV_NV \
assert(sv)
-PERL_STATIC_INLINE bool S_sv_only_taint_gmagic(SV *sv);
-#define PERL_ARGS_ASSERT_SV_ONLY_TAINT_GMAGIC \
- assert(sv)
PERL_CALLCONV char* Perl_sv_peek(pTHX_ SV* sv);
PERL_CALLCONV void Perl_sv_pos_b2u(pTHX_ SV *const sv, I32 *const offsetp);
#define PERL_ARGS_ASSERT_SV_POS_B2U \
assert(av); assert(dir); assert(stem)
# endif
#endif
+#if !defined(PERL_NO_INLINE_FUNCTIONS)
+PERL_STATIC_INLINE STRLEN S__is_utf8_char_slow(const U8 *s, const U8 *e)
+ __attribute__warn_unused_result__;
+#define PERL_ARGS_ASSERT__IS_UTF8_CHAR_SLOW \
+ assert(s); assert(e)
+
+PERL_STATIC_INLINE void S_append_utf8_from_native_byte(const U8 byte, U8** dest);
+#define PERL_ARGS_ASSERT_APPEND_UTF8_FROM_NATIVE_BYTE \
+ assert(dest)
+PERL_STATIC_INLINE SSize_t S_av_top_index(pTHX_ AV *av)
+ __attribute__warn_unused_result__;
+#define PERL_ARGS_ASSERT_AV_TOP_INDEX \
+ assert(av)
+
+PERL_STATIC_INLINE bool S_is_safe_syscall(pTHX_ const char *pv, STRLEN len, const char *what, const char *op_name)
+ __attribute__warn_unused_result__;
+#define PERL_ARGS_ASSERT_IS_SAFE_SYSCALL \
+ assert(pv); assert(what); assert(op_name)
+
+PERL_STATIC_INLINE bool S_sv_only_taint_gmagic(SV *sv);
+#define PERL_ARGS_ASSERT_SV_ONLY_TAINT_GMAGIC \
+ assert(sv)
+#endif
#if !defined(PERL_NO_UTF16_FILTER)
# if defined(PERL_IN_TOKE_C)
STATIC U8* S_add_utf16_textfilter(pTHX_ U8 *const s, bool reversed);