Devel-PPPort
view release on metacpan or search on metacpan
L<https://github.com/Dual-Life/Devel-PPPort/issues> to report any.
=head2 Running ppport.h
But F<ppport.h> is more than just a C header. It's also a Perl script
that can check your source code. It will suggest hints and portability
notes, and can even make suggestions on how to change your code. You
can run it like any other Perl program:
perl ppport.h [options] [files]
It also has embedded documentation, so you can use
perldoc ppport.h
to find out more about how to use it.
=head1 FUNCTIONS
=head2 WriteFile
C<WriteFile> takes one optional argument. When called with one
argument, it expects to be passed a filename. When called with
no arguments, it defaults to the filename F<ppport.h>.
The function returns a true value if the file was written successfully.
Otherwise it returns a false value.
=head2 GetFileContents
C<GetFileContents> behaves like C<WriteFile> above, but returns the contents
of the would-be file rather than writing it out.
=head1 COMPATIBILITY
F<ppport.h> supports Perl versions from 5.003_07 to 5.35.9
in threaded and non-threaded configurations.
=head2 Provided Perl compatibility API
The header file written by this module, typically F<ppport.h>, provides access
to the following elements of the Perl API that are not otherwise available in
Perl releases older than when the elements were first introduced. (Note that
many of these are not supported all the way back to 5.003_07, but it may
be that they are supported back as far as you need; see L</Supported Perl API,
sorted by version> for that information.)
_aMY_CXT
aMY_CXT
aMY_CXT_
__ASSERT_
ASSUME
aTHX
aTHX_
aTHXR
aTHXR_
av_count
AvFILLp
av_tindex
av_top_index
BOM_UTF8
boolSV
call_argv
caller_cx
call_method
call_pv
call_sv
C_ARRAY_END
C_ARRAY_LENGTH
cBOOL
ckWARN
ckWARN2
ckWARN2_d
ckWARN3
ckWARN3_d
ckWARN4
ckWARN4_d
ckWARN_d
ck_warner
ck_warner_d
CopFILE
CopFILEAV
CopFILEGV
CopFILEGV_set
CopFILE_set
CopFILESV
CopSTASH
CopSTASH_eq
CopSTASHPV
CopSTASHPV_set
CopSTASH_set
CopyD
CPERLscope
croak_memory_wrap
croak_nocontext
croak_no_modify
croak_sv
croak_xs_usage
dAX
dAXMARK
DECLARATION_FOR_LC_NUMERIC_MANIPULATION
DEFSV
DEFSV_set
die_sv
dITEMS
dMY_CXT
dMY_CXT_SV
dNOOP
dTHR
dTHX
dTHXa
dTHXoa
dTHXR
dUNDERBAR
dVAR
dXCPT
dXSTARG
END_EXTERN_C
ERRSV
eval_pv
eval_sv
Perl_warner (undocumented)
Perl_warner_nocontext (undocumented)
PL_mess_sv (undocumented)
POPu
rsignal
rsignal_state (undocumented)
save_gp
SAVEI16
SAVESTACK_POS
SHORTSIZE
sv_cmp_locale
sv_derived_from
sv_magic_portable (undocumented)
SvSetMagicSV
SvSetMagicSV_nosteal
SvSetSV_nosteal
SvTAINTED
SvTAINTED_off
SvTAINTED_on
sv_vcatpvf
sv_vcatpvf_mg
sv_vcatpvfn
sv_vsetpvf
sv_vsetpvf_mg
sv_vsetpvfn
Timeval
toLOWER_LC
vmess
vnewSVpvf
vwarner
=item perl 5.003_07 (or maybe earlier)
amagic_call (undocumented)
ARCHLIB
ARCHLIB_EXP
ASSUME
aTHX
aTHX_
aTHXR (undocumented)
aTHXR_ (undocumented)
AvARRAY
av_clear
av_count
av_extend
av_fetch
av_fill
AvFILL
av_len
av_make
av_pop
av_push
av_shift
av_store
av_tindex
av_top_index
av_undef
av_unshift
ax
BIN
BOM_UTF8
boolSV
BYTEORDER
call_argv
call_method
call_pv
call_sv
C_ARRAY_END
C_ARRAY_LENGTH
CASTFLAGS
CASTNEGFLOAT
CAT2
cBOOL
ckWARN
ckWARN2
ckWARN2_d
ckWARN3
ckWARN3_d
ckWARN4
ckWARN4_d
ckWARN_d
CLASS
CopFILE
CopFILEAV
CopFILEGV
CopFILEGV_set
CopFILE_set
CopFILESV
CopSTASH
CopSTASH_eq
CopSTASHPV
CopSTASH_set
Copy
CopyD
CPERLscope (DEPRECATED)
CPPMINUS
CPPSTDIN
croak_no_modify
croak_sv
croak_xs_usage
CSH
cv_const_sv
CvDEPTH (undocumented)
CvGV
CvSTASH
cv_undef
dAX
dAXMARK
DB_Hash_t
DB_Prefix_t
DEFSV
DEFSV_set
die_sv
Direntry_t
dITEMS
dMARK
dMY_CXT_SV
dNOOP
do_close (undocumented)
do_join (undocumented)
do_open (undocumented)
av_tindex_skip_len_mg|5.025010||Viu
av_top_index|5.017009|5.003007|p
av_top_index_skip_len_mg|5.025010||Viu
av_undef|5.003007|5.003007|
av_unshift|5.003007|5.003007|
ax|5.003007|5.003007|
backup_one_GCB|5.025003||Viu
backup_one_LB|5.023007||Viu
backup_one_SB|5.021009||Viu
backup_one_WB|5.021009||Viu
bad_type_gv|5.019002||Viu
bad_type_pv|5.016000||Viu
BADVERSION|5.011004||Viu
BASEOP|5.003007||Viu
BhkDISABLE|5.013003||xV
BhkENABLE|5.013003||xV
BhkENTRY|5.013003||xVi
BhkENTRY_set|5.013003||xV
BHKf_bhk_eval|5.013006||Viu
BHKf_bhk_post_end|5.013006||Viu
BHKf_bhk_pre_end|5.013006||Viu
BHKf_bhk_start|5.013006||Viu
BhkFLAGS|5.013003||xVi
BIN|5.003007|5.003007|Vn
bind|5.005000||Viu
bind_match|5.003007||Viu
BIN_EXP|5.004000|5.004000|Vn
BIT_BUCKET|5.003007||Viu
BIT_DIGITS|5.004000||Viu
BITMAP_BYTE|5.009005||Viu
BITMAP_TEST|5.009005||Viu
blk_eval|5.003007||Viu
blk_format|5.011000||Viu
blk_gimme|5.003007||Viu
blk_givwhen|5.027008||Viu
blk_loop|5.003007||Viu
blk_oldcop|5.003007||Viu
blk_oldmarksp|5.003007||Viu
blk_oldpm|5.003007||Viu
blk_oldsaveix|5.023008||Viu
blk_oldscopesp|5.003007||Viu
blk_oldsp|5.003007||Viu
blk_old_tmpsfloor|5.023008||Viu
blk_sub|5.003007||Viu
blk_u16|5.011000||Viu
block_end|5.021006|5.021006|
block_gimme|5.004000|5.004000|u
blockhook_register|||x
block_start|5.021006|5.021006|
BmFLAGS|5.009005||Viu
BmPREVIOUS|5.003007||Viu
BmRARE|5.003007||Viu
BmUSEFUL|5.003007||Viu
BOL|5.003007||Viu
BOL_t8|5.035004||Viu
BOL_t8_p8|5.033003||Viu
BOL_t8_pb|5.033003||Viu
BOL_tb|5.035004||Viu
BOL_tb_p8|5.033003||Viu
BOL_tb_pb|5.033003||Viu
BOM_UTF8|5.025005|5.003007|p
BOM_UTF8_FIRST_BYTE|5.019004||Viu
BOM_UTF8_TAIL|5.019004||Viu
boolSV|5.004000|5.003007|p
boot_core_builtin|5.035007||Viu
boot_core_mro|5.009005||Viu
boot_core_PerlIO|5.007002||Viu
boot_core_UNIVERSAL|5.003007||Viu
BOUND|5.003007||Viu
BOUNDA|5.013009||Viu
BOUNDA_t8|5.035004||Viu
BOUNDA_t8_p8|5.033003||Viu
BOUNDA_t8_pb|5.033003||Viu
BOUNDA_tb|5.035004||Viu
BOUNDA_tb_p8|5.033003||Viu
BOUNDA_tb_pb|5.033003||Viu
BOUNDL|5.004000||Viu
BOUNDL_t8|5.035004||Viu
BOUNDL_t8_p8|5.033003||Viu
BOUNDL_t8_pb|5.033003||Viu
BOUNDL_tb|5.035004||Viu
BOUNDL_tb_p8|5.033003||Viu
BOUNDL_tb_pb|5.033003||Viu
BOUND_t8|5.035004||Viu
BOUND_t8_p8|5.033003||Viu
BOUND_t8_pb|5.033003||Viu
BOUND_tb|5.035004||Viu
BOUND_tb_p8|5.033003||Viu
BOUND_tb_pb|5.033003||Viu
BOUNDU|5.013009||Viu
BOUNDU_t8|5.035004||Viu
BOUNDU_t8_p8|5.033003||Viu
BOUNDU_t8_pb|5.033003||Viu
BOUNDU_tb|5.035004||Viu
BOUNDU_tb_p8|5.033003||Viu
BOUNDU_tb_pb|5.033003||Viu
BRANCH|5.003007||Viu
BRANCHJ|5.005000||Viu
BRANCHJ_t8|5.035004||Viu
BRANCHJ_t8_p8|5.033003||Viu
BRANCHJ_t8_pb|5.033003||Viu
BRANCHJ_tb|5.035004||Viu
BRANCHJ_tb_p8|5.033003||Viu
BRANCHJ_tb_pb|5.033003||Viu
BRANCH_next|5.009005||Viu
BRANCH_next_fail|5.009005||Viu
BRANCH_next_fail_t8|5.035004||Viu
BRANCH_next_fail_t8_p8|5.033003||Viu
BRANCH_next_fail_t8_pb|5.033003||Viu
BRANCH_next_fail_tb|5.035004||Viu
BRANCH_next_fail_tb_p8|5.033003||Viu
BRANCH_next_fail_tb_pb|5.033003||Viu
BRANCH_next_t8|5.035004||Viu
BRANCH_next_t8_p8|5.033003||Viu
BRANCH_next_t8_pb|5.033003||Viu
BRANCH_next_tb|5.035004||Viu
BRANCH_next_tb_p8|5.033003||Viu
BRANCH_next_tb_pb|5.033003||Viu
BRANCH_t8|5.035004||Viu
BRANCH_t8_p8|5.033003||Viu
BRANCH_t8_pb|5.033003||Viu
BRANCH_tb|5.035004||Viu
BRANCH_tb_p8|5.033003||Viu
#ifndef UVCHR_IS_INVARIANT
# define UVCHR_IS_INVARIANT(c) UTF8_IS_INVARIANT(c)
#endif
#ifdef UVCHR_IS_INVARIANT
# if 'A' != 65 || UVSIZE < 8
/* 32 bit platform, which includes UTF-EBCDIC on the releases this is
* backported to */
# define D_PPP_UVCHR_SKIP_UPPER(c) 7
# else
# define D_PPP_UVCHR_SKIP_UPPER(c) \
(((WIDEST_UTYPE) (c)) < \
(((WIDEST_UTYPE) 1) << (6 * D_PPP_BYTE_INFO_BITS)) ? 7 : 13)
# endif
#ifndef UVCHR_SKIP
# define UVCHR_SKIP(c) \
UVCHR_IS_INVARIANT(c) ? 1 : \
(WIDEST_UTYPE) (c) < (32 * (1U << ( D_PPP_BYTE_INFO_BITS))) ? 2 : \
(WIDEST_UTYPE) (c) < (16 * (1U << (2 * D_PPP_BYTE_INFO_BITS))) ? 3 : \
(WIDEST_UTYPE) (c) < ( 8 * (1U << (3 * D_PPP_BYTE_INFO_BITS))) ? 4 : \
(WIDEST_UTYPE) (c) < ( 4 * (1U << (4 * D_PPP_BYTE_INFO_BITS))) ? 5 : \
(WIDEST_UTYPE) (c) < ( 2 * (1U << (5 * D_PPP_BYTE_INFO_BITS))) ? 6 : \
D_PPP_UVCHR_SKIP_UPPER(c)
#endif
#endif
#ifdef is_ascii_string
#ifndef is_invariant_string
# define is_invariant_string(s,l) is_ascii_string(s,l)
#endif
#ifndef is_utf8_invariant_string
# define is_utf8_invariant_string(s,l) is_ascii_string(s,l)
#endif
/* Hint: is_ascii_string, is_invariant_string
is_utf8_invariant_string() does the same thing and is preferred because its
name is more accurate as to what it does */
#endif
#ifdef ibcmp_utf8
#ifndef foldEQ_utf8
# define foldEQ_utf8(s1,pe1,l1,u1,s2,pe2,l2,u2) \
cBOOL(! ibcmp_utf8(s1,pe1,l1,u1,s2,pe2,l2,u2))
#endif
#endif
#if defined(is_utf8_string) && defined(UTF8SKIP)
#ifndef isUTF8_CHAR
# define isUTF8_CHAR(s, e) ( \
(e) <= (s) || ! is_utf8_string(s, UTF8_SAFE_SKIP(s, e)) \
? 0 \
: UTF8SKIP(s))
#endif
#endif
#if 'A' == 65
#ifndef BOM_UTF8
# define BOM_UTF8 "\xEF\xBB\xBF"
#endif
#ifndef REPLACEMENT_CHARACTER_UTF8
# define REPLACEMENT_CHARACTER_UTF8 "\xEF\xBF\xBD"
#endif
#elif '^' == 95
#ifndef BOM_UTF8
# define BOM_UTF8 "\xDD\x73\x66\x73"
#endif
#ifndef REPLACEMENT_CHARACTER_UTF8
# define REPLACEMENT_CHARACTER_UTF8 "\xDD\x73\x73\x71"
#endif
#elif '^' == 176
#ifndef BOM_UTF8
# define BOM_UTF8 "\xDD\x72\x65\x72"
#endif
#ifndef REPLACEMENT_CHARACTER_UTF8
# define REPLACEMENT_CHARACTER_UTF8 "\xDD\x72\x72\x70"
#endif
#else
# error Unknown character set
#endif
#if (PERL_BCDVERSION < 0x5035010)
/* Versions prior to 5.31.4 accepted things that are now considered
* malformations, and didn't return -1 on error with warnings enabled.
* Versions before 5.35.10 dereferenced empty input without checking */
# undef utf8_to_uvchr_buf
#endif
/* This implementation brings modern, generally more restricted standards to
* utf8_to_uvchr_buf. Some of these are security related, and clearly must
* be done. But its arguable that the others need not, and hence should not.
* The reason they're here is that a module that intends to play with the
* latest perls should be able to work the same in all releases. An example is
* that perl no longer accepts any UV for a code point, but limits them to
* IV_MAX or below. This is for future internal use of the larger code points.
* If it turns out that some of these changes are breaking code that isn't
* intended to work with modern perls, the tighter restrictions could be
* relaxed. khw thinks this is unlikely, but has been wrong in the past. */
/* 5.6.0 is the first release with UTF-8, and we don't implement this function
* there due to its likely lack of still being in use, and the underlying
* implementation is very different from later ones, without the later
* safeguards, so would require extra work to deal with */
#if (PERL_BCDVERSION >= 0x5006001) && ! defined(utf8_to_uvchr_buf)
/* Choose which underlying implementation to use. At least one must be
* present or the perl is too early to handle this function */
# if defined(utf8n_to_uvchr) || defined(utf8_to_uvchr) || defined(utf8_to_uv)
# if defined(utf8n_to_uvchr) /* This is the preferred implementation */
# define D_PPP_utf8_to_uvchr_buf_callee utf8n_to_uvchr
# elif /* Must be at least 5.6.1 from #if above; \
If have both regular and _simple, regular has all args */ \
defined(utf8_to_uv) && defined(utf8_to_uv_simple)
# define D_PPP_utf8_to_uvchr_buf_callee utf8_to_uv
# elif defined(utf8_to_uvchr) /* The below won't work well on error input */
# define D_PPP_utf8_to_uvchr_buf_callee(s, curlen, retlen, flags) \
utf8_to_uvchr((U8 *)(s), (retlen))
# else
# define D_PPP_utf8_to_uvchr_buf_callee(s, curlen, retlen, flags) \
utf8_to_uv((U8 *)(s), (retlen))
# endif
# endif
# if defined(NEED_utf8_to_uvchr_buf)
static UV DPPP_(my_utf8_to_uvchr_buf)(pTHX_ const U8 * s, const U8 * send, STRLEN * retlen);
static
#else
extern UV DPPP_(my_utf8_to_uvchr_buf)(pTHX_ const U8 * s, const U8 * send, STRLEN * retlen);
#endif
#if defined(NEED_utf8_to_uvchr_buf) || defined(NEED_utf8_to_uvchr_buf_GLOBAL)
( run in 1.700 second using v1.01-cache-2.11-cpan-ff9377addf4 )