Add built local::lib
[catagits/Gitalist.git] / local-lib5 / lib / perl5 / i486-linux-gnu-thread-multi / Devel / PPPort.pm
1 ################################################################################
2 #
3 #  !!!!! Do NOT edit this file directly! -- Edit PPPort_pm.PL instead. !!!!!
4 #
5 #  This file was automatically generated from the definition files in the
6 #  parts/inc/ subdirectory by PPPort_pm.PL. To learn more about how all this
7 #  works, please read the F<HACKERS> file that came with this distribution.
8 #
9 ################################################################################
10 #
11 #  Perl/Pollution/Portability
12 #
13 ################################################################################
14 #
15 #  $Revision: 65 $
16 #  $Author: mhx $
17 #  $Date: 2009/06/12 04:10:36 +0200 $
18 #
19 ################################################################################
20 #
21 #  Version 3.x, Copyright (C) 2004-2009, Marcus Holland-Moritz.
22 #  Version 2.x, Copyright (C) 2001, Paul Marquess.
23 #  Version 1.x, Copyright (C) 1999, Kenneth Albanowski.
24 #
25 #  This program is free software; you can redistribute it and/or
26 #  modify it under the same terms as Perl itself.
27 #
28 ################################################################################
29
30 =head1 NAME
31
32 Devel::PPPort - Perl/Pollution/Portability
33
34 =head1 SYNOPSIS
35
36     Devel::PPPort::WriteFile();   # defaults to ./ppport.h
37     Devel::PPPort::WriteFile('someheader.h');
38
39 =head1 DESCRIPTION
40
41 Perl's API has changed over time, gaining new features, new functions,
42 increasing its flexibility, and reducing the impact on the C namespace
43 environment (reduced pollution). The header file written by this module,
44 typically F<ppport.h>, attempts to bring some of the newer Perl API
45 features to older versions of Perl, so that you can worry less about
46 keeping track of old releases, but users can still reap the benefit.
47
48 C<Devel::PPPort> contains a single function, called C<WriteFile>. Its
49 only purpose is to write the F<ppport.h> C header file. This file
50 contains a series of macros and, if explicitly requested, functions that
51 allow XS modules to be built using older versions of Perl. Currently,
52 Perl versions from 5.003 to 5.10.0 are supported.
53
54 This module is used by C<h2xs> to write the file F<ppport.h>.
55
56 =head2 Why use ppport.h?
57
58 You should use F<ppport.h> in modern code so that your code will work
59 with the widest range of Perl interpreters possible, without significant
60 additional work.
61
62 You should attempt older code to fully use F<ppport.h>, because the
63 reduced pollution of newer Perl versions is an important thing. It's so
64 important that the old polluting ways of original Perl modules will not be
65 supported very far into the future, and your module will almost certainly
66 break! By adapting to it now, you'll gain compatibility and a sense of
67 having done the electronic ecology some good.
68
69 =head2 How to use ppport.h
70
71 Don't direct the users of your module to download C<Devel::PPPort>.
72 They are most probably no XS writers. Also, don't make F<ppport.h>
73 optional. Rather, just take the most recent copy of F<ppport.h> that
74 you can find (e.g. by generating it with the latest C<Devel::PPPort>
75 release from CPAN), copy it into your project, adjust your project to
76 use it, and distribute the header along with your module.
77
78 =head2 Running ppport.h
79
80 But F<ppport.h> is more than just a C header. It's also a Perl script
81 that can check your source code. It will suggest hints and portability
82 notes, and can even make suggestions on how to change your code. You
83 can run it like any other Perl program:
84
85     perl ppport.h [options] [files]
86
87 It also has embedded documentation, so you can use
88
89     perldoc ppport.h
90
91 to find out more about how to use it.
92
93 =head1 FUNCTIONS
94
95 =head2 WriteFile
96
97 C<WriteFile> takes one optional argument. When called with one
98 argument, it expects to be passed a filename. When called with
99 no arguments, it defaults to the filename F<ppport.h>.
100
101 The function returns a true value if the file was written successfully.
102 Otherwise it returns a false value.
103
104 =head1 COMPATIBILITY
105
106 F<ppport.h> supports Perl versions from 5.003 to 5.10.0
107 in threaded and non-threaded configurations.
108
109 =head2 Provided Perl compatibility API
110
111 The header file written by this module, typically F<ppport.h>, provides
112 access to the following elements of the Perl API that is not available
113 in older Perl releases:
114
115     _aMY_CXT
116     _pMY_CXT
117     aMY_CXT
118     aMY_CXT_
119     aTHX
120     aTHX_
121     aTHXR
122     aTHXR_
123     AvFILLp
124     boolSV
125     call_argv
126     call_method
127     call_pv
128     call_sv
129     ckWARN
130     CopFILE
131     CopFILE_set
132     CopFILEAV
133     CopFILEGV
134     CopFILEGV_set
135     CopFILESV
136     CopSTASH
137     CopSTASH_eq
138     CopSTASH_set
139     CopSTASHPV
140     CopSTASHPV_set
141     CopyD
142     CPERLscope
143     dAX
144     dAXMARK
145     DEFSV
146     DEFSV_set
147     dITEMS
148     dMY_CXT
149     dMY_CXT_SV
150     dNOOP
151     dTHR
152     dTHX
153     dTHXa
154     dTHXoa
155     dTHXR
156     dUNDERBAR
157     dVAR
158     dXCPT
159     dXSTARG
160     END_EXTERN_C
161     ERRSV
162     eval_pv
163     eval_sv
164     EXTERN_C
165     G_METHOD
166     get_av
167     get_cv
168     get_hv
169     get_sv
170     grok_bin
171     grok_hex
172     grok_number
173     GROK_NUMERIC_RADIX
174     grok_numeric_radix
175     grok_oct
176     gv_fetchpvn_flags
177     gv_fetchpvs
178     gv_stashpvn
179     gv_stashpvs
180     GvSVn
181     hv_fetchs
182     hv_stores
183     HvNAME_get
184     HvNAMELEN_get
185     IN_LOCALE
186     IN_LOCALE_COMPILETIME
187     IN_LOCALE_RUNTIME
188     IN_PERL_COMPILETIME
189     INT2PTR
190     IS_NUMBER_GREATER_THAN_UV_MAX
191     IS_NUMBER_IN_UV
192     IS_NUMBER_INFINITY
193     IS_NUMBER_NAN
194     IS_NUMBER_NEG
195     IS_NUMBER_NOT_INT
196     isALNUMC
197     isASCII
198     isBLANK
199     isCNTRL
200     isGRAPH
201     isGV_with_GP
202     isPRINT
203     isPSXSPC
204     isPUNCT
205     isXDIGIT
206     IVdf
207     IVSIZE
208     IVTYPE
209     load_module
210     memEQ
211     memNE
212     MoveD
213     mPUSHi
214     mPUSHn
215     mPUSHp
216     mPUSHs
217     mPUSHu
218     mXPUSHi
219     mXPUSHn
220     mXPUSHp
221     mXPUSHs
222     mXPUSHu
223     MY_CXT
224     MY_CXT_CLONE
225     MY_CXT_INIT
226     my_snprintf
227     my_sprintf
228     my_strlcat
229     my_strlcpy
230     newCONSTSUB
231     newRV_inc
232     newRV_noinc
233     newSV_type
234     newSVpvn
235     newSVpvn_flags
236     newSVpvn_share
237     newSVpvn_utf8
238     newSVpvs
239     newSVpvs_flags
240     newSVuv
241     Newx
242     Newxc
243     Newxz
244     NOOP
245     NUM2PTR
246     NVef
247     NVff
248     NVgf
249     NVTYPE
250     packWARN
251     PERL_ABS
252     PERL_BCDVERSION
253     PERL_GCC_BRACE_GROUPS_FORBIDDEN
254     PERL_HASH
255     PERL_INT_MAX
256     PERL_INT_MIN
257     PERL_LONG_MAX
258     PERL_LONG_MIN
259     PERL_MAGIC_arylen
260     PERL_MAGIC_backref
261     PERL_MAGIC_bm
262     PERL_MAGIC_collxfrm
263     PERL_MAGIC_dbfile
264     PERL_MAGIC_dbline
265     PERL_MAGIC_defelem
266     PERL_MAGIC_env
267     PERL_MAGIC_envelem
268     PERL_MAGIC_ext
269     PERL_MAGIC_fm
270     PERL_MAGIC_glob
271     PERL_MAGIC_isa
272     PERL_MAGIC_isaelem
273     PERL_MAGIC_mutex
274     PERL_MAGIC_nkeys
275     PERL_MAGIC_overload
276     PERL_MAGIC_overload_elem
277     PERL_MAGIC_overload_table
278     PERL_MAGIC_pos
279     PERL_MAGIC_qr
280     PERL_MAGIC_regdata
281     PERL_MAGIC_regdatum
282     PERL_MAGIC_regex_global
283     PERL_MAGIC_shared
284     PERL_MAGIC_shared_scalar
285     PERL_MAGIC_sig
286     PERL_MAGIC_sigelem
287     PERL_MAGIC_substr
288     PERL_MAGIC_sv
289     PERL_MAGIC_taint
290     PERL_MAGIC_tied
291     PERL_MAGIC_tiedelem
292     PERL_MAGIC_tiedscalar
293     PERL_MAGIC_utf8
294     PERL_MAGIC_uvar
295     PERL_MAGIC_uvar_elem
296     PERL_MAGIC_vec
297     PERL_MAGIC_vstring
298     PERL_PV_ESCAPE_ALL
299     PERL_PV_ESCAPE_FIRSTCHAR
300     PERL_PV_ESCAPE_NOBACKSLASH
301     PERL_PV_ESCAPE_NOCLEAR
302     PERL_PV_ESCAPE_QUOTE
303     PERL_PV_ESCAPE_RE
304     PERL_PV_ESCAPE_UNI
305     PERL_PV_ESCAPE_UNI_DETECT
306     PERL_PV_PRETTY_DUMP
307     PERL_PV_PRETTY_ELLIPSES
308     PERL_PV_PRETTY_LTGT
309     PERL_PV_PRETTY_NOCLEAR
310     PERL_PV_PRETTY_QUOTE
311     PERL_PV_PRETTY_REGPROP
312     PERL_QUAD_MAX
313     PERL_QUAD_MIN
314     PERL_REVISION
315     PERL_SCAN_ALLOW_UNDERSCORES
316     PERL_SCAN_DISALLOW_PREFIX
317     PERL_SCAN_GREATER_THAN_UV_MAX
318     PERL_SCAN_SILENT_ILLDIGIT
319     PERL_SHORT_MAX
320     PERL_SHORT_MIN
321     PERL_SIGNALS_UNSAFE_FLAG
322     PERL_SUBVERSION
323     PERL_UCHAR_MAX
324     PERL_UCHAR_MIN
325     PERL_UINT_MAX
326     PERL_UINT_MIN
327     PERL_ULONG_MAX
328     PERL_ULONG_MIN
329     PERL_UNUSED_ARG
330     PERL_UNUSED_CONTEXT
331     PERL_UNUSED_DECL
332     PERL_UNUSED_VAR
333     PERL_UQUAD_MAX
334     PERL_UQUAD_MIN
335     PERL_USE_GCC_BRACE_GROUPS
336     PERL_USHORT_MAX
337     PERL_USHORT_MIN
338     PERL_VERSION
339     Perl_warner
340     Perl_warner_nocontext
341     PERLIO_FUNCS_CAST
342     PERLIO_FUNCS_DECL
343     PL_bufend
344     PL_bufptr
345     PL_compiling
346     PL_copline
347     PL_curcop
348     PL_curstash
349     PL_DBsignal
350     PL_DBsingle
351     PL_DBsub
352     PL_DBtrace
353     PL_debstash
354     PL_defgv
355     PL_diehook
356     PL_dirty
357     PL_dowarn
358     PL_errgv
359     PL_error_count
360     PL_expect
361     PL_hexdigit
362     PL_hints
363     PL_in_my
364     PL_in_my_stash
365     PL_laststatval
366     PL_lex_state
367     PL_lex_stuff
368     PL_linestr
369     PL_na
370     PL_no_modify
371     PL_parser
372     PL_perl_destruct_level
373     PL_perldb
374     PL_ppaddr
375     PL_rsfp
376     PL_rsfp_filters
377     PL_signals
378     PL_stack_base
379     PL_stack_sp
380     PL_statcache
381     PL_stdingv
382     PL_Sv
383     PL_sv_arenaroot
384     PL_sv_no
385     PL_sv_undef
386     PL_sv_yes
387     PL_tainted
388     PL_tainting
389     PL_tokenbuf
390     pMY_CXT
391     pMY_CXT_
392     Poison
393     PoisonFree
394     PoisonNew
395     PoisonWith
396     pTHX
397     pTHX_
398     PTR2IV
399     PTR2nat
400     PTR2NV
401     PTR2ul
402     PTR2UV
403     PTRV
404     PUSHmortal
405     PUSHu
406     pv_display
407     pv_escape
408     pv_pretty
409     SAVE_DEFSV
410     START_EXTERN_C
411     START_MY_CXT
412     STMT_END
413     STMT_START
414     STR_WITH_LEN
415     sv_2pv_flags
416     sv_2pv_nolen
417     sv_2pvbyte
418     sv_2pvbyte_nolen
419     sv_2uv
420     sv_catpv_mg
421     sv_catpvf_mg
422     sv_catpvf_mg_nocontext
423     sv_catpvn_mg
424     sv_catpvn_nomg
425     sv_catpvs
426     sv_catsv_mg
427     sv_catsv_nomg
428     SV_CONST_RETURN
429     SV_COW_DROP_PV
430     SV_COW_SHARED_HASH_KEYS
431     SV_GMAGIC
432     SV_HAS_TRAILING_NUL
433     SV_IMMEDIATE_UNREF
434     sv_magic_portable
435     SV_MUTABLE_RETURN
436     SV_NOSTEAL
437     sv_pvn_force_flags
438     sv_pvn_nomg
439     sv_setiv_mg
440     sv_setnv_mg
441     sv_setpv_mg
442     sv_setpvf_mg
443     sv_setpvf_mg_nocontext
444     sv_setpvn_mg
445     sv_setpvs
446     sv_setsv_mg
447     sv_setsv_nomg
448     sv_setuv
449     sv_setuv_mg
450     SV_SMAGIC
451     sv_usepvn_mg
452     SV_UTF8_NO_ENCODING
453     sv_uv
454     sv_vcatpvf
455     sv_vcatpvf_mg
456     sv_vsetpvf
457     sv_vsetpvf_mg
458     SVf
459     SVf_UTF8
460     SVfARG
461     SvGETMAGIC
462     SvIV_nomg
463     SvMAGIC_set
464     SvPV_const
465     SvPV_flags
466     SvPV_flags_const
467     SvPV_flags_const_nolen
468     SvPV_flags_mutable
469     SvPV_force
470     SvPV_force_flags
471     SvPV_force_flags_mutable
472     SvPV_force_flags_nolen
473     SvPV_force_mutable
474     SvPV_force_nolen
475     SvPV_force_nomg
476     SvPV_force_nomg_nolen
477     SvPV_mutable
478     SvPV_nolen
479     SvPV_nolen_const
480     SvPV_nomg
481     SvPV_nomg_const
482     SvPV_nomg_const_nolen
483     SvPV_renew
484     SvPVbyte
485     SvPVX_const
486     SvPVX_mutable
487     SvREFCNT_inc
488     SvREFCNT_inc_NN
489     SvREFCNT_inc_simple
490     SvREFCNT_inc_simple_NN
491     SvREFCNT_inc_simple_void
492     SvREFCNT_inc_simple_void_NN
493     SvREFCNT_inc_void
494     SvREFCNT_inc_void_NN
495     SvRV_set
496     SvSHARED_HASH
497     SvSTASH_set
498     SvUOK
499     SvUV
500     SvUV_nomg
501     SvUV_set
502     SvUVX
503     SvUVx
504     SvUVXx
505     SvVSTRING_mg
506     UNDERBAR
507     UTF8_MAXBYTES
508     UVof
509     UVSIZE
510     UVTYPE
511     UVuf
512     UVXf
513     UVxf
514     vload_module
515     vnewSVpvf
516     WARN_ALL
517     WARN_AMBIGUOUS
518     WARN_ASSERTIONS
519     WARN_BAREWORD
520     WARN_CLOSED
521     WARN_CLOSURE
522     WARN_DEBUGGING
523     WARN_DEPRECATED
524     WARN_DIGIT
525     WARN_EXEC
526     WARN_EXITING
527     WARN_GLOB
528     WARN_INPLACE
529     WARN_INTERNAL
530     WARN_IO
531     WARN_LAYER
532     WARN_MALLOC
533     WARN_MISC
534     WARN_NEWLINE
535     WARN_NUMERIC
536     WARN_ONCE
537     WARN_OVERFLOW
538     WARN_PACK
539     WARN_PARENTHESIS
540     WARN_PIPE
541     WARN_PORTABLE
542     WARN_PRECEDENCE
543     WARN_PRINTF
544     WARN_PROTOTYPE
545     WARN_QW
546     WARN_RECURSION
547     WARN_REDEFINE
548     WARN_REGEXP
549     WARN_RESERVED
550     WARN_SEMICOLON
551     WARN_SEVERE
552     WARN_SIGNAL
553     WARN_SUBSTR
554     WARN_SYNTAX
555     WARN_TAINT
556     WARN_THREADS
557     WARN_UNINITIALIZED
558     WARN_UNOPENED
559     WARN_UNPACK
560     WARN_UNTIE
561     WARN_UTF8
562     WARN_VOID
563     warner
564     XCPT_CATCH
565     XCPT_RETHROW
566     XCPT_TRY_END
567     XCPT_TRY_START
568     XPUSHmortal
569     XPUSHu
570     XSprePUSH
571     XSPROTO
572     XSRETURN
573     XSRETURN_UV
574     XST_mUV
575     ZeroD
576
577 =head2 Perl API not supported by ppport.h
578
579 There is still a big part of the API not supported by F<ppport.h>.
580 Either because it doesn't make sense to back-port that part of the API,
581 or simply because it hasn't been implemented yet. Patches welcome!
582
583 Here's a list of the currently unsupported API, and also the version of
584 Perl below which it is unsupported:
585
586 =over 4
587
588 =item perl 5.11.0
589
590   HeUTF8
591   MULTICALL
592   PERL_SYS_TERM
593   POP_MULTICALL
594   PUSH_MULTICALL
595   SvOOK_offset
596   av_iter_p
597   croak_xs_usage
598   fetch_cop_label
599   gv_fetchmethod_flags
600   hv_assert
601   mro_get_from_name
602   mro_get_private_data
603   mro_register
604   mro_set_mro
605   mro_set_private_data
606   pad_sv
607   pregfree2
608   ref
609   save_adelete
610   save_helem_flags
611   save_padsv_and_mortalize
612   save_pushptr
613   stashpv_hvname_match
614   sv_insert_flags
615   sv_utf8_upgrade_flags_grow
616
617 =item perl 5.10.0
618
619   hv_common
620   hv_common_key_len
621   sv_destroyable
622   sys_init
623   sys_init3
624   sys_term
625
626 =item perl 5.9.5
627
628   Perl_signbit
629   SvRX
630   SvRXOK
631   av_create_and_push
632   av_create_and_unshift_one
633   get_cvn_flags
634   gv_fetchfile_flags
635   mro_get_linear_isa
636   mro_method_changed_in
637   my_dirfd
638   pregcomp
639   ptr_table_clear
640   ptr_table_fetch
641   ptr_table_free
642   ptr_table_new
643   ptr_table_split
644   ptr_table_store
645   re_compile
646   re_intuit_start
647   reg_named_buff_all
648   reg_named_buff_exists
649   reg_named_buff_fetch
650   reg_named_buff_firstkey
651   reg_named_buff_nextkey
652   reg_named_buff_scalar
653   regfree_internal
654   savesharedpvn
655   scan_vstring
656   upg_version
657
658 =item perl 5.9.4
659
660   PerlIO_context_layers
661   gv_name_set
662   my_vsnprintf
663   newXS_flags
664   regclass_swash
665   sv_does
666   sv_usepvn_flags
667
668 =item perl 5.9.3
669
670   av_arylen_p
671   ckwarn
672   ckwarn_d
673   csighandler
674   dMULTICALL
675   doref
676   gv_const_sv
677   hv_eiter_p
678   hv_eiter_set
679   hv_name_set
680   hv_placeholders_get
681   hv_placeholders_p
682   hv_placeholders_set
683   hv_riter_p
684   hv_riter_set
685   is_utf8_string_loclen
686   newGIVENOP
687   newSVhek
688   newSVpvs_share
689   newWHENOP
690   newWHILEOP
691   savepvs
692   sortsv_flags
693   vverify
694
695 =item perl 5.9.2
696
697   SvPVbyte_force
698   find_rundefsvoffset
699   gv_fetchsv
700   op_refcnt_lock
701   op_refcnt_unlock
702   savesvpv
703   vnormal
704
705 =item perl 5.9.1
706
707   hv_clear_placeholders
708   hv_scalar
709   scan_version
710   sv_2iv_flags
711   sv_2uv_flags
712
713 =item perl 5.9.0
714
715   new_version
716   save_set_svflags
717   vcmp
718   vnumify
719   vstringify
720
721 =item perl 5.8.3
722
723   SvIsCOW
724   SvIsCOW_shared_hash
725
726 =item perl 5.8.1
727
728   SvVOK
729   doing_taint
730   find_runcv
731   is_utf8_string_loc
732   packlist
733   save_bool
734   savestack_grow_cnt
735   seed
736   sv_cat_decode
737   sv_compile_2op
738   sv_setpviv
739   sv_setpviv_mg
740   unpackstring
741
742 =item perl 5.8.0
743
744   hv_iternext_flags
745   hv_store_flags
746   is_utf8_idcont
747   nothreadhook
748
749 =item perl 5.7.3
750
751   PerlIO_clearerr
752   PerlIO_close
753   PerlIO_eof
754   PerlIO_error
755   PerlIO_fileno
756   PerlIO_fill
757   PerlIO_flush
758   PerlIO_get_base
759   PerlIO_get_bufsiz
760   PerlIO_get_cnt
761   PerlIO_get_ptr
762   PerlIO_read
763   PerlIO_seek
764   PerlIO_set_cnt
765   PerlIO_set_ptrcnt
766   PerlIO_setlinebuf
767   PerlIO_stderr
768   PerlIO_stdin
769   PerlIO_stdout
770   PerlIO_tell
771   PerlIO_unread
772   PerlIO_write
773   SvLOCK
774   SvSHARE
775   SvUNLOCK
776   atfork_lock
777   atfork_unlock
778   custom_op_desc
779   custom_op_name
780   deb
781   debstack
782   debstackptrs
783   gv_fetchmeth_autoload
784   ibcmp_utf8
785   my_fork
786   my_socketpair
787   pack_cat
788   perl_destruct
789   pv_uni_display
790   save_shared_pvref
791   savesharedpv
792   sortsv
793   sv_copypv
794   sv_magicext
795   sv_nolocking
796   sv_nosharing
797   sv_recode_to_utf8
798   sv_uni_display
799   to_uni_fold
800   to_uni_lower
801   to_uni_title
802   to_uni_upper
803   to_utf8_case
804   to_utf8_fold
805   to_utf8_lower
806   to_utf8_title
807   to_utf8_upper
808   unpack_str
809   uvchr_to_utf8_flags
810   uvuni_to_utf8_flags
811   vdeb
812
813 =item perl 5.7.2
814
815   calloc
816   getcwd_sv
817   init_tm
818   malloc
819   mfree
820   mini_mktime
821   my_atof2
822   my_strftime
823   op_null
824   realloc
825   sv_catpvn_flags
826   sv_catsv_flags
827   sv_setsv_flags
828   sv_utf8_upgrade_flags
829   sv_utf8_upgrade_nomg
830   swash_fetch
831
832 =item perl 5.7.1
833
834   POPpbytex
835   bytes_from_utf8
836   despatch_signals
837   do_openn
838   gv_handler
839   is_lvalue_sub
840   my_popen_list
841   save_mortalizesv
842   scan_num
843   sv_force_normal_flags
844   sv_setref_uv
845   sv_unref_flags
846   sv_utf8_upgrade
847   utf8_length
848   utf8_to_uvchr
849   utf8_to_uvuni
850   utf8n_to_uvuni
851   uvuni_to_utf8
852
853 =item perl 5.6.1
854
855   SvGAMAGIC
856   apply_attrs_string
857   bytes_to_utf8
858   gv_efullname4
859   gv_fullname4
860   is_utf8_string
861   save_generic_pvref
862   utf16_to_utf8
863   utf16_to_utf8_reversed
864   utf8_to_bytes
865
866 =item perl 5.6.0
867
868   PERL_SYS_INIT3
869   SvIOK_UV
870   SvIOK_notUV
871   SvIOK_only_UV
872   SvPOK_only_UTF8
873   SvPVbyte_nolen
874   SvPVbytex
875   SvPVbytex_force
876   SvPVutf8
877   SvPVutf8_force
878   SvPVutf8_nolen
879   SvPVutf8x
880   SvPVutf8x_force
881   SvUOK
882   SvUTF8
883   SvUTF8_off
884   SvUTF8_on
885   av_delete
886   av_exists
887   call_atexit
888   cast_i32
889   cast_iv
890   cast_ulong
891   cast_uv
892   do_gv_dump
893   do_gvgv_dump
894   do_hv_dump
895   do_magic_dump
896   do_op_dump
897   do_open9
898   do_pmop_dump
899   do_sv_dump
900   dump_all
901   dump_eval
902   dump_form
903   dump_indent
904   dump_packsubs
905   dump_sub
906   dump_vindent
907   get_context
908   get_ppaddr
909   gv_dump
910   init_i18nl10n
911   init_i18nl14n
912   is_uni_alnum
913   is_uni_alnum_lc
914   is_uni_alnumc
915   is_uni_alnumc_lc
916   is_uni_alpha
917   is_uni_alpha_lc
918   is_uni_ascii
919   is_uni_ascii_lc
920   is_uni_cntrl
921   is_uni_cntrl_lc
922   is_uni_digit
923   is_uni_digit_lc
924   is_uni_graph
925   is_uni_graph_lc
926   is_uni_idfirst
927   is_uni_idfirst_lc
928   is_uni_lower
929   is_uni_lower_lc
930   is_uni_print
931   is_uni_print_lc
932   is_uni_punct
933   is_uni_punct_lc
934   is_uni_space
935   is_uni_space_lc
936   is_uni_upper
937   is_uni_upper_lc
938   is_uni_xdigit
939   is_uni_xdigit_lc
940   is_utf8_alnum
941   is_utf8_alnumc
942   is_utf8_alpha
943   is_utf8_ascii
944   is_utf8_char
945   is_utf8_cntrl
946   is_utf8_digit
947   is_utf8_graph
948   is_utf8_idfirst
949   is_utf8_lower
950   is_utf8_mark
951   is_utf8_print
952   is_utf8_punct
953   is_utf8_space
954   is_utf8_upper
955   is_utf8_xdigit
956   magic_dump
957   mess
958   my_atof
959   my_fflush_all
960   newANONATTRSUB
961   newATTRSUB
962   newXS
963   newXSproto
964   new_collate
965   new_ctype
966   new_numeric
967   op_dump
968   perl_parse
969   pmop_dump
970   re_intuit_string
971   reginitcolors
972   require_pv
973   safesyscalloc
974   safesysfree
975   safesysmalloc
976   safesysrealloc
977   save_I8
978   save_alloc
979   save_destructor
980   save_destructor_x
981   save_re_context
982   save_vptr
983   scan_bin
984   set_context
985   set_numeric_local
986   set_numeric_radix
987   set_numeric_standard
988   str_to_version
989   sv_2pvutf8
990   sv_2pvutf8_nolen
991   sv_force_normal
992   sv_len_utf8
993   sv_pos_b2u
994   sv_pos_u2b
995   sv_pv
996   sv_pvbyte
997   sv_pvbyten
998   sv_pvbyten_force
999   sv_pvutf8
1000   sv_pvutf8n
1001   sv_pvutf8n_force
1002   sv_rvweaken
1003   sv_utf8_decode
1004   sv_utf8_downgrade
1005   sv_utf8_encode
1006   swash_init
1007   tmps_grow
1008   to_uni_lower_lc
1009   to_uni_title_lc
1010   to_uni_upper_lc
1011   utf8_distance
1012   utf8_hop
1013   vcroak
1014   vform
1015   vmess
1016   vwarn
1017   vwarner
1018
1019 =item perl 5.005_03
1020
1021   POPpx
1022   get_vtbl
1023   save_generic_svref
1024
1025 =item perl 5.005
1026
1027   PL_modglobal
1028   cx_dump
1029   debop
1030   debprofdump
1031   fbm_compile
1032   fbm_instr
1033   get_op_descs
1034   get_op_names
1035   init_stacks
1036   mg_length
1037   mg_size
1038   newHVhv
1039   new_stackinfo
1040   regdump
1041   regexec_flags
1042   regnext
1043   runops_debug
1044   runops_standard
1045   save_iv
1046   screaminstr
1047   sv_iv
1048   sv_nv
1049   sv_peek
1050   sv_pvn
1051   sv_pvn_nomg
1052   sv_true
1053
1054 =item perl 5.004_05
1055
1056   do_binmode
1057   save_aelem
1058   save_helem
1059
1060 =item perl 5.004
1061
1062   GIMME_V
1063   G_VOID
1064   HEf_SVKEY
1065   HeHASH
1066   HeKEY
1067   HeKLEN
1068   HePV
1069   HeSVKEY
1070   HeSVKEY_force
1071   HeSVKEY_set
1072   HeVAL
1073   SvSetMagicSV
1074   SvSetMagicSV_nosteal
1075   SvSetSV_nosteal
1076   SvTAINTED
1077   SvTAINTED_off
1078   SvTAINTED_on
1079   block_gimme
1080   call_list
1081   cv_const_sv
1082   delimcpy
1083   do_open
1084   form
1085   gv_autoload4
1086   gv_efullname3
1087   gv_fetchmethod_autoload
1088   gv_fullname3
1089   hv_delayfree_ent
1090   hv_delete_ent
1091   hv_exists_ent
1092   hv_fetch_ent
1093   hv_free_ent
1094   hv_iterkeysv
1095   hv_ksplit
1096   hv_store_ent
1097   ibcmp_locale
1098   my_failure_exit
1099   my_memcmp
1100   my_pclose
1101   my_popen
1102   newSVpvf
1103   rsignal
1104   rsignal_state
1105   save_I16
1106   save_gp
1107   share_hek
1108   start_subparse
1109   sv_catpvf
1110   sv_catpvf_mg
1111   sv_cmp_locale
1112   sv_derived_from
1113   sv_gets
1114   sv_magic_portable
1115   sv_setpvf
1116   sv_setpvf_mg
1117   sv_taint
1118   sv_tainted
1119   sv_untaint
1120   sv_vcatpvf
1121   sv_vcatpvf_mg
1122   sv_vcatpvfn
1123   sv_vsetpvf
1124   sv_vsetpvf_mg
1125   sv_vsetpvfn
1126   unsharepvn
1127   vnewSVpvf
1128   warner
1129
1130 =back
1131
1132 =head1 BUGS
1133
1134 If you find any bugs, C<Devel::PPPort> doesn't seem to build on your
1135 system or any of its tests fail, please use the CPAN Request Tracker
1136 at L<http://rt.cpan.org/> to create a ticket for the module.
1137
1138 =head1 AUTHORS
1139
1140 =over 2
1141
1142 =item *
1143
1144 Version 1.x of Devel::PPPort was written by Kenneth Albanowski.
1145
1146 =item *
1147
1148 Version 2.x was ported to the Perl core by Paul Marquess.
1149
1150 =item *
1151
1152 Version 3.x was ported back to CPAN by Marcus Holland-Moritz.
1153
1154 =back
1155
1156 =head1 COPYRIGHT
1157
1158 Version 3.x, Copyright (C) 2004-2009, Marcus Holland-Moritz.
1159
1160 Version 2.x, Copyright (C) 2001, Paul Marquess.
1161
1162 Version 1.x, Copyright (C) 1999, Kenneth Albanowski.
1163
1164 This program is free software; you can redistribute it and/or
1165 modify it under the same terms as Perl itself.
1166
1167 =head1 SEE ALSO
1168
1169 See L<h2xs>, L<ppport.h>.
1170
1171 =cut
1172
1173 package Devel::PPPort;
1174
1175 use strict;
1176 use vars qw($VERSION $data);
1177
1178 $VERSION = do { my @r = '$Snapshot: /Devel-PPPort/3.19 $' =~ /(\d+\.\d+(?:_\d+)?)/; @r ? $r[0] : '9.99' };
1179
1180 sub _init_data
1181 {
1182   $data = do { local $/; <DATA> };
1183   my $pkg = 'Devel::PPPort';
1184   $data =~ s/__PERL_VERSION__/$]/g;
1185   $data =~ s/__VERSION__/$VERSION/g;
1186   $data =~ s/__PKG__/$pkg/g;
1187   $data =~ s/^\|>//gm;
1188 }
1189
1190 sub WriteFile
1191 {
1192   my $file = shift || 'ppport.h';
1193   defined $data or _init_data();
1194   my $copy = $data;
1195   $copy =~ s/\bppport\.h\b/$file/g;
1196
1197   open F, ">$file" or return undef;
1198   print F $copy;
1199   close F;
1200
1201   return 1;
1202 }
1203
1204 1;
1205
1206 __DATA__
1207 #if 0
1208 <<'SKIP';
1209 #endif
1210 /*
1211 ----------------------------------------------------------------------
1212
1213     ppport.h -- Perl/Pollution/Portability Version __VERSION__
1214
1215     Automatically created by __PKG__ running under perl __PERL_VERSION__.
1216
1217     Do NOT edit this file directly! -- Edit PPPort_pm.PL and the
1218     includes in parts/inc/ instead.
1219
1220     Use 'perldoc ppport.h' to view the documentation below.
1221
1222 ----------------------------------------------------------------------
1223
1224 SKIP
1225
1226 |>=pod
1227 |>
1228 |>=head1 NAME
1229 |>
1230 |>ppport.h - Perl/Pollution/Portability version __VERSION__
1231 |>
1232 |>=head1 SYNOPSIS
1233 |>
1234 |>  perl ppport.h [options] [source files]
1235 |>
1236 |>  Searches current directory for files if no [source files] are given
1237 |>
1238 |>  --help                      show short help
1239 |>
1240 |>  --version                   show version
1241 |>
1242 |>  --patch=file                write one patch file with changes
1243 |>  --copy=suffix               write changed copies with suffix
1244 |>  --diff=program              use diff program and options
1245 |>
1246 |>  --compat-version=version    provide compatibility with Perl version
1247 |>  --cplusplus                 accept C++ comments
1248 |>
1249 |>  --quiet                     don't output anything except fatal errors
1250 |>  --nodiag                    don't show diagnostics
1251 |>  --nohints                   don't show hints
1252 |>  --nochanges                 don't suggest changes
1253 |>  --nofilter                  don't filter input files
1254 |>
1255 |>  --strip                     strip all script and doc functionality from
1256 |>                              ppport.h
1257 |>
1258 |>  --list-provided             list provided API
1259 |>  --list-unsupported          list unsupported API
1260 |>  --api-info=name             show Perl API portability information
1261 |>
1262 |>=head1 COMPATIBILITY
1263 |>
1264 |>This version of F<ppport.h> is designed to support operation with Perl
1265 |>installations back to 5.003, and has been tested up to 5.10.0.
1266 |>
1267 |>=head1 OPTIONS
1268 |>
1269 |>=head2 --help
1270 |>
1271 |>Display a brief usage summary.
1272 |>
1273 |>=head2 --version
1274 |>
1275 |>Display the version of F<ppport.h>.
1276 |>
1277 |>=head2 --patch=I<file>
1278 |>
1279 |>If this option is given, a single patch file will be created if
1280 |>any changes are suggested. This requires a working diff program
1281 |>to be installed on your system.
1282 |>
1283 |>=head2 --copy=I<suffix>
1284 |>
1285 |>If this option is given, a copy of each file will be saved with
1286 |>the given suffix that contains the suggested changes. This does
1287 |>not require any external programs. Note that this does not
1288 |>automagially add a dot between the original filename and the
1289 |>suffix. If you want the dot, you have to include it in the option
1290 |>argument.
1291 |>
1292 |>If neither C<--patch> or C<--copy> are given, the default is to
1293 |>simply print the diffs for each file. This requires either
1294 |>C<Text::Diff> or a C<diff> program to be installed.
1295 |>
1296 |>=head2 --diff=I<program>
1297 |>
1298 |>Manually set the diff program and options to use. The default
1299 |>is to use C<Text::Diff>, when installed, and output unified
1300 |>context diffs.
1301 |>
1302 |>=head2 --compat-version=I<version>
1303 |>
1304 |>Tell F<ppport.h> to check for compatibility with the given
1305 |>Perl version. The default is to check for compatibility with Perl
1306 |>version 5.003. You can use this option to reduce the output
1307 |>of F<ppport.h> if you intend to be backward compatible only
1308 |>down to a certain Perl version.
1309 |>
1310 |>=head2 --cplusplus
1311 |>
1312 |>Usually, F<ppport.h> will detect C++ style comments and
1313 |>replace them with C style comments for portability reasons.
1314 |>Using this option instructs F<ppport.h> to leave C++
1315 |>comments untouched.
1316 |>
1317 |>=head2 --quiet
1318 |>
1319 |>Be quiet. Don't print anything except fatal errors.
1320 |>
1321 |>=head2 --nodiag
1322 |>
1323 |>Don't output any diagnostic messages. Only portability
1324 |>alerts will be printed.
1325 |>
1326 |>=head2 --nohints
1327 |>
1328 |>Don't output any hints. Hints often contain useful portability
1329 |>notes. Warnings will still be displayed.
1330 |>
1331 |>=head2 --nochanges
1332 |>
1333 |>Don't suggest any changes. Only give diagnostic output and hints
1334 |>unless these are also deactivated.
1335 |>
1336 |>=head2 --nofilter
1337 |>
1338 |>Don't filter the list of input files. By default, files not looking
1339 |>like source code (i.e. not *.xs, *.c, *.cc, *.cpp or *.h) are skipped.
1340 |>
1341 |>=head2 --strip
1342 |>
1343 |>Strip all script and documentation functionality from F<ppport.h>.
1344 |>This reduces the size of F<ppport.h> dramatically and may be useful
1345 |>if you want to include F<ppport.h> in smaller modules without
1346 |>increasing their distribution size too much.
1347 |>
1348 |>The stripped F<ppport.h> will have a C<--unstrip> option that allows
1349 |>you to undo the stripping, but only if an appropriate C<Devel::PPPort>
1350 |>module is installed.
1351 |>
1352 |>=head2 --list-provided
1353 |>
1354 |>Lists the API elements for which compatibility is provided by
1355 |>F<ppport.h>. Also lists if it must be explicitly requested,
1356 |>if it has dependencies, and if there are hints or warnings for it.
1357 |>
1358 |>=head2 --list-unsupported
1359 |>
1360 |>Lists the API elements that are known not to be supported by
1361 |>F<ppport.h> and below which version of Perl they probably
1362 |>won't be available or work.
1363 |>
1364 |>=head2 --api-info=I<name>
1365 |>
1366 |>Show portability information for API elements matching I<name>.
1367 |>If I<name> is surrounded by slashes, it is interpreted as a regular
1368 |>expression.
1369 |>
1370 |>=head1 DESCRIPTION
1371 |>
1372 |>In order for a Perl extension (XS) module to be as portable as possible
1373 |>across differing versions of Perl itself, certain steps need to be taken.
1374 |>
1375 |>=over 4
1376 |>
1377 |>=item *
1378 |>
1379 |>Including this header is the first major one. This alone will give you
1380 |>access to a large part of the Perl API that hasn't been available in
1381 |>earlier Perl releases. Use
1382 |>
1383 |>    perl ppport.h --list-provided
1384 |>
1385 |>to see which API elements are provided by ppport.h.
1386 |>
1387 |>=item *
1388 |>
1389 |>You should avoid using deprecated parts of the API. For example, using
1390 |>global Perl variables without the C<PL_> prefix is deprecated. Also,
1391 |>some API functions used to have a C<perl_> prefix. Using this form is
1392 |>also deprecated. You can safely use the supported API, as F<ppport.h>
1393 |>will provide wrappers for older Perl versions.
1394 |>
1395 |>=item *
1396 |>
1397 |>If you use one of a few functions or variables that were not present in
1398 |>earlier versions of Perl, and that can't be provided using a macro, you
1399 |>have to explicitly request support for these functions by adding one or
1400 |>more C<#define>s in your source code before the inclusion of F<ppport.h>.
1401 |>
1402 |>These functions or variables will be marked C<explicit> in the list shown
1403 |>by C<--list-provided>.
1404 |>
1405 |>Depending on whether you module has a single or multiple files that
1406 |>use such functions or variables, you want either C<static> or global
1407 |>variants.
1408 |>
1409 |>For a C<static> function or variable (used only in a single source
1410 |>file), use:
1411 |>
1412 |>    #define NEED_function
1413 |>    #define NEED_variable
1414 |>
1415 |>For a global function or variable (used in multiple source files),
1416 |>use:
1417 |>
1418 |>    #define NEED_function_GLOBAL
1419 |>    #define NEED_variable_GLOBAL
1420 |>
1421 |>Note that you mustn't have more than one global request for the
1422 |>same function or variable in your project.
1423 |>
1424 |>    Function / Variable       Static Request               Global Request
1425 |>    -----------------------------------------------------------------------------------------
1426 |>    PL_parser                 NEED_PL_parser               NEED_PL_parser_GLOBAL
1427 |>    PL_signals                NEED_PL_signals              NEED_PL_signals_GLOBAL
1428 |>    eval_pv()                 NEED_eval_pv                 NEED_eval_pv_GLOBAL
1429 |>    grok_bin()                NEED_grok_bin                NEED_grok_bin_GLOBAL
1430 |>    grok_hex()                NEED_grok_hex                NEED_grok_hex_GLOBAL
1431 |>    grok_number()             NEED_grok_number             NEED_grok_number_GLOBAL
1432 |>    grok_numeric_radix()      NEED_grok_numeric_radix      NEED_grok_numeric_radix_GLOBAL
1433 |>    grok_oct()                NEED_grok_oct                NEED_grok_oct_GLOBAL
1434 |>    load_module()             NEED_load_module             NEED_load_module_GLOBAL
1435 |>    my_snprintf()             NEED_my_snprintf             NEED_my_snprintf_GLOBAL
1436 |>    my_sprintf()              NEED_my_sprintf              NEED_my_sprintf_GLOBAL
1437 |>    my_strlcat()              NEED_my_strlcat              NEED_my_strlcat_GLOBAL
1438 |>    my_strlcpy()              NEED_my_strlcpy              NEED_my_strlcpy_GLOBAL
1439 |>    newCONSTSUB()             NEED_newCONSTSUB             NEED_newCONSTSUB_GLOBAL
1440 |>    newRV_noinc()             NEED_newRV_noinc             NEED_newRV_noinc_GLOBAL
1441 |>    newSV_type()              NEED_newSV_type              NEED_newSV_type_GLOBAL
1442 |>    newSVpvn_flags()          NEED_newSVpvn_flags          NEED_newSVpvn_flags_GLOBAL
1443 |>    newSVpvn_share()          NEED_newSVpvn_share          NEED_newSVpvn_share_GLOBAL
1444 |>    pv_display()              NEED_pv_display              NEED_pv_display_GLOBAL
1445 |>    pv_escape()               NEED_pv_escape               NEED_pv_escape_GLOBAL
1446 |>    pv_pretty()               NEED_pv_pretty               NEED_pv_pretty_GLOBAL
1447 |>    sv_2pv_flags()            NEED_sv_2pv_flags            NEED_sv_2pv_flags_GLOBAL
1448 |>    sv_2pvbyte()              NEED_sv_2pvbyte              NEED_sv_2pvbyte_GLOBAL
1449 |>    sv_catpvf_mg()            NEED_sv_catpvf_mg            NEED_sv_catpvf_mg_GLOBAL
1450 |>    sv_catpvf_mg_nocontext()  NEED_sv_catpvf_mg_nocontext  NEED_sv_catpvf_mg_nocontext_GLOBAL
1451 |>    sv_pvn_force_flags()      NEED_sv_pvn_force_flags      NEED_sv_pvn_force_flags_GLOBAL
1452 |>    sv_setpvf_mg()            NEED_sv_setpvf_mg            NEED_sv_setpvf_mg_GLOBAL
1453 |>    sv_setpvf_mg_nocontext()  NEED_sv_setpvf_mg_nocontext  NEED_sv_setpvf_mg_nocontext_GLOBAL
1454 |>    vload_module()            NEED_vload_module            NEED_vload_module_GLOBAL
1455 |>    vnewSVpvf()               NEED_vnewSVpvf               NEED_vnewSVpvf_GLOBAL
1456 |>    warner()                  NEED_warner                  NEED_warner_GLOBAL
1457 |>
1458 |>To avoid namespace conflicts, you can change the namespace of the
1459 |>explicitly exported functions / variables using the C<DPPP_NAMESPACE>
1460 |>macro. Just C<#define> the macro before including C<ppport.h>:
1461 |>
1462 |>    #define DPPP_NAMESPACE MyOwnNamespace_
1463 |>    #include "ppport.h"
1464 |>
1465 |>The default namespace is C<DPPP_>.
1466 |>
1467 |>=back
1468 |>
1469 |>The good thing is that most of the above can be checked by running
1470 |>F<ppport.h> on your source code. See the next section for
1471 |>details.
1472 |>
1473 |>=head1 EXAMPLES
1474 |>
1475 |>To verify whether F<ppport.h> is needed for your module, whether you
1476 |>should make any changes to your code, and whether any special defines
1477 |>should be used, F<ppport.h> can be run as a Perl script to check your
1478 |>source code. Simply say:
1479 |>
1480 |>    perl ppport.h
1481 |>
1482 |>The result will usually be a list of patches suggesting changes
1483 |>that should at least be acceptable, if not necessarily the most
1484 |>efficient solution, or a fix for all possible problems.
1485 |>
1486 |>If you know that your XS module uses features only available in
1487 |>newer Perl releases, if you're aware that it uses C++ comments,
1488 |>and if you want all suggestions as a single patch file, you could
1489 |>use something like this:
1490 |>
1491 |>    perl ppport.h --compat-version=5.6.0 --cplusplus --patch=test.diff
1492 |>
1493 |>If you only want your code to be scanned without any suggestions
1494 |>for changes, use:
1495 |>
1496 |>    perl ppport.h --nochanges
1497 |>
1498 |>You can specify a different C<diff> program or options, using
1499 |>the C<--diff> option:
1500 |>
1501 |>    perl ppport.h --diff='diff -C 10'
1502 |>
1503 |>This would output context diffs with 10 lines of context.
1504 |>
1505 |>If you want to create patched copies of your files instead, use:
1506 |>
1507 |>    perl ppport.h --copy=.new
1508 |>
1509 |>To display portability information for the C<newSVpvn> function,
1510 |>use:
1511 |>
1512 |>    perl ppport.h --api-info=newSVpvn
1513 |>
1514 |>Since the argument to C<--api-info> can be a regular expression,
1515 |>you can use
1516 |>
1517 |>    perl ppport.h --api-info=/_nomg$/
1518 |>
1519 |>to display portability information for all C<_nomg> functions or
1520 |>
1521 |>    perl ppport.h --api-info=/./
1522 |>
1523 |>to display information for all known API elements.
1524 |>
1525 |>=head1 BUGS
1526 |>
1527 |>If this version of F<ppport.h> is causing failure during
1528 |>the compilation of this module, please check if newer versions
1529 |>of either this module or C<Devel::PPPort> are available on CPAN
1530 |>before sending a bug report.
1531 |>
1532 |>If F<ppport.h> was generated using the latest version of
1533 |>C<Devel::PPPort> and is causing failure of this module, please
1534 |>file a bug report using the CPAN Request Tracker at L<http://rt.cpan.org/>.
1535 |>
1536 |>Please include the following information:
1537 |>
1538 |>=over 4
1539 |>
1540 |>=item 1.
1541 |>
1542 |>The complete output from running "perl -V"
1543 |>
1544 |>=item 2.
1545 |>
1546 |>This file.
1547 |>
1548 |>=item 3.
1549 |>
1550 |>The name and version of the module you were trying to build.
1551 |>
1552 |>=item 4.
1553 |>
1554 |>A full log of the build that failed.
1555 |>
1556 |>=item 5.
1557 |>
1558 |>Any other information that you think could be relevant.
1559 |>
1560 |>=back
1561 |>
1562 |>For the latest version of this code, please get the C<Devel::PPPort>
1563 |>module from CPAN.
1564 |>
1565 |>=head1 COPYRIGHT
1566 |>
1567 |>Version 3.x, Copyright (c) 2004-2009, Marcus Holland-Moritz.
1568 |>
1569 |>Version 2.x, Copyright (C) 2001, Paul Marquess.
1570 |>
1571 |>Version 1.x, Copyright (C) 1999, Kenneth Albanowski.
1572 |>
1573 |>This program is free software; you can redistribute it and/or
1574 |>modify it under the same terms as Perl itself.
1575 |>
1576 |>=head1 SEE ALSO
1577 |>
1578 |>See L<Devel::PPPort>.
1579 |>
1580 |>=cut
1581
1582 use strict;
1583
1584 # Disable broken TRIE-optimization
1585 BEGIN { eval '${^RE_TRIE_MAXBUF} = -1' if $] >= 5.009004 && $] <= 5.009005 }
1586
1587 my $VERSION = __VERSION__;
1588
1589 my %opt = (
1590   quiet     => 0,
1591   diag      => 1,
1592   hints     => 1,
1593   changes   => 1,
1594   cplusplus => 0,
1595   filter    => 1,
1596   strip     => 0,
1597   version   => 0,
1598 );
1599
1600 my($ppport) = $0 =~ /([\w.]+)$/;
1601 my $LF = '(?:\r\n|[\r\n])';   # line feed
1602 my $HS = "[ \t]";             # horizontal whitespace
1603
1604 # Never use C comments in this file!
1605 my $ccs  = '/'.'*';
1606 my $cce  = '*'.'/';
1607 my $rccs = quotemeta $ccs;
1608 my $rcce = quotemeta $cce;
1609
1610 eval {
1611   require Getopt::Long;
1612   Getopt::Long::GetOptions(\%opt, qw(
1613     help quiet diag! filter! hints! changes! cplusplus strip version
1614     patch=s copy=s diff=s compat-version=s
1615     list-provided list-unsupported api-info=s
1616   )) or usage();
1617 };
1618
1619 if ($@ and grep /^-/, @ARGV) {
1620   usage() if "@ARGV" =~ /^--?h(?:elp)?$/;
1621   die "Getopt::Long not found. Please don't use any options.\n";
1622 }
1623
1624 if ($opt{version}) {
1625   print "This is $0 $VERSION.\n";
1626   exit 0;
1627 }
1628
1629 usage() if $opt{help};
1630 strip() if $opt{strip};
1631
1632 if (exists $opt{'compat-version'}) {
1633   my($r,$v,$s) = eval { parse_version($opt{'compat-version'}) };
1634   if ($@) {
1635     die "Invalid version number format: '$opt{'compat-version'}'\n";
1636   }
1637   die "Only Perl 5 is supported\n" if $r != 5;
1638   die "Invalid version number: $opt{'compat-version'}\n" if $v >= 1000 || $s >= 1000;
1639   $opt{'compat-version'} = sprintf "%d.%03d%03d", $r, $v, $s;
1640 }
1641 else {
1642   $opt{'compat-version'} = 5;
1643 }
1644
1645 my %API = map { /^(\w+)\|([^|]*)\|([^|]*)\|(\w*)$/
1646                 ? ( $1 => {
1647                       ($2                  ? ( base     => $2 ) : ()),
1648                       ($3                  ? ( todo     => $3 ) : ()),
1649                       (index($4, 'v') >= 0 ? ( varargs  => 1  ) : ()),
1650                       (index($4, 'p') >= 0 ? ( provided => 1  ) : ()),
1651                       (index($4, 'n') >= 0 ? ( nothxarg => 1  ) : ()),
1652                     } )
1653                 : die "invalid spec: $_" } qw(
1654 AvFILLp|5.004050||p
1655 AvFILL|||
1656 CLASS|||n
1657 CPERLscope|5.005000||p
1658 CX_CURPAD_SAVE|||
1659 CX_CURPAD_SV|||
1660 CopFILEAV|5.006000||p
1661 CopFILEGV_set|5.006000||p
1662 CopFILEGV|5.006000||p
1663 CopFILESV|5.006000||p
1664 CopFILE_set|5.006000||p
1665 CopFILE|5.006000||p
1666 CopSTASHPV_set|5.006000||p
1667 CopSTASHPV|5.006000||p
1668 CopSTASH_eq|5.006000||p
1669 CopSTASH_set|5.006000||p
1670 CopSTASH|5.006000||p
1671 CopyD|5.009002||p
1672 Copy|||
1673 CvPADLIST|||
1674 CvSTASH|||
1675 CvWEAKOUTSIDE|||
1676 DEFSV_set|5.011000||p
1677 DEFSV|5.004050||p
1678 END_EXTERN_C|5.005000||p
1679 ENTER|||
1680 ERRSV|5.004050||p
1681 EXTEND|||
1682 EXTERN_C|5.005000||p
1683 F0convert|||n
1684 FREETMPS|||
1685 GIMME_V||5.004000|n
1686 GIMME|||n
1687 GROK_NUMERIC_RADIX|5.007002||p
1688 G_ARRAY|||
1689 G_DISCARD|||
1690 G_EVAL|||
1691 G_METHOD|5.006001||p
1692 G_NOARGS|||
1693 G_SCALAR|||
1694 G_VOID||5.004000|
1695 GetVars|||
1696 GvSVn|5.009003||p
1697 GvSV|||
1698 Gv_AMupdate|||
1699 HEf_SVKEY||5.004000|
1700 HeHASH||5.004000|
1701 HeKEY||5.004000|
1702 HeKLEN||5.004000|
1703 HePV||5.004000|
1704 HeSVKEY_force||5.004000|
1705 HeSVKEY_set||5.004000|
1706 HeSVKEY||5.004000|
1707 HeUTF8||5.011000|
1708 HeVAL||5.004000|
1709 HvNAMELEN_get|5.009003||p
1710 HvNAME_get|5.009003||p
1711 HvNAME|||
1712 INT2PTR|5.006000||p
1713 IN_LOCALE_COMPILETIME|5.007002||p
1714 IN_LOCALE_RUNTIME|5.007002||p
1715 IN_LOCALE|5.007002||p
1716 IN_PERL_COMPILETIME|5.008001||p
1717 IS_NUMBER_GREATER_THAN_UV_MAX|5.007002||p
1718 IS_NUMBER_INFINITY|5.007002||p
1719 IS_NUMBER_IN_UV|5.007002||p
1720 IS_NUMBER_NAN|5.007003||p
1721 IS_NUMBER_NEG|5.007002||p
1722 IS_NUMBER_NOT_INT|5.007002||p
1723 IVSIZE|5.006000||p
1724 IVTYPE|5.006000||p
1725 IVdf|5.006000||p
1726 LEAVE|||
1727 LVRET|||
1728 MARK|||
1729 MULTICALL||5.011000|
1730 MY_CXT_CLONE|5.009002||p
1731 MY_CXT_INIT|5.007003||p
1732 MY_CXT|5.007003||p
1733 MoveD|5.009002||p
1734 Move|||
1735 NOOP|5.005000||p
1736 NUM2PTR|5.006000||p
1737 NVTYPE|5.006000||p
1738 NVef|5.006001||p
1739 NVff|5.006001||p
1740 NVgf|5.006001||p
1741 Newxc|5.009003||p
1742 Newxz|5.009003||p
1743 Newx|5.009003||p
1744 Nullav|||
1745 Nullch|||
1746 Nullcv|||
1747 Nullhv|||
1748 Nullsv|||
1749 ORIGMARK|||
1750 PAD_BASE_SV|||
1751 PAD_CLONE_VARS|||
1752 PAD_COMPNAME_FLAGS|||
1753 PAD_COMPNAME_GEN_set|||
1754 PAD_COMPNAME_GEN|||
1755 PAD_COMPNAME_OURSTASH|||
1756 PAD_COMPNAME_PV|||
1757 PAD_COMPNAME_TYPE|||
1758 PAD_DUP|||
1759 PAD_RESTORE_LOCAL|||
1760 PAD_SAVE_LOCAL|||
1761 PAD_SAVE_SETNULLPAD|||
1762 PAD_SETSV|||
1763 PAD_SET_CUR_NOSAVE|||
1764 PAD_SET_CUR|||
1765 PAD_SVl|||
1766 PAD_SV|||
1767 PERLIO_FUNCS_CAST|5.009003||p
1768 PERLIO_FUNCS_DECL|5.009003||p
1769 PERL_ABS|5.008001||p
1770 PERL_BCDVERSION|5.011000||p
1771 PERL_GCC_BRACE_GROUPS_FORBIDDEN|5.008001||p
1772 PERL_HASH|5.004000||p
1773 PERL_INT_MAX|5.004000||p
1774 PERL_INT_MIN|5.004000||p
1775 PERL_LONG_MAX|5.004000||p
1776 PERL_LONG_MIN|5.004000||p
1777 PERL_MAGIC_arylen|5.007002||p
1778 PERL_MAGIC_backref|5.007002||p
1779 PERL_MAGIC_bm|5.007002||p
1780 PERL_MAGIC_collxfrm|5.007002||p
1781 PERL_MAGIC_dbfile|5.007002||p
1782 PERL_MAGIC_dbline|5.007002||p
1783 PERL_MAGIC_defelem|5.007002||p
1784 PERL_MAGIC_envelem|5.007002||p
1785 PERL_MAGIC_env|5.007002||p
1786 PERL_MAGIC_ext|5.007002||p
1787 PERL_MAGIC_fm|5.007002||p
1788 PERL_MAGIC_glob|5.011000||p
1789 PERL_MAGIC_isaelem|5.007002||p
1790 PERL_MAGIC_isa|5.007002||p
1791 PERL_MAGIC_mutex|5.011000||p
1792 PERL_MAGIC_nkeys|5.007002||p
1793 PERL_MAGIC_overload_elem|5.007002||p
1794 PERL_MAGIC_overload_table|5.007002||p
1795 PERL_MAGIC_overload|5.007002||p
1796 PERL_MAGIC_pos|5.007002||p
1797 PERL_MAGIC_qr|5.007002||p
1798 PERL_MAGIC_regdata|5.007002||p
1799 PERL_MAGIC_regdatum|5.007002||p
1800 PERL_MAGIC_regex_global|5.007002||p
1801 PERL_MAGIC_shared_scalar|5.007003||p
1802 PERL_MAGIC_shared|5.007003||p
1803 PERL_MAGIC_sigelem|5.007002||p
1804 PERL_MAGIC_sig|5.007002||p
1805 PERL_MAGIC_substr|5.007002||p
1806 PERL_MAGIC_sv|5.007002||p
1807 PERL_MAGIC_taint|5.007002||p
1808 PERL_MAGIC_tiedelem|5.007002||p
1809 PERL_MAGIC_tiedscalar|5.007002||p
1810 PERL_MAGIC_tied|5.007002||p
1811 PERL_MAGIC_utf8|5.008001||p
1812 PERL_MAGIC_uvar_elem|5.007003||p
1813 PERL_MAGIC_uvar|5.007002||p
1814 PERL_MAGIC_vec|5.007002||p
1815 PERL_MAGIC_vstring|5.008001||p
1816 PERL_PV_ESCAPE_ALL|5.009004||p
1817 PERL_PV_ESCAPE_FIRSTCHAR|5.009004||p
1818 PERL_PV_ESCAPE_NOBACKSLASH|5.009004||p
1819 PERL_PV_ESCAPE_NOCLEAR|5.009004||p
1820 PERL_PV_ESCAPE_QUOTE|5.009004||p
1821 PERL_PV_ESCAPE_RE|5.009005||p
1822 PERL_PV_ESCAPE_UNI_DETECT|5.009004||p
1823 PERL_PV_ESCAPE_UNI|5.009004||p
1824 PERL_PV_PRETTY_DUMP|5.009004||p
1825 PERL_PV_PRETTY_ELLIPSES|5.010000||p
1826 PERL_PV_PRETTY_LTGT|5.009004||p
1827 PERL_PV_PRETTY_NOCLEAR|5.010000||p
1828 PERL_PV_PRETTY_QUOTE|5.009004||p
1829 PERL_PV_PRETTY_REGPROP|5.009004||p
1830 PERL_QUAD_MAX|5.004000||p
1831 PERL_QUAD_MIN|5.004000||p
1832 PERL_REVISION|5.006000||p
1833 PERL_SCAN_ALLOW_UNDERSCORES|5.007003||p
1834 PERL_SCAN_DISALLOW_PREFIX|5.007003||p
1835 PERL_SCAN_GREATER_THAN_UV_MAX|5.007003||p
1836 PERL_SCAN_SILENT_ILLDIGIT|5.008001||p
1837 PERL_SHORT_MAX|5.004000||p
1838 PERL_SHORT_MIN|5.004000||p
1839 PERL_SIGNALS_UNSAFE_FLAG|5.008001||p
1840 PERL_SUBVERSION|5.006000||p
1841 PERL_SYS_INIT3||5.006000|
1842 PERL_SYS_INIT|||
1843 PERL_SYS_TERM||5.011000|
1844 PERL_UCHAR_MAX|5.004000||p
1845 PERL_UCHAR_MIN|5.004000||p
1846 PERL_UINT_MAX|5.004000||p
1847 PERL_UINT_MIN|5.004000||p
1848 PERL_ULONG_MAX|5.004000||p
1849 PERL_ULONG_MIN|5.004000||p
1850 PERL_UNUSED_ARG|5.009003||p
1851 PERL_UNUSED_CONTEXT|5.009004||p
1852 PERL_UNUSED_DECL|5.007002||p
1853 PERL_UNUSED_VAR|5.007002||p
1854 PERL_UQUAD_MAX|5.004000||p
1855 PERL_UQUAD_MIN|5.004000||p
1856 PERL_USE_GCC_BRACE_GROUPS|5.009004||p
1857 PERL_USHORT_MAX|5.004000||p
1858 PERL_USHORT_MIN|5.004000||p
1859 PERL_VERSION|5.006000||p
1860 PL_DBsignal|5.005000||p
1861 PL_DBsingle|||pn
1862 PL_DBsub|||pn
1863 PL_DBtrace|||pn
1864 PL_Sv|5.005000||p
1865 PL_bufend|5.011000||p
1866 PL_bufptr|5.011000||p
1867 PL_compiling|5.004050||p
1868 PL_copline|5.011000||p
1869 PL_curcop|5.004050||p
1870 PL_curstash|5.004050||p
1871 PL_debstash|5.004050||p
1872 PL_defgv|5.004050||p
1873 PL_diehook|5.004050||p
1874 PL_dirty|5.004050||p
1875 PL_dowarn|||pn
1876 PL_errgv|5.004050||p
1877 PL_error_count|5.011000||p
1878 PL_expect|5.011000||p
1879 PL_hexdigit|5.005000||p
1880 PL_hints|5.005000||p
1881 PL_in_my_stash|5.011000||p
1882 PL_in_my|5.011000||p
1883 PL_last_in_gv|||n
1884 PL_laststatval|5.005000||p
1885 PL_lex_state|5.011000||p
1886 PL_lex_stuff|5.011000||p
1887 PL_linestr|5.011000||p
1888 PL_modglobal||5.005000|n
1889 PL_na|5.004050||pn
1890 PL_no_modify|5.006000||p
1891 PL_ofsgv|||n
1892 PL_parser|5.009005||p
1893 PL_perl_destruct_level|5.004050||p
1894 PL_perldb|5.004050||p
1895 PL_ppaddr|5.006000||p
1896 PL_rsfp_filters|5.004050||p
1897 PL_rsfp|5.004050||p
1898 PL_rs|||n
1899 PL_signals|5.008001||p
1900 PL_stack_base|5.004050||p
1901 PL_stack_sp|5.004050||p
1902 PL_statcache|5.005000||p
1903 PL_stdingv|5.004050||p
1904 PL_sv_arenaroot|5.004050||p
1905 PL_sv_no|5.004050||pn
1906 PL_sv_undef|5.004050||pn
1907 PL_sv_yes|5.004050||pn
1908 PL_tainted|5.004050||p
1909 PL_tainting|5.004050||p
1910 PL_tokenbuf|5.011000||p
1911 POP_MULTICALL||5.011000|
1912 POPi|||n
1913 POPl|||n
1914 POPn|||n
1915 POPpbytex||5.007001|n
1916 POPpx||5.005030|n
1917 POPp|||n
1918 POPs|||n
1919 PTR2IV|5.006000||p
1920 PTR2NV|5.006000||p
1921 PTR2UV|5.006000||p
1922 PTR2nat|5.009003||p
1923 PTR2ul|5.007001||p
1924 PTRV|5.006000||p
1925 PUSHMARK|||
1926 PUSH_MULTICALL||5.011000|
1927 PUSHi|||
1928 PUSHmortal|5.009002||p
1929 PUSHn|||
1930 PUSHp|||
1931 PUSHs|||
1932 PUSHu|5.004000||p
1933 PUTBACK|||
1934 PerlIO_clearerr||5.007003|
1935 PerlIO_close||5.007003|
1936 PerlIO_context_layers||5.009004|
1937 PerlIO_eof||5.007003|
1938 PerlIO_error||5.007003|
1939 PerlIO_fileno||5.007003|
1940 PerlIO_fill||5.007003|
1941 PerlIO_flush||5.007003|
1942 PerlIO_get_base||5.007003|
1943 PerlIO_get_bufsiz||5.007003|
1944 PerlIO_get_cnt||5.007003|
1945 PerlIO_get_ptr||5.007003|
1946 PerlIO_read||5.007003|
1947 PerlIO_seek||5.007003|
1948 PerlIO_set_cnt||5.007003|
1949 PerlIO_set_ptrcnt||5.007003|
1950 PerlIO_setlinebuf||5.007003|
1951 PerlIO_stderr||5.007003|
1952 PerlIO_stdin||5.007003|
1953 PerlIO_stdout||5.007003|
1954 PerlIO_tell||5.007003|
1955 PerlIO_unread||5.007003|
1956 PerlIO_write||5.007003|
1957 Perl_signbit||5.009005|n
1958 PoisonFree|5.009004||p
1959 PoisonNew|5.009004||p
1960 PoisonWith|5.009004||p
1961 Poison|5.008000||p
1962 RETVAL|||n
1963 Renewc|||
1964 Renew|||
1965 SAVECLEARSV|||
1966 SAVECOMPPAD|||
1967 SAVEPADSV|||
1968 SAVETMPS|||
1969 SAVE_DEFSV|5.004050||p
1970 SPAGAIN|||
1971 SP|||
1972 START_EXTERN_C|5.005000||p
1973 START_MY_CXT|5.007003||p
1974 STMT_END|||p
1975 STMT_START|||p
1976 STR_WITH_LEN|5.009003||p
1977 ST|||
1978 SV_CONST_RETURN|5.009003||p
1979 SV_COW_DROP_PV|5.008001||p
1980 SV_COW_SHARED_HASH_KEYS|5.009005||p
1981 SV_GMAGIC|5.007002||p
1982 SV_HAS_TRAILING_NUL|5.009004||p
1983 SV_IMMEDIATE_UNREF|5.007001||p
1984 SV_MUTABLE_RETURN|5.009003||p
1985 SV_NOSTEAL|5.009002||p
1986 SV_SMAGIC|5.009003||p
1987 SV_UTF8_NO_ENCODING|5.008001||p
1988 SVfARG|5.009005||p
1989 SVf_UTF8|5.006000||p
1990 SVf|5.006000||p
1991 SVt_IV|||
1992 SVt_NV|||
1993 SVt_PVAV|||
1994 SVt_PVCV|||
1995 SVt_PVHV|||
1996 SVt_PVMG|||
1997 SVt_PV|||
1998 Safefree|||
1999 Slab_Alloc|||
2000 Slab_Free|||
2001 Slab_to_rw|||
2002 StructCopy|||
2003 SvCUR_set|||
2004 SvCUR|||
2005 SvEND|||
2006 SvGAMAGIC||5.006001|
2007 SvGETMAGIC|5.004050||p
2008 SvGROW|||
2009 SvIOK_UV||5.006000|
2010 SvIOK_notUV||5.006000|
2011 SvIOK_off|||
2012 SvIOK_only_UV||5.006000|
2013 SvIOK_only|||
2014 SvIOK_on|||
2015 SvIOKp|||
2016 SvIOK|||
2017 SvIVX|||
2018 SvIV_nomg|5.009001||p
2019 SvIV_set|||
2020 SvIVx|||
2021 SvIV|||
2022 SvIsCOW_shared_hash||5.008003|
2023 SvIsCOW||5.008003|
2024 SvLEN_set|||
2025 SvLEN|||
2026 SvLOCK||5.007003|
2027 SvMAGIC_set|5.009003||p
2028 SvNIOK_off|||
2029 SvNIOKp|||
2030 SvNIOK|||
2031 SvNOK_off|||
2032 SvNOK_only|||
2033 SvNOK_on|||
2034 SvNOKp|||
2035 SvNOK|||
2036 SvNVX|||
2037 SvNV_set|||
2038 SvNVx|||
2039 SvNV|||
2040 SvOK|||
2041 SvOOK_offset||5.011000|
2042 SvOOK|||
2043 SvPOK_off|||
2044 SvPOK_only_UTF8||5.006000|
2045 SvPOK_only|||
2046 SvPOK_on|||
2047 SvPOKp|||
2048 SvPOK|||
2049 SvPVX_const|5.009003||p
2050 SvPVX_mutable|5.009003||p
2051 SvPVX|||
2052 SvPV_const|5.009003||p
2053 SvPV_flags_const_nolen|5.009003||p
2054 SvPV_flags_const|5.009003||p
2055 SvPV_flags_mutable|5.009003||p
2056 SvPV_flags|5.007002||p
2057 SvPV_force_flags_mutable|5.009003||p
2058 SvPV_force_flags_nolen|5.009003||p
2059 SvPV_force_flags|5.007002||p
2060 SvPV_force_mutable|5.009003||p
2061 SvPV_force_nolen|5.009003||p
2062 SvPV_force_nomg_nolen|5.009003||p
2063 SvPV_force_nomg|5.007002||p
2064 SvPV_force|||p
2065 SvPV_mutable|5.009003||p
2066 SvPV_nolen_const|5.009003||p
2067 SvPV_nolen|5.006000||p
2068 SvPV_nomg_const_nolen|5.009003||p
2069 SvPV_nomg_const|5.009003||p
2070 SvPV_nomg|5.007002||p
2071 SvPV_renew|5.009003||p
2072 SvPV_set|||
2073 SvPVbyte_force||5.009002|
2074 SvPVbyte_nolen||5.006000|
2075 SvPVbytex_force||5.006000|
2076 SvPVbytex||5.006000|
2077 SvPVbyte|5.006000||p
2078 SvPVutf8_force||5.006000|
2079 SvPVutf8_nolen||5.006000|
2080 SvPVutf8x_force||5.006000|
2081 SvPVutf8x||5.006000|
2082 SvPVutf8||5.006000|
2083 SvPVx|||
2084 SvPV|||
2085 SvREFCNT_dec|||
2086 SvREFCNT_inc_NN|5.009004||p
2087 SvREFCNT_inc_simple_NN|5.009004||p
2088 SvREFCNT_inc_simple_void_NN|5.009004||p
2089 SvREFCNT_inc_simple_void|5.009004||p
2090 SvREFCNT_inc_simple|5.009004||p
2091 SvREFCNT_inc_void_NN|5.009004||p
2092 SvREFCNT_inc_void|5.009004||p
2093 SvREFCNT_inc|||p
2094 SvREFCNT|||
2095 SvROK_off|||
2096 SvROK_on|||
2097 SvROK|||
2098 SvRV_set|5.009003||p
2099 SvRV|||
2100 SvRXOK||5.009005|
2101 SvRX||5.009005|
2102 SvSETMAGIC|||
2103 SvSHARED_HASH|5.009003||p
2104 SvSHARE||5.007003|
2105 SvSTASH_set|5.009003||p
2106 SvSTASH|||
2107 SvSetMagicSV_nosteal||5.004000|
2108 SvSetMagicSV||5.004000|
2109 SvSetSV_nosteal||5.004000|
2110 SvSetSV|||
2111 SvTAINTED_off||5.004000|
2112 SvTAINTED_on||5.004000|
2113 SvTAINTED||5.004000|
2114 SvTAINT|||
2115 SvTRUE|||
2116 SvTYPE|||
2117 SvUNLOCK||5.007003|
2118 SvUOK|5.007001|5.006000|p
2119 SvUPGRADE|||
2120 SvUTF8_off||5.006000|
2121 SvUTF8_on||5.006000|
2122 SvUTF8||5.006000|
2123 SvUVXx|5.004000||p
2124 SvUVX|5.004000||p
2125 SvUV_nomg|5.009001||p
2126 SvUV_set|5.009003||p
2127 SvUVx|5.004000||p
2128 SvUV|5.004000||p
2129 SvVOK||5.008001|
2130 SvVSTRING_mg|5.009004||p
2131 THIS|||n
2132 UNDERBAR|5.009002||p
2133 UTF8_MAXBYTES|5.009002||p
2134 UVSIZE|5.006000||p
2135 UVTYPE|5.006000||p
2136 UVXf|5.007001||p
2137 UVof|5.006000||p
2138 UVuf|5.006000||p
2139 UVxf|5.006000||p
2140 WARN_ALL|5.006000||p
2141 WARN_AMBIGUOUS|5.006000||p
2142 WARN_ASSERTIONS|5.011000||p
2143 WARN_BAREWORD|5.006000||p
2144 WARN_CLOSED|5.006000||p
2145 WARN_CLOSURE|5.006000||p
2146 WARN_DEBUGGING|5.006000||p
2147 WARN_DEPRECATED|5.006000||p
2148 WARN_DIGIT|5.006000||p
2149 WARN_EXEC|5.006000||p
2150 WARN_EXITING|5.006000||p
2151 WARN_GLOB|5.006000||p
2152 WARN_INPLACE|5.006000||p
2153 WARN_INTERNAL|5.006000||p
2154 WARN_IO|5.006000||p
2155 WARN_LAYER|5.008000||p
2156 WARN_MALLOC|5.006000||p
2157 WARN_MISC|5.006000||p
2158 WARN_NEWLINE|5.006000||p
2159 WARN_NUMERIC|5.006000||p
2160 WARN_ONCE|5.006000||p
2161 WARN_OVERFLOW|5.006000||p
2162 WARN_PACK|5.006000||p
2163 WARN_PARENTHESIS|5.006000||p
2164 WARN_PIPE|5.006000||p
2165 WARN_PORTABLE|5.006000||p
2166 WARN_PRECEDENCE|5.006000||p
2167 WARN_PRINTF|5.006000||p
2168 WARN_PROTOTYPE|5.006000||p
2169 WARN_QW|5.006000||p
2170 WARN_RECURSION|5.006000||p
2171 WARN_REDEFINE|5.006000||p
2172 WARN_REGEXP|5.006000||p
2173 WARN_RESERVED|5.006000||p
2174 WARN_SEMICOLON|5.006000||p
2175 WARN_SEVERE|5.006000||p
2176 WARN_SIGNAL|5.006000||p
2177 WARN_SUBSTR|5.006000||p
2178 WARN_SYNTAX|5.006000||p
2179 WARN_TAINT|5.006000||p
2180 WARN_THREADS|5.008000||p
2181 WARN_UNINITIALIZED|5.006000||p
2182 WARN_UNOPENED|5.006000||p
2183 WARN_UNPACK|5.006000||p
2184 WARN_UNTIE|5.006000||p
2185 WARN_UTF8|5.006000||p
2186 WARN_VOID|5.006000||p
2187 XCPT_CATCH|5.009002||p
2188 XCPT_RETHROW|5.009002||p
2189 XCPT_TRY_END|5.009002||p
2190 XCPT_TRY_START|5.009002||p
2191 XPUSHi|||
2192 XPUSHmortal|5.009002||p
2193 XPUSHn|||
2194 XPUSHp|||
2195 XPUSHs|||
2196 XPUSHu|5.004000||p
2197 XSPROTO|5.010000||p
2198 XSRETURN_EMPTY|||
2199 XSRETURN_IV|||
2200 XSRETURN_NO|||
2201 XSRETURN_NV|||
2202 XSRETURN_PV|||
2203 XSRETURN_UNDEF|||
2204 XSRETURN_UV|5.008001||p
2205 XSRETURN_YES|||
2206 XSRETURN|||p
2207 XST_mIV|||
2208 XST_mNO|||
2209 XST_mNV|||
2210 XST_mPV|||
2211 XST_mUNDEF|||
2212 XST_mUV|5.008001||p
2213 XST_mYES|||
2214 XS_VERSION_BOOTCHECK|||
2215 XS_VERSION|||
2216 XSprePUSH|5.006000||p
2217 XS|||
2218 ZeroD|5.009002||p
2219 Zero|||
2220 _aMY_CXT|5.007003||p
2221 _pMY_CXT|5.007003||p
2222 aMY_CXT_|5.007003||p
2223 aMY_CXT|5.007003||p
2224 aTHXR_|5.011000||p
2225 aTHXR|5.011000||p
2226 aTHX_|5.006000||p
2227 aTHX|5.006000||p
2228 add_data|||n
2229 addmad|||
2230 allocmy|||
2231 amagic_call|||
2232 amagic_cmp_locale|||
2233 amagic_cmp|||
2234 amagic_i_ncmp|||
2235 amagic_ncmp|||
2236 any_dup|||
2237 ao|||
2238 append_elem|||
2239 append_list|||
2240 append_madprops|||
2241 apply_attrs_my|||
2242 apply_attrs_string||5.006001|
2243 apply_attrs|||
2244 apply|||
2245 atfork_lock||5.007003|n
2246 atfork_unlock||5.007003|n
2247 av_arylen_p||5.009003|
2248 av_clear|||
2249 av_create_and_push||5.009005|
2250 av_create_and_unshift_one||5.009005|
2251 av_delete||5.006000|
2252 av_exists||5.006000|
2253 av_extend|||
2254 av_fetch|||
2255 av_fill|||
2256 av_iter_p||5.011000|
2257 av_len|||
2258 av_make|||
2259 av_pop|||
2260 av_push|||
2261 av_reify|||
2262 av_shift|||
2263 av_store|||
2264 av_undef|||
2265 av_unshift|||
2266 ax|||n
2267 bad_type|||
2268 bind_match|||
2269 block_end|||
2270 block_gimme||5.004000|
2271 block_start|||
2272 boolSV|5.004000||p
2273 boot_core_PerlIO|||
2274 boot_core_UNIVERSAL|||
2275 boot_core_mro|||
2276 bytes_from_utf8||5.007001|
2277 bytes_to_uni|||n
2278 bytes_to_utf8||5.006001|
2279 call_argv|5.006000||p
2280 call_atexit||5.006000|
2281 call_list||5.004000|
2282 call_method|5.006000||p
2283 call_pv|5.006000||p
2284 call_sv|5.006000||p
2285 calloc||5.007002|n
2286 cando|||
2287 cast_i32||5.006000|
2288 cast_iv||5.006000|
2289 cast_ulong||5.006000|
2290 cast_uv||5.006000|
2291 check_type_and_open|||
2292 check_uni|||
2293 checkcomma|||
2294 checkposixcc|||
2295 ckWARN|5.006000||p
2296 ck_anoncode|||
2297 ck_bitop|||
2298 ck_concat|||
2299 ck_defined|||
2300 ck_delete|||
2301 ck_die|||
2302 ck_each|||
2303 ck_eof|||
2304 ck_eval|||
2305 ck_exec|||
2306 ck_exists|||
2307 ck_exit|||
2308 ck_ftst|||
2309 ck_fun|||
2310 ck_glob|||
2311 ck_grep|||
2312 ck_index|||
2313 ck_join|||
2314 ck_lfun|||
2315 ck_listiob|||
2316 ck_match|||
2317 ck_method|||
2318 ck_null|||
2319 ck_open|||
2320 ck_readline|||
2321 ck_repeat|||
2322 ck_require|||
2323 ck_return|||
2324 ck_rfun|||
2325 ck_rvconst|||
2326 ck_sassign|||
2327 ck_select|||
2328 ck_shift|||
2329 ck_sort|||
2330 ck_spair|||
2331 ck_split|||
2332 ck_subr|||
2333 ck_substr|||
2334 ck_svconst|||
2335 ck_trunc|||
2336 ck_unpack|||
2337 ckwarn_d||5.009003|
2338 ckwarn||5.009003|
2339 cl_and|||n
2340 cl_anything|||n
2341 cl_init_zero|||n
2342 cl_init|||n
2343 cl_is_anything|||n
2344 cl_or|||n
2345 clear_placeholders|||
2346 closest_cop|||
2347 convert|||
2348 cop_free|||
2349 cr_textfilter|||
2350 create_eval_scope|||
2351 croak_nocontext|||vn
2352 croak_xs_usage||5.011000|
2353 croak|||v
2354 csighandler||5.009003|n
2355 curmad|||
2356 custom_op_desc||5.007003|
2357 custom_op_name||5.007003|
2358 cv_ckproto_len|||
2359 cv_clone|||
2360 cv_const_sv||5.004000|
2361 cv_dump|||
2362 cv_undef|||
2363 cx_dump||5.005000|
2364 cx_dup|||
2365 cxinc|||
2366 dAXMARK|5.009003||p
2367 dAX|5.007002||p
2368 dITEMS|5.007002||p
2369 dMARK|||
2370 dMULTICALL||5.009003|
2371 dMY_CXT_SV|5.007003||p
2372 dMY_CXT|5.007003||p
2373 dNOOP|5.006000||p
2374 dORIGMARK|||
2375 dSP|||
2376 dTHR|5.004050||p
2377 dTHXR|5.011000||p
2378 dTHXa|5.006000||p
2379 dTHXoa|5.006000||p
2380 dTHX|5.006000||p
2381 dUNDERBAR|5.009002||p
2382 dVAR|5.009003||p
2383 dXCPT|5.009002||p
2384 dXSARGS|||
2385 dXSI32|||
2386 dXSTARG|5.006000||p
2387 deb_curcv|||
2388 deb_nocontext|||vn
2389 deb_stack_all|||
2390 deb_stack_n|||
2391 debop||5.005000|
2392 debprofdump||5.005000|
2393 debprof|||
2394 debstackptrs||5.007003|
2395 debstack||5.007003|
2396 debug_start_match|||
2397 deb||5.007003|v
2398 del_sv|||
2399 delete_eval_scope|||
2400 delimcpy||5.004000|
2401 deprecate_old|||
2402 deprecate|||
2403 despatch_signals||5.007001|
2404 destroy_matcher|||
2405 die_nocontext|||vn
2406 die_where|||
2407 die|||v
2408 dirp_dup|||
2409 div128|||
2410 djSP|||
2411 do_aexec5|||
2412 do_aexec|||
2413 do_aspawn|||
2414 do_binmode||5.004050|
2415 do_chomp|||
2416 do_chop|||
2417 do_close|||
2418 do_dump_pad|||
2419 do_eof|||
2420 do_exec3|||
2421 do_execfree|||
2422 do_exec|||
2423 do_gv_dump||5.006000|
2424 do_gvgv_dump||5.006000|
2425 do_hv_dump||5.006000|
2426 do_ipcctl|||
2427 do_ipcget|||
2428 do_join|||
2429 do_kv|||
2430 do_magic_dump||5.006000|
2431 do_msgrcv|||
2432 do_msgsnd|||
2433 do_oddball|||
2434 do_op_dump||5.006000|
2435 do_op_xmldump|||
2436 do_open9||5.006000|
2437 do_openn||5.007001|
2438 do_open||5.004000|
2439 do_pmop_dump||5.006000|
2440 do_pmop_xmldump|||
2441 do_print|||
2442 do_readline|||
2443 do_seek|||
2444 do_semop|||
2445 do_shmio|||
2446 do_smartmatch|||
2447 do_spawn_nowait|||
2448 do_spawn|||
2449 do_sprintf|||
2450 do_sv_dump||5.006000|
2451 do_sysseek|||
2452 do_tell|||
2453 do_trans_complex_utf8|||
2454 do_trans_complex|||
2455 do_trans_count_utf8|||
2456 do_trans_count|||
2457 do_trans_simple_utf8|||
2458 do_trans_simple|||
2459 do_trans|||
2460 do_vecget|||
2461 do_vecset|||
2462 do_vop|||
2463 docatch|||
2464 doeval|||
2465 dofile|||
2466 dofindlabel|||
2467 doform|||
2468 doing_taint||5.008001|n
2469 dooneliner|||
2470 doopen_pm|||
2471 doparseform|||
2472 dopoptoeval|||
2473 dopoptogiven|||
2474 dopoptolabel|||
2475 dopoptoloop|||
2476 dopoptosub_at|||
2477 dopoptowhen|||
2478 doref||5.009003|
2479 dounwind|||
2480 dowantarray|||
2481 dump_all||5.006000|
2482 dump_eval||5.006000|
2483 dump_exec_pos|||
2484 dump_fds|||
2485 dump_form||5.006000|
2486 dump_indent||5.006000|v
2487 dump_mstats|||
2488 dump_packsubs||5.006000|
2489 dump_sub||5.006000|
2490 dump_sv_child|||
2491 dump_trie_interim_list|||
2492 dump_trie_interim_table|||
2493 dump_trie|||
2494 dump_vindent||5.006000|
2495 dumpuntil|||
2496 dup_attrlist|||
2497 emulate_cop_io|||
2498 eval_pv|5.006000||p
2499 eval_sv|5.006000||p
2500 exec_failed|||
2501 expect_number|||
2502 fbm_compile||5.005000|
2503 fbm_instr||5.005000|
2504 feature_is_enabled|||
2505 fetch_cop_label||5.011000|
2506 filter_add|||
2507 filter_del|||
2508 filter_gets|||
2509 filter_read|||
2510 find_and_forget_pmops|||
2511 find_array_subscript|||
2512 find_beginning|||
2513 find_byclass|||
2514 find_hash_subscript|||
2515 find_in_my_stash|||
2516 find_runcv||5.008001|
2517 find_rundefsvoffset||5.009002|
2518 find_script|||
2519 find_uninit_var|||
2520 first_symbol|||n
2521 fold_constants|||
2522 forbid_setid|||
2523 force_ident|||
2524 force_list|||
2525 force_next|||
2526 force_version|||
2527 force_word|||
2528 forget_pmop|||
2529 form_nocontext|||vn
2530 form||5.004000|v
2531 fp_dup|||
2532 fprintf_nocontext|||vn
2533 free_global_struct|||
2534 free_tied_hv_pool|||
2535 free_tmps|||
2536 gen_constant_list|||
2537 get_arena|||
2538 get_aux_mg|||
2539 get_av|5.006000||p
2540 get_context||5.006000|n
2541 get_cvn_flags||5.009005|
2542 get_cv|5.006000||p
2543 get_db_sub|||
2544 get_debug_opts|||
2545 get_hash_seed|||
2546 get_hv|5.006000||p
2547 get_isa_hash|||
2548 get_mstats|||
2549 get_no_modify|||
2550 get_num|||
2551 get_op_descs||5.005000|
2552 get_op_names||5.005000|
2553 get_opargs|||
2554 get_ppaddr||5.006000|
2555 get_re_arg|||
2556 get_sv|5.006000||p
2557 get_vtbl||5.005030|
2558 getcwd_sv||5.007002|
2559 getenv_len|||
2560 glob_2number|||
2561 glob_assign_glob|||
2562 glob_assign_ref|||
2563 gp_dup|||
2564 gp_free|||
2565 gp_ref|||
2566 grok_bin|5.007003||p
2567 grok_hex|5.007003||p
2568 grok_number|5.007002||p
2569 grok_numeric_radix|5.007002||p
2570 grok_oct|5.007003||p
2571 group_end|||
2572 gv_AVadd|||
2573 gv_HVadd|||
2574 gv_IOadd|||
2575 gv_SVadd|||
2576 gv_autoload4||5.004000|
2577 gv_check|||
2578 gv_const_sv||5.009003|
2579 gv_dump||5.006000|
2580 gv_efullname3||5.004000|
2581 gv_efullname4||5.006001|
2582 gv_efullname|||
2583 gv_ename|||
2584 gv_fetchfile_flags||5.009005|
2585 gv_fetchfile|||
2586 gv_fetchmeth_autoload||5.007003|
2587 gv_fetchmethod_autoload||5.004000|
2588 gv_fetchmethod_flags||5.011000|
2589 gv_fetchmethod|||
2590 gv_fetchmeth|||
2591 gv_fetchpvn_flags|5.009002||p
2592 gv_fetchpvs|5.009004||p
2593 gv_fetchpv|||
2594 gv_fetchsv||5.009002|
2595 gv_fullname3||5.004000|
2596 gv_fullname4||5.006001|
2597 gv_fullname|||
2598 gv_get_super_pkg|||
2599 gv_handler||5.007001|
2600 gv_init_sv|||
2601 gv_init|||
2602 gv_name_set||5.009004|
2603 gv_stashpvn|5.004000||p
2604 gv_stashpvs|5.009003||p
2605 gv_stashpv|||
2606 gv_stashsv|||
2607 he_dup|||
2608 hek_dup|||
2609 hfreeentries|||
2610 hsplit|||
2611 hv_assert||5.011000|
2612 hv_auxinit|||n
2613 hv_backreferences_p|||
2614 hv_clear_placeholders||5.009001|
2615 hv_clear|||
2616 hv_common_key_len||5.010000|
2617 hv_common||5.010000|
2618 hv_copy_hints_hv|||
2619 hv_delayfree_ent||5.004000|
2620 hv_delete_common|||
2621 hv_delete_ent||5.004000|
2622 hv_delete|||
2623 hv_eiter_p||5.009003|
2624 hv_eiter_set||5.009003|
2625 hv_exists_ent||5.004000|
2626 hv_exists|||
2627 hv_fetch_ent||5.004000|
2628 hv_fetchs|5.009003||p
2629 hv_fetch|||
2630 hv_free_ent||5.004000|
2631 hv_iterinit|||
2632 hv_iterkeysv||5.004000|
2633 hv_iterkey|||
2634 hv_iternext_flags||5.008000|
2635 hv_iternextsv|||
2636 hv_iternext|||
2637 hv_iterval|||
2638 hv_kill_backrefs|||
2639 hv_ksplit||5.004000|
2640 hv_magic_check|||n
2641 hv_magic|||
2642 hv_name_set||5.009003|
2643 hv_notallowed|||
2644 hv_placeholders_get||5.009003|
2645 hv_placeholders_p||5.009003|
2646 hv_placeholders_set||5.009003|
2647 hv_riter_p||5.009003|
2648 hv_riter_set||5.009003|
2649 hv_scalar||5.009001|
2650 hv_store_ent||5.004000|
2651 hv_store_flags||5.008000|
2652 hv_stores|5.009004||p
2653 hv_store|||
2654 hv_undef|||
2655 ibcmp_locale||5.004000|
2656 ibcmp_utf8||5.007003|
2657 ibcmp|||
2658 incline|||
2659 incpush_if_exists|||
2660 incpush_use_sep|||
2661 incpush|||
2662 ingroup|||
2663 init_argv_symbols|||
2664 init_debugger|||
2665 init_global_struct|||
2666 init_i18nl10n||5.006000|
2667 init_i18nl14n||5.006000|
2668 init_ids|||
2669 init_interp|||
2670 init_main_stash|||
2671 init_perllib|||
2672 init_postdump_symbols|||
2673 init_predump_symbols|||
2674 init_stacks||5.005000|
2675 init_tm||5.007002|
2676 instr|||
2677 intro_my|||
2678 intuit_method|||
2679 intuit_more|||
2680 invert|||
2681 io_close|||
2682 isALNUMC|5.006000||p
2683 isALNUM|||
2684 isALPHA|||
2685 isASCII|5.006000||p
2686 isBLANK|5.006001||p
2687 isCNTRL|5.006000||p
2688 isDIGIT|||
2689 isGRAPH|5.006000||p
2690 isGV_with_GP|5.009004||p
2691 isLOWER|||
2692 isPRINT|5.004000||p
2693 isPSXSPC|5.006001||p
2694 isPUNCT|5.006000||p
2695 isSPACE|||
2696 isUPPER|||
2697 isXDIGIT|5.006000||p
2698 is_an_int|||
2699 is_gv_magical_sv|||
2700 is_handle_constructor|||n
2701 is_list_assignment|||
2702 is_lvalue_sub||5.007001|
2703 is_uni_alnum_lc||5.006000|
2704 is_uni_alnumc_lc||5.006000|
2705 is_uni_alnumc||5.006000|
2706 is_uni_alnum||5.006000|
2707 is_uni_alpha_lc||5.006000|
2708 is_uni_alpha||5.006000|
2709 is_uni_ascii_lc||5.006000|
2710 is_uni_ascii||5.006000|
2711 is_uni_cntrl_lc||5.006000|
2712 is_uni_cntrl||5.006000|
2713 is_uni_digit_lc||5.006000|
2714 is_uni_digit||5.006000|
2715 is_uni_graph_lc||5.006000|
2716 is_uni_graph||5.006000|
2717 is_uni_idfirst_lc||5.006000|
2718 is_uni_idfirst||5.006000|
2719 is_uni_lower_lc||5.006000|
2720 is_uni_lower||5.006000|
2721 is_uni_print_lc||5.006000|
2722 is_uni_print||5.006000|
2723 is_uni_punct_lc||5.006000|
2724 is_uni_punct||5.006000|
2725 is_uni_space_lc||5.006000|
2726 is_uni_space||5.006000|
2727 is_uni_upper_lc||5.006000|
2728 is_uni_upper||5.006000|
2729 is_uni_xdigit_lc||5.006000|
2730 is_uni_xdigit||5.006000|
2731 is_utf8_alnumc||5.006000|
2732 is_utf8_alnum||5.006000|
2733 is_utf8_alpha||5.006000|
2734 is_utf8_ascii||5.006000|
2735 is_utf8_char_slow|||n
2736 is_utf8_char||5.006000|
2737 is_utf8_cntrl||5.006000|
2738 is_utf8_common|||
2739 is_utf8_digit||5.006000|
2740 is_utf8_graph||5.006000|
2741 is_utf8_idcont||5.008000|
2742 is_utf8_idfirst||5.006000|
2743 is_utf8_lower||5.006000|
2744 is_utf8_mark||5.006000|
2745 is_utf8_print||5.006000|
2746 is_utf8_punct||5.006000|
2747 is_utf8_space||5.006000|
2748 is_utf8_string_loclen||5.009003|
2749 is_utf8_string_loc||5.008001|
2750 is_utf8_string||5.006001|
2751 is_utf8_upper||5.006000|
2752 is_utf8_xdigit||5.006000|
2753 isa_lookup|||
2754 items|||n
2755 ix|||n
2756 jmaybe|||
2757 join_exact|||
2758 keyword|||
2759 leave_scope|||
2760 lex_end|||
2761 lex_start|||
2762 linklist|||
2763 listkids|||
2764 list|||
2765 load_module_nocontext|||vn
2766 load_module|5.006000||pv
2767 localize|||
2768 looks_like_bool|||
2769 looks_like_number|||
2770 lop|||
2771 mPUSHi|5.009002||p
2772 mPUSHn|5.009002||p
2773 mPUSHp|5.009002||p
2774 mPUSHs|5.011000||p
2775 mPUSHu|5.009002||p
2776 mXPUSHi|5.009002||p
2777 mXPUSHn|5.009002||p
2778 mXPUSHp|5.009002||p
2779 mXPUSHs|5.011000||p
2780 mXPUSHu|5.009002||p
2781 mad_free|||
2782 madlex|||
2783 madparse|||
2784 magic_clear_all_env|||
2785 magic_clearenv|||
2786 magic_clearhint|||
2787 magic_clearisa|||
2788 magic_clearpack|||
2789 magic_clearsig|||
2790 magic_dump||5.006000|
2791 magic_existspack|||
2792 magic_freearylen_p|||
2793 magic_freeovrld|||
2794 magic_getarylen|||
2795 magic_getdefelem|||
2796 magic_getnkeys|||
2797 magic_getpack|||
2798 magic_getpos|||
2799 magic_getsig|||
2800 magic_getsubstr|||
2801 magic_gettaint|||
2802 magic_getuvar|||
2803 magic_getvec|||
2804 magic_get|||
2805 magic_killbackrefs|||
2806 magic_len|||
2807 magic_methcall|||
2808 magic_methpack|||
2809 magic_nextpack|||
2810 magic_regdata_cnt|||
2811 magic_regdatum_get|||
2812 magic_regdatum_set|||
2813 magic_scalarpack|||
2814 magic_set_all_env|||
2815 magic_setamagic|||
2816 magic_setarylen|||
2817 magic_setcollxfrm|||
2818 magic_setdbline|||
2819 magic_setdefelem|||
2820 magic_setenv|||
2821 magic_sethint|||
2822 magic_setisa|||
2823 magic_setmglob|||
2824 magic_setnkeys|||
2825 magic_setpack|||
2826 magic_setpos|||
2827 magic_setregexp|||
2828 magic_setsig|||
2829 magic_setsubstr|||
2830 magic_settaint|||
2831 magic_setutf8|||
2832 magic_setuvar|||
2833 magic_setvec|||
2834 magic_set|||
2835 magic_sizepack|||
2836 magic_wipepack|||
2837 make_matcher|||
2838 make_trie_failtable|||
2839 make_trie|||
2840 malloc_good_size|||n
2841 malloced_size|||n
2842 malloc||5.007002|n
2843 markstack_grow|||
2844 matcher_matches_sv|||
2845 measure_struct|||
2846 memEQ|5.004000||p
2847 memNE|5.004000||p
2848 mem_collxfrm|||
2849 mem_log_common|||n
2850 mess_alloc|||
2851 mess_nocontext|||vn
2852 mess||5.006000|v
2853 method_common|||
2854 mfree||5.007002|n
2855 mg_clear|||
2856 mg_copy|||
2857 mg_dup|||
2858 mg_find|||
2859 mg_free|||
2860 mg_get|||
2861 mg_length||5.005000|
2862 mg_localize|||
2863 mg_magical|||
2864 mg_set|||
2865 mg_size||5.005000|
2866 mini_mktime||5.007002|
2867 missingterm|||
2868 mode_from_discipline|||
2869 modkids|||
2870 mod|||
2871 more_bodies|||
2872 more_sv|||
2873 moreswitches|||
2874 mro_get_from_name||5.011000|
2875 mro_get_linear_isa_dfs|||
2876 mro_get_linear_isa||5.009005|
2877 mro_get_private_data||5.011000|
2878 mro_isa_changed_in|||
2879 mro_meta_dup|||
2880 mro_meta_init|||
2881 mro_method_changed_in||5.009005|
2882 mro_register||5.011000|
2883 mro_set_mro||5.011000|
2884 mro_set_private_data||5.011000|
2885 mul128|||
2886 mulexp10|||n
2887 my_atof2||5.007002|
2888 my_atof||5.006000|
2889 my_attrs|||
2890 my_bcopy|||n
2891 my_betoh16|||n
2892 my_betoh32|||n
2893 my_betoh64|||n
2894 my_betohi|||n
2895 my_betohl|||n
2896 my_betohs|||n
2897 my_bzero|||n
2898 my_chsize|||
2899 my_clearenv|||
2900 my_cxt_index|||
2901 my_cxt_init|||
2902 my_dirfd||5.009005|
2903 my_exit_jump|||
2904 my_exit|||
2905 my_failure_exit||5.004000|
2906 my_fflush_all||5.006000|
2907 my_fork||5.007003|n
2908 my_htobe16|||n
2909 my_htobe32|||n
2910 my_htobe64|||n
2911 my_htobei|||n
2912 my_htobel|||n
2913 my_htobes|||n
2914 my_htole16|||n
2915 my_htole32|||n
2916 my_htole64|||n
2917 my_htolei|||n
2918 my_htolel|||n
2919 my_htoles|||n
2920 my_htonl|||
2921 my_kid|||
2922 my_letoh16|||n
2923 my_letoh32|||n
2924 my_letoh64|||n
2925 my_letohi|||n
2926 my_letohl|||n
2927 my_letohs|||n
2928 my_lstat|||
2929 my_memcmp||5.004000|n
2930 my_memset|||n
2931 my_ntohl|||
2932 my_pclose||5.004000|
2933 my_popen_list||5.007001|
2934 my_popen||5.004000|
2935 my_setenv|||
2936 my_snprintf|5.009004||pvn
2937 my_socketpair||5.007003|n
2938 my_sprintf|5.009003||pvn
2939 my_stat|||
2940 my_strftime||5.007002|
2941 my_strlcat|5.009004||pn
2942 my_strlcpy|5.009004||pn
2943 my_swabn|||n
2944 my_swap|||
2945 my_unexec|||
2946 my_vsnprintf||5.009004|n
2947 need_utf8|||n
2948 newANONATTRSUB||5.006000|
2949 newANONHASH|||
2950 newANONLIST|||
2951 newANONSUB|||
2952 newASSIGNOP|||
2953 newATTRSUB||5.006000|
2954 newAVREF|||
2955 newAV|||
2956 newBINOP|||
2957 newCONDOP|||
2958 newCONSTSUB|5.004050||p
2959 newCVREF|||
2960 newDEFSVOP|||
2961 newFORM|||
2962 newFOROP|||
2963 newGIVENOP||5.009003|
2964 newGIVWHENOP|||
2965 newGP|||
2966 newGVOP|||
2967 newGVREF|||
2968 newGVgen|||
2969 newHVREF|||
2970 newHVhv||5.005000|
2971 newHV|||
2972 newIO|||
2973 newLISTOP|||
2974 newLOGOP|||
2975 newLOOPEX|||
2976 newLOOPOP|||
2977 newMADPROP|||
2978 newMADsv|||
2979 newMYSUB|||
2980 newNULLLIST|||
2981 newOP|||
2982 newPADOP|||
2983 newPMOP|||
2984 newPROG|||
2985 newPVOP|||
2986 newRANGE|||
2987 newRV_inc|5.004000||p
2988 newRV_noinc|5.004000||p
2989 newRV|||
2990 newSLICEOP|||
2991 newSTATEOP|||
2992 newSUB|||
2993 newSVOP|||
2994 newSVREF|||
2995 newSV_type|5.009005||p
2996 newSVhek||5.009003|
2997 newSViv|||
2998 newSVnv|||
2999 newSVpvf_nocontext|||vn
3000 newSVpvf||5.004000|v
3001 newSVpvn_flags|5.011000||p
3002 newSVpvn_share|5.007001||p
3003 newSVpvn_utf8|5.011000||p
3004 newSVpvn|5.004050||p
3005 newSVpvs_flags|5.011000||p
3006 newSVpvs_share||5.009003|
3007 newSVpvs|5.009003||p
3008 newSVpv|||
3009 newSVrv|||
3010 newSVsv|||
3011 newSVuv|5.006000||p
3012 newSV|||
3013 newTOKEN|||
3014 newUNOP|||
3015 newWHENOP||5.009003|
3016 newWHILEOP||5.009003|
3017 newXS_flags||5.009004|
3018 newXSproto||5.006000|
3019 newXS||5.006000|
3020 new_collate||5.006000|
3021 new_constant|||
3022 new_ctype||5.006000|
3023 new_he|||
3024 new_logop|||
3025 new_numeric||5.006000|
3026 new_stackinfo||5.005000|
3027 new_version||5.009000|
3028 new_warnings_bitfield|||
3029 next_symbol|||
3030 nextargv|||
3031 nextchar|||
3032 ninstr|||
3033 no_bareword_allowed|||
3034 no_fh_allowed|||
3035 no_op|||
3036 not_a_number|||
3037 nothreadhook||5.008000|
3038 nuke_stacks|||
3039 num_overflow|||n
3040 offer_nice_chunk|||
3041 oopsAV|||
3042 oopsHV|||
3043 op_clear|||
3044 op_const_sv|||
3045 op_dump||5.006000|
3046 op_free|||
3047 op_getmad_weak|||
3048 op_getmad|||
3049 op_null||5.007002|
3050 op_refcnt_dec|||
3051 op_refcnt_inc|||
3052 op_refcnt_lock||5.009002|
3053 op_refcnt_unlock||5.009002|
3054 op_xmldump|||
3055 open_script|||
3056 pMY_CXT_|5.007003||p
3057 pMY_CXT|5.007003||p
3058 pTHX_|5.006000||p
3059 pTHX|5.006000||p
3060 packWARN|5.007003||p
3061 pack_cat||5.007003|
3062 pack_rec|||
3063 package|||
3064 packlist||5.008001|
3065 pad_add_anon|||
3066 pad_add_name|||
3067 pad_alloc|||
3068 pad_block_start|||
3069 pad_check_dup|||
3070 pad_compname_type|||
3071 pad_findlex|||
3072 pad_findmy|||
3073 pad_fixup_inner_anons|||
3074 pad_free|||
3075 pad_leavemy|||
3076 pad_new|||
3077 pad_peg|||n
3078 pad_push|||
3079 pad_reset|||
3080 pad_setsv|||
3081 pad_sv||5.011000|
3082 pad_swipe|||
3083 pad_tidy|||
3084 pad_undef|||
3085 parse_body|||
3086 parse_unicode_opts|||
3087 parser_dup|||
3088 parser_free|||
3089 path_is_absolute|||n
3090 peep|||
3091 pending_Slabs_to_ro|||
3092 perl_alloc_using|||n
3093 perl_alloc|||n
3094 perl_clone_using|||n
3095 perl_clone|||n
3096 perl_construct|||n
3097 perl_destruct||5.007003|n
3098 perl_free|||n
3099 perl_parse||5.006000|n
3100 perl_run|||n
3101 pidgone|||
3102 pm_description|||
3103 pmflag|||
3104 pmop_dump||5.006000|
3105 pmop_xmldump|||
3106 pmruntime|||
3107 pmtrans|||
3108 pop_scope|||
3109 pregcomp||5.009005|
3110 pregexec|||
3111 pregfree2||5.011000|
3112 pregfree|||
3113 prepend_elem|||
3114 prepend_madprops|||
3115 printbuf|||
3116 printf_nocontext|||vn
3117 process_special_blocks|||
3118 ptr_table_clear||5.009005|
3119 ptr_table_fetch||5.009005|
3120 ptr_table_find|||n
3121 ptr_table_free||5.009005|
3122 ptr_table_new||5.009005|
3123 ptr_table_split||5.009005|
3124 ptr_table_store||5.009005|
3125 push_scope|||
3126 put_byte|||
3127 pv_display|5.006000||p
3128 pv_escape|5.009004||p
3129 pv_pretty|5.009004||p
3130 pv_uni_display||5.007003|
3131 qerror|||
3132 qsortsvu|||
3133 re_compile||5.009005|
3134 re_croak2|||
3135 re_dup_guts|||
3136 re_intuit_start||5.009005|
3137 re_intuit_string||5.006000|
3138 readpipe_override|||
3139 realloc||5.007002|n
3140 reentrant_free|||
3141 reentrant_init|||
3142 reentrant_retry|||vn
3143 reentrant_size|||
3144 ref_array_or_hash|||
3145 refcounted_he_chain_2hv|||
3146 refcounted_he_fetch|||
3147 refcounted_he_free|||
3148 refcounted_he_new_common|||
3149 refcounted_he_new|||
3150 refcounted_he_value|||
3151 refkids|||
3152 refto|||
3153 ref||5.011000|
3154 reg_check_named_buff_matched|||
3155 reg_named_buff_all||5.009005|
3156 reg_named_buff_exists||5.009005|
3157 reg_named_buff_fetch||5.009005|
3158 reg_named_buff_firstkey||5.009005|
3159 reg_named_buff_iter|||
3160 reg_named_buff_nextkey||5.009005|
3161 reg_named_buff_scalar||5.009005|
3162 reg_named_buff|||
3163 reg_namedseq|||
3164 reg_node|||
3165 reg_numbered_buff_fetch|||
3166 reg_numbered_buff_length|||
3167 reg_numbered_buff_store|||
3168 reg_qr_package|||
3169 reg_recode|||
3170 reg_scan_name|||
3171 reg_skipcomment|||
3172 reg_temp_copy|||
3173 reganode|||
3174 regatom|||
3175 regbranch|||
3176 regclass_swash||5.009004|
3177 regclass|||
3178 regcppop|||
3179 regcppush|||
3180 regcurly|||n
3181 regdump_extflags|||
3182 regdump||5.005000|
3183 regdupe_internal|||
3184 regexec_flags||5.005000|
3185 regfree_internal||5.009005|
3186 reghop3|||n
3187 reghop4|||n
3188 reghopmaybe3|||n
3189 reginclass|||
3190 reginitcolors||5.006000|
3191 reginsert|||
3192 regmatch|||
3193 regnext||5.005000|
3194 regpiece|||
3195 regpposixcc|||
3196 regprop|||
3197 regrepeat|||
3198 regtail_study|||
3199 regtail|||
3200 regtry|||
3201 reguni|||
3202 regwhite|||n
3203 reg|||
3204 repeatcpy|||
3205 report_evil_fh|||
3206 report_uninit|||
3207 require_pv||5.006000|
3208 require_tie_mod|||
3209 restore_magic|||
3210 rninstr|||
3211 rsignal_restore|||
3212 rsignal_save|||
3213 rsignal_state||5.004000|
3214 rsignal||5.004000|
3215 run_body|||
3216 run_user_filter|||
3217 runops_debug||5.005000|
3218 runops_standard||5.005000|
3219 rvpv_dup|||
3220 rxres_free|||
3221 rxres_restore|||
3222 rxres_save|||
3223 safesyscalloc||5.006000|n
3224 safesysfree||5.006000|n
3225 safesysmalloc||5.006000|n
3226 safesysrealloc||5.006000|n
3227 same_dirent|||
3228 save_I16||5.004000|
3229 save_I32|||
3230 save_I8||5.006000|
3231 save_adelete||5.011000|
3232 save_aelem||5.004050|
3233 save_alloc||5.006000|
3234 save_aptr|||
3235 save_ary|||
3236 save_bool||5.008001|
3237 save_clearsv|||
3238 save_delete|||
3239 save_destructor_x||5.006000|
3240 save_destructor||5.006000|
3241 save_freeop|||
3242 save_freepv|||
3243 save_freesv|||
3244 save_generic_pvref||5.006001|
3245 save_generic_svref||5.005030|
3246 save_gp||5.004000|
3247 save_hash|||
3248 save_hek_flags|||n
3249 save_helem_flags||5.011000|
3250 save_helem||5.004050|
3251 save_hints|||
3252 save_hptr|||
3253 save_int|||
3254 save_item|||
3255 save_iv||5.005000|
3256 save_lines|||
3257 save_list|||
3258 save_long|||
3259 save_magic|||
3260 save_mortalizesv||5.007001|
3261 save_nogv|||
3262 save_op|||
3263 save_padsv_and_mortalize||5.011000|
3264 save_pptr|||
3265 save_pushi32ptr|||
3266 save_pushptri32ptr|||
3267 save_pushptrptr|||
3268 save_pushptr||5.011000|
3269 save_re_context||5.006000|
3270 save_scalar_at|||
3271 save_scalar|||
3272 save_set_svflags||5.009000|
3273 save_shared_pvref||5.007003|
3274 save_sptr|||
3275 save_svref|||
3276 save_vptr||5.006000|
3277 savepvn|||
3278 savepvs||5.009003|
3279 savepv|||
3280 savesharedpvn||5.009005|
3281 savesharedpv||5.007003|
3282 savestack_grow_cnt||5.008001|
3283 savestack_grow|||
3284 savesvpv||5.009002|
3285 sawparens|||
3286 scalar_mod_type|||n
3287 scalarboolean|||
3288 scalarkids|||
3289 scalarseq|||
3290 scalarvoid|||
3291 scalar|||
3292 scan_bin||5.006000|
3293 scan_commit|||
3294 scan_const|||
3295 scan_formline|||
3296 scan_heredoc|||
3297 scan_hex|||
3298 scan_ident|||
3299 scan_inputsymbol|||
3300 scan_num||5.007001|
3301 scan_oct|||
3302 scan_pat|||
3303 scan_str|||
3304 scan_subst|||
3305 scan_trans|||
3306 scan_version||5.009001|
3307 scan_vstring||5.009005|
3308 scan_word|||
3309 scope|||
3310 screaminstr||5.005000|
3311 search_const|||
3312 seed||5.008001|
3313 sequence_num|||
3314 sequence_tail|||
3315 sequence|||
3316 set_context||5.006000|n
3317 set_numeric_local||5.006000|
3318 set_numeric_radix||5.006000|
3319 set_numeric_standard||5.006000|
3320 setdefout|||
3321 share_hek_flags|||
3322 share_hek||5.004000|
3323 si_dup|||
3324 sighandler|||n
3325 simplify_sort|||
3326 skipspace0|||
3327 skipspace1|||
3328 skipspace2|||
3329 skipspace|||
3330 softref2xv|||
3331 sortcv_stacked|||
3332 sortcv_xsub|||
3333 sortcv|||
3334 sortsv_flags||5.009003|
3335 sortsv||5.007003|
3336 space_join_names_mortal|||
3337 ss_dup|||
3338 stack_grow|||
3339 start_force|||
3340 start_glob|||
3341 start_subparse||5.004000|
3342 stashpv_hvname_match||5.011000|
3343 stdize_locale|||
3344 store_cop_label|||
3345 strEQ|||
3346 strGE|||
3347 strGT|||
3348 strLE|||
3349 strLT|||
3350 strNE|||
3351 str_to_version||5.006000|
3352 strip_return|||
3353 strnEQ|||
3354 strnNE|||
3355 study_chunk|||
3356 sub_crush_depth|||
3357 sublex_done|||
3358 sublex_push|||
3359 sublex_start|||
3360 sv_2bool|||
3361 sv_2cv|||
3362 sv_2io|||
3363 sv_2iuv_common|||
3364 sv_2iuv_non_preserve|||
3365 sv_2iv_flags||5.009001|
3366 sv_2iv|||
3367 sv_2mortal|||
3368 sv_2num|||
3369 sv_2nv|||
3370 sv_2pv_flags|5.007002||p
3371 sv_2pv_nolen|5.006000||p
3372 sv_2pvbyte_nolen|5.006000||p
3373 sv_2pvbyte|5.006000||p
3374 sv_2pvutf8_nolen||5.006000|
3375 sv_2pvutf8||5.006000|
3376 sv_2pv|||
3377 sv_2uv_flags||5.009001|
3378 sv_2uv|5.004000||p
3379 sv_add_arena|||
3380 sv_add_backref|||
3381 sv_backoff|||
3382 sv_bless|||
3383 sv_cat_decode||5.008001|
3384 sv_catpv_mg|5.004050||p
3385 sv_catpvf_mg_nocontext|||pvn
3386 sv_catpvf_mg|5.006000|5.004000|pv
3387 sv_catpvf_nocontext|||vn
3388 sv_catpvf||5.004000|v
3389 sv_catpvn_flags||5.007002|
3390 sv_catpvn_mg|5.004050||p
3391 sv_catpvn_nomg|5.007002||p
3392 sv_catpvn|||
3393 sv_catpvs|5.009003||p
3394 sv_catpv|||
3395 sv_catsv_flags||5.007002|
3396 sv_catsv_mg|5.004050||p
3397 sv_catsv_nomg|5.007002||p
3398 sv_catsv|||
3399 sv_catxmlpvn|||
3400 sv_catxmlsv|||
3401 sv_chop|||
3402 sv_clean_all|||
3403 sv_clean_objs|||
3404 sv_clear|||
3405 sv_cmp_locale||5.004000|
3406 sv_cmp|||
3407 sv_collxfrm|||
3408 sv_compile_2op||5.008001|
3409 sv_copypv||5.007003|
3410 sv_dec|||
3411 sv_del_backref|||
3412 sv_derived_from||5.004000|
3413 sv_destroyable||5.010000|
3414 sv_does||5.009004|
3415 sv_dump|||
3416 sv_dup_inc_multiple|||
3417 sv_dup|||
3418 sv_eq|||
3419 sv_exp_grow|||
3420 sv_force_normal_flags||5.007001|
3421 sv_force_normal||5.006000|
3422 sv_free2|||
3423 sv_free_arenas|||
3424 sv_free|||
3425 sv_gets||5.004000|
3426 sv_grow|||
3427 sv_i_ncmp|||
3428 sv_inc|||
3429 sv_insert_flags||5.011000|
3430 sv_insert|||
3431 sv_isa|||
3432 sv_isobject|||
3433 sv_iv||5.005000|
3434 sv_kill_backrefs|||
3435 sv_len_utf8||5.006000|
3436 sv_len|||
3437 sv_magic_portable|5.011000|5.004000|p
3438 sv_magicext||5.007003|
3439 sv_magic|||
3440 sv_mortalcopy|||
3441 sv_ncmp|||
3442 sv_newmortal|||
3443 sv_newref|||
3444 sv_nolocking||5.007003|
3445 sv_nosharing||5.007003|
3446 sv_nounlocking|||
3447 sv_nv||5.005000|
3448 sv_peek||5.005000|
3449 sv_pos_b2u_midway|||
3450 sv_pos_b2u||5.006000|
3451 sv_pos_u2b_cached|||
3452 sv_pos_u2b_forwards|||n
3453 sv_pos_u2b_midway|||n
3454 sv_pos_u2b||5.006000|
3455 sv_pvbyten_force||5.006000|
3456 sv_pvbyten||5.006000|
3457 sv_pvbyte||5.006000|
3458 sv_pvn_force_flags|5.007002||p
3459 sv_pvn_force|||
3460 sv_pvn_nomg|5.007003|5.005000|p
3461 sv_pvn||5.005000|
3462 sv_pvutf8n_force||5.006000|
3463 sv_pvutf8n||5.006000|
3464 sv_pvutf8||5.006000|
3465 sv_pv||5.006000|
3466 sv_recode_to_utf8||5.007003|
3467 sv_reftype|||
3468 sv_release_COW|||
3469 sv_replace|||
3470 sv_report_used|||
3471 sv_reset|||
3472 sv_rvweaken||5.006000|
3473 sv_setiv_mg|5.004050||p
3474 sv_setiv|||
3475 sv_setnv_mg|5.006000||p
3476 sv_setnv|||
3477 sv_setpv_mg|5.004050||p
3478 sv_setpvf_mg_nocontext|||pvn
3479 sv_setpvf_mg|5.006000|5.004000|pv
3480 sv_setpvf_nocontext|||vn
3481 sv_setpvf||5.004000|v
3482 sv_setpviv_mg||5.008001|
3483 sv_setpviv||5.008001|
3484 sv_setpvn_mg|5.004050||p
3485 sv_setpvn|||
3486 sv_setpvs|5.009004||p
3487 sv_setpv|||
3488 sv_setref_iv|||
3489 sv_setref_nv|||
3490 sv_setref_pvn|||
3491 sv_setref_pv|||
3492 sv_setref_uv||5.007001|
3493 sv_setsv_cow|||
3494 sv_setsv_flags||5.007002|
3495 sv_setsv_mg|5.004050||p
3496 sv_setsv_nomg|5.007002||p
3497 sv_setsv|||
3498 sv_setuv_mg|5.004050||p
3499 sv_setuv|5.004000||p
3500 sv_tainted||5.004000|
3501 sv_taint||5.004000|
3502 sv_true||5.005000|
3503 sv_unglob|||
3504 sv_uni_display||5.007003|
3505 sv_unmagic|||
3506 sv_unref_flags||5.007001|
3507 sv_unref|||
3508 sv_untaint||5.004000|
3509 sv_upgrade|||
3510 sv_usepvn_flags||5.009004|
3511 sv_usepvn_mg|5.004050||p
3512 sv_usepvn|||
3513 sv_utf8_decode||5.006000|
3514 sv_utf8_downgrade||5.006000|
3515 sv_utf8_encode||5.006000|
3516 sv_utf8_upgrade_flags_grow||5.011000|
3517 sv_utf8_upgrade_flags||5.007002|
3518 sv_utf8_upgrade_nomg||5.007002|
3519 sv_utf8_upgrade||5.007001|
3520 sv_uv|5.005000||p
3521 sv_vcatpvf_mg|5.006000|5.004000|p
3522 sv_vcatpvfn||5.004000|
3523 sv_vcatpvf|5.006000|5.004000|p
3524 sv_vsetpvf_mg|5.006000|5.004000|p
3525 sv_vsetpvfn||5.004000|
3526 sv_vsetpvf|5.006000|5.004000|p
3527 sv_xmlpeek|||
3528 svtype|||
3529 swallow_bom|||
3530 swap_match_buff|||
3531 swash_fetch||5.007002|
3532 swash_get|||
3533 swash_init||5.006000|
3534 sys_init3||5.010000|n
3535 sys_init||5.010000|n
3536 sys_intern_clear|||
3537 sys_intern_dup|||
3538 sys_intern_init|||
3539 sys_term||5.010000|n
3540 taint_env|||
3541 taint_proper|||
3542 tmps_grow||5.006000|
3543 toLOWER|||
3544 toUPPER|||
3545 to_byte_substr|||
3546 to_uni_fold||5.007003|
3547 to_uni_lower_lc||5.006000|
3548 to_uni_lower||5.007003|
3549 to_uni_title_lc||5.006000|
3550 to_uni_title||5.007003|
3551 to_uni_upper_lc||5.006000|
3552 to_uni_upper||5.007003|
3553 to_utf8_case||5.007003|
3554 to_utf8_fold||5.007003|
3555 to_utf8_lower||5.007003|
3556 to_utf8_substr|||
3557 to_utf8_title||5.007003|
3558 to_utf8_upper||5.007003|
3559 token_free|||
3560 token_getmad|||
3561 tokenize_use|||
3562 tokeq|||
3563 tokereport|||
3564 too_few_arguments|||
3565 too_many_arguments|||
3566 uiv_2buf|||n
3567 unlnk|||
3568 unpack_rec|||
3569 unpack_str||5.007003|
3570 unpackstring||5.008001|
3571 unshare_hek_or_pvn|||
3572 unshare_hek|||
3573 unsharepvn||5.004000|
3574 unwind_handler_stack|||
3575 update_debugger_info|||
3576 upg_version||5.009005|
3577 usage|||
3578 utf16_to_utf8_reversed||5.006001|
3579 utf16_to_utf8||5.006001|
3580 utf8_distance||5.006000|
3581 utf8_hop||5.006000|
3582 utf8_length||5.007001|
3583 utf8_mg_pos_cache_update|||
3584 utf8_to_bytes||5.006001|
3585 utf8_to_uvchr||5.007001|
3586 utf8_to_uvuni||5.007001|
3587 utf8n_to_uvchr|||
3588 utf8n_to_uvuni||5.007001|
3589 utilize|||
3590 uvchr_to_utf8_flags||5.007003|
3591 uvchr_to_utf8|||
3592 uvuni_to_utf8_flags||5.007003|
3593 uvuni_to_utf8||5.007001|
3594 validate_suid|||
3595 varname|||
3596 vcmp||5.009000|
3597 vcroak||5.006000|
3598 vdeb||5.007003|
3599 vdie_common|||
3600 vdie_croak_common|||
3601 vdie|||
3602 vform||5.006000|
3603 visit|||
3604 vivify_defelem|||
3605 vivify_ref|||
3606 vload_module|5.006000||p
3607 vmess||5.006000|
3608 vnewSVpvf|5.006000|5.004000|p
3609 vnormal||5.009002|
3610 vnumify||5.009000|
3611 vstringify||5.009000|
3612 vverify||5.009003|
3613 vwarner||5.006000|
3614 vwarn||5.006000|
3615 wait4pid|||
3616 warn_nocontext|||vn
3617 warner_nocontext|||vn
3618 warner|5.006000|5.004000|pv
3619 warn|||v
3620 watch|||
3621 whichsig|||
3622 write_no_mem|||
3623 write_to_stderr|||
3624 xmldump_all|||
3625 xmldump_attr|||
3626 xmldump_eval|||
3627 xmldump_form|||
3628 xmldump_indent|||v
3629 xmldump_packsubs|||
3630 xmldump_sub|||
3631 xmldump_vindent|||
3632 yyerror|||
3633 yylex|||
3634 yyparse|||
3635 yywarn|||
3636 );
3637
3638 if (exists $opt{'list-unsupported'}) {
3639   my $f;
3640   for $f (sort { lc $a cmp lc $b } keys %API) {
3641     next unless $API{$f}{todo};
3642     print "$f ", '.'x(40-length($f)), " ", format_version($API{$f}{todo}), "\n";
3643   }
3644   exit 0;
3645 }
3646
3647 # Scan for possible replacement candidates
3648
3649 my(%replace, %need, %hints, %warnings, %depends);
3650 my $replace = 0;
3651 my($hint, $define, $function);
3652
3653 sub find_api
3654 {
3655   my $code = shift;
3656   $code =~ s{
3657     / (?: \*[^*]*\*+(?:[^$ccs][^*]*\*+)* / | /[^\r\n]*)
3658   | "[^"\\]*(?:\\.[^"\\]*)*"
3659   | '[^'\\]*(?:\\.[^'\\]*)*' }{}egsx;
3660   grep { exists $API{$_} } $code =~ /(\w+)/mg;
3661 }
3662
3663 while (<DATA>) {
3664   if ($hint) {
3665     my $h = $hint->[0] eq 'Hint' ? \%hints : \%warnings;
3666     if (m{^\s*\*\s(.*?)\s*$}) {
3667       for (@{$hint->[1]}) {
3668         $h->{$_} ||= '';  # suppress warning with older perls
3669         $h->{$_} .= "$1\n";
3670       }
3671     }
3672     else { undef $hint }
3673   }
3674
3675   $hint = [$1, [split /,?\s+/, $2]]
3676       if m{^\s*$rccs\s+(Hint|Warning):\s+(\w+(?:,?\s+\w+)*)\s*$};
3677
3678   if ($define) {
3679     if ($define->[1] =~ /\\$/) {
3680       $define->[1] .= $_;
3681     }
3682     else {
3683       if (exists $API{$define->[0]} && $define->[1] !~ /^DPPP_\(/) {
3684         my @n = find_api($define->[1]);
3685         push @{$depends{$define->[0]}}, @n if @n
3686       }
3687       undef $define;
3688     }
3689   }
3690
3691   $define = [$1, $2] if m{^\s*#\s*define\s+(\w+)(?:\([^)]*\))?\s+(.*)};
3692
3693   if ($function) {
3694     if (/^}/) {
3695       if (exists $API{$function->[0]}) {
3696         my @n = find_api($function->[1]);
3697         push @{$depends{$function->[0]}}, @n if @n
3698       }
3699       undef $function;
3700     }
3701     else {
3702       $function->[1] .= $_;
3703     }
3704   }
3705
3706   $function = [$1, ''] if m{^DPPP_\(my_(\w+)\)};
3707
3708   $replace     = $1 if m{^\s*$rccs\s+Replace:\s+(\d+)\s+$rcce\s*$};
3709   $replace{$2} = $1 if $replace and m{^\s*#\s*define\s+(\w+)(?:\([^)]*\))?\s+(\w+)};
3710   $replace{$2} = $1 if m{^\s*#\s*define\s+(\w+)(?:\([^)]*\))?\s+(\w+).*$rccs\s+Replace\s+$rcce};
3711   $replace{$1} = $2 if m{^\s*$rccs\s+Replace (\w+) with (\w+)\s+$rcce\s*$};
3712
3713   if (m{^\s*$rccs\s+(\w+(\s*,\s*\w+)*)\s+depends\s+on\s+(\w+(\s*,\s*\w+)*)\s+$rcce\s*$}) {
3714     my @deps = map { s/\s+//g; $_ } split /,/, $3;
3715     my $d;
3716     for $d (map { s/\s+//g; $_ } split /,/, $1) {
3717       push @{$depends{$d}}, @deps;
3718     }
3719   }
3720
3721   $need{$1} = 1 if m{^#if\s+defined\(NEED_(\w+)(?:_GLOBAL)?\)};
3722 }
3723
3724 for (values %depends) {
3725   my %s;
3726   $_ = [sort grep !$s{$_}++, @$_];
3727 }
3728
3729 if (exists $opt{'api-info'}) {
3730   my $f;
3731   my $count = 0;
3732   my $match = $opt{'api-info'} =~ m!^/(.*)/$! ? $1 : "^\Q$opt{'api-info'}\E\$";
3733   for $f (sort { lc $a cmp lc $b } keys %API) {
3734     next unless $f =~ /$match/;
3735     print "\n=== $f ===\n\n";
3736     my $info = 0;
3737     if ($API{$f}{base} || $API{$f}{todo}) {
3738       my $base = format_version($API{$f}{base} || $API{$f}{todo});
3739       print "Supported at least starting from perl-$base.\n";
3740       $info++;
3741     }
3742     if ($API{$f}{provided}) {
3743       my $todo = $API{$f}{todo} ? format_version($API{$f}{todo}) : "5.003";
3744       print "Support by $ppport provided back to perl-$todo.\n";
3745       print "Support needs to be explicitly requested by NEED_$f.\n" if exists $need{$f};
3746       print "Depends on: ", join(', ', @{$depends{$f}}), ".\n" if exists $depends{$f};
3747       print "\n$hints{$f}" if exists $hints{$f};
3748       print "\nWARNING:\n$warnings{$f}" if exists $warnings{$f};
3749       $info++;
3750     }
3751     print "No portability information available.\n" unless $info;
3752     $count++;
3753   }
3754   $count or print "Found no API matching '$opt{'api-info'}'.";
3755   print "\n";
3756   exit 0;
3757 }
3758
3759 if (exists $opt{'list-provided'}) {
3760   my $f;
3761   for $f (sort { lc $a cmp lc $b } keys %API) {
3762     next unless $API{$f}{provided};
3763     my @flags;
3764     push @flags, 'explicit' if exists $need{$f};
3765     push @flags, 'depend'   if exists $depends{$f};
3766     push @flags, 'hint'     if exists $hints{$f};
3767     push @flags, 'warning'  if exists $warnings{$f};
3768     my $flags = @flags ? '  ['.join(', ', @flags).']' : '';
3769     print "$f$flags\n";
3770   }
3771   exit 0;
3772 }
3773
3774 my @files;
3775 my @srcext = qw( .xs .c .h .cc .cpp -c.inc -xs.inc );
3776 my $srcext = join '|', map { quotemeta $_ } @srcext;
3777
3778 if (@ARGV) {
3779   my %seen;
3780   for (@ARGV) {
3781     if (-e) {
3782       if (-f) {
3783         push @files, $_ unless $seen{$_}++;
3784       }
3785       else { warn "'$_' is not a file.\n" }
3786     }
3787     else {
3788       my @new = grep { -f } glob $_
3789           or warn "'$_' does not exist.\n";
3790       push @files, grep { !$seen{$_}++ } @new;
3791     }
3792   }
3793 }
3794 else {
3795   eval {
3796     require File::Find;
3797     File::Find::find(sub {
3798       $File::Find::name =~ /($srcext)$/i
3799           and push @files, $File::Find::name;
3800     }, '.');
3801   };
3802   if ($@) {
3803     @files = map { glob "*$_" } @srcext;
3804   }
3805 }
3806
3807 if (!@ARGV || $opt{filter}) {
3808   my(@in, @out);
3809   my %xsc = map { /(.*)\.xs$/ ? ("$1.c" => 1, "$1.cc" => 1) : () } @files;
3810   for (@files) {
3811     my $out = exists $xsc{$_} || /\b\Q$ppport\E$/i || !/($srcext)$/i;
3812     push @{ $out ? \@out : \@in }, $_;
3813   }
3814   if (@ARGV && @out) {
3815     warning("Skipping the following files (use --nofilter to avoid this):\n| ", join "\n| ", @out);
3816   }
3817   @files = @in;
3818 }
3819
3820 die "No input files given!\n" unless @files;
3821
3822 my(%files, %global, %revreplace);
3823 %revreplace = reverse %replace;
3824 my $filename;
3825 my $patch_opened = 0;
3826
3827 for $filename (@files) {
3828   unless (open IN, "<$filename") {
3829     warn "Unable to read from $filename: $!\n";
3830     next;
3831   }
3832
3833   info("Scanning $filename ...");
3834
3835   my $c = do { local $/; <IN> };
3836   close IN;
3837
3838   my %file = (orig => $c, changes => 0);
3839
3840   # Temporarily remove C/XS comments and strings from the code
3841   my @ccom;
3842
3843   $c =~ s{
3844     ( ^$HS*\#$HS*include\b[^\r\n]+\b(?:\Q$ppport\E|XSUB\.h)\b[^\r\n]*
3845     | ^$HS*\#$HS*(?:define|elif|if(?:def)?)\b[^\r\n]* )
3846   | ( ^$HS*\#[^\r\n]*
3847     | "[^"\\]*(?:\\.[^"\\]*)*"
3848     | '[^'\\]*(?:\\.[^'\\]*)*'
3849     | / (?: \*[^*]*\*+(?:[^$ccs][^*]*\*+)* / | /[^\r\n]* ) )
3850   }{ defined $2 and push @ccom, $2;
3851      defined $1 ? $1 : "$ccs$#ccom$cce" }mgsex;
3852
3853   $file{ccom} = \@ccom;
3854   $file{code} = $c;
3855   $file{has_inc_ppport} = $c =~ /^$HS*#$HS*include[^\r\n]+\b\Q$ppport\E\b/m;
3856
3857   my $func;
3858
3859   for $func (keys %API) {
3860     my $match = $func;
3861     $match .= "|$revreplace{$func}" if exists $revreplace{$func};
3862     if ($c =~ /\b(?:Perl_)?($match)\b/) {
3863       $file{uses_replace}{$1}++ if exists $revreplace{$func} && $1 eq $revreplace{$func};
3864       $file{uses_Perl}{$func}++ if $c =~ /\bPerl_$func\b/;
3865       if (exists $API{$func}{provided}) {
3866         $file{uses_provided}{$func}++;
3867         if (!exists $API{$func}{base} || $API{$func}{base} > $opt{'compat-version'}) {
3868           $file{uses}{$func}++;
3869           my @deps = rec_depend($func);
3870           if (@deps) {
3871             $file{uses_deps}{$func} = \@deps;
3872             for (@deps) {
3873               $file{uses}{$_} = 0 unless exists $file{uses}{$_};
3874             }
3875           }
3876           for ($func, @deps) {
3877             $file{needs}{$_} = 'static' if exists $need{$_};
3878           }
3879         }
3880       }
3881       if (exists $API{$func}{todo} && $API{$func}{todo} > $opt{'compat-version'}) {
3882         if ($c =~ /\b$func\b/) {
3883           $file{uses_todo}{$func}++;
3884         }
3885       }
3886     }
3887   }
3888
3889   while ($c =~ /^$HS*#$HS*define$HS+(NEED_(\w+?)(_GLOBAL)?)\b/mg) {
3890     if (exists $need{$2}) {
3891       $file{defined $3 ? 'needed_global' : 'needed_static'}{$2}++;
3892     }
3893     else { warning("Possibly wrong #define $1 in $filename") }
3894   }
3895
3896   for (qw(uses needs uses_todo needed_global needed_static)) {
3897     for $func (keys %{$file{$_}}) {
3898       push @{$global{$_}{$func}}, $filename;
3899     }
3900   }
3901
3902   $files{$filename} = \%file;
3903 }
3904
3905 # Globally resolve NEED_'s
3906 my $need;
3907 for $need (keys %{$global{needs}}) {
3908   if (@{$global{needs}{$need}} > 1) {
3909     my @targets = @{$global{needs}{$need}};
3910     my @t = grep $files{$_}{needed_global}{$need}, @targets;
3911     @targets = @t if @t;
3912     @t = grep /\.xs$/i, @targets;
3913     @targets = @t if @t;
3914     my $target = shift @targets;
3915     $files{$target}{needs}{$need} = 'global';
3916     for (@{$global{needs}{$need}}) {
3917       $files{$_}{needs}{$need} = 'extern' if $_ ne $target;
3918     }
3919   }
3920 }
3921
3922 for $filename (@files) {
3923   exists $files{$filename} or next;
3924
3925   info("=== Analyzing $filename ===");
3926
3927   my %file = %{$files{$filename}};
3928   my $func;
3929   my $c = $file{code};
3930   my $warnings = 0;
3931
3932   for $func (sort keys %{$file{uses_Perl}}) {
3933     if ($API{$func}{varargs}) {
3934       unless ($API{$func}{nothxarg}) {
3935         my $changes = ($c =~ s{\b(Perl_$func\s*\(\s*)(?!aTHX_?)(\)|[^\s)]*\))}
3936                               { $1 . ($2 eq ')' ? 'aTHX' : 'aTHX_ ') . $2 }ge);
3937         if ($changes) {
3938           warning("Doesn't pass interpreter argument aTHX to Perl_$func");
3939           $file{changes} += $changes;
3940         }
3941       }
3942     }
3943     else {
3944       warning("Uses Perl_$func instead of $func");
3945       $file{changes} += ($c =~ s{\bPerl_$func(\s*)\((\s*aTHX_?)?\s*}
3946                                 {$func$1(}g);
3947     }
3948   }
3949
3950   for $func (sort keys %{$file{uses_replace}}) {
3951     warning("Uses $func instead of $replace{$func}");
3952     $file{changes} += ($c =~ s/\b$func\b/$replace{$func}/g);
3953   }
3954
3955   for $func (sort keys %{$file{uses_provided}}) {
3956     if ($file{uses}{$func}) {
3957       if (exists $file{uses_deps}{$func}) {
3958         diag("Uses $func, which depends on ", join(', ', @{$file{uses_deps}{$func}}));
3959       }
3960       else {
3961         diag("Uses $func");
3962       }
3963     }
3964     $warnings += hint($func);
3965   }
3966
3967   unless ($opt{quiet}) {
3968     for $func (sort keys %{$file{uses_todo}}) {
3969       print "*** WARNING: Uses $func, which may not be portable below perl ",
3970             format_version($API{$func}{todo}), ", even with '$ppport'\n";
3971       $warnings++;
3972     }
3973   }
3974
3975   for $func (sort keys %{$file{needed_static}}) {
3976     my $message = '';
3977     if (not exists $file{uses}{$func}) {
3978       $message = "No need to define NEED_$func if $func is never used";
3979     }
3980     elsif (exists $file{needs}{$func} && $file{needs}{$func} ne 'static') {
3981       $message = "No need to define NEED_$func when already needed globally";
3982     }
3983     if ($message) {
3984       diag($message);
3985       $file{changes} += ($c =~ s/^$HS*#$HS*define$HS+NEED_$func\b.*$LF//mg);
3986     }
3987   }
3988
3989   for $func (sort keys %{$file{needed_global}}) {
3990     my $message = '';
3991     if (not exists $global{uses}{$func}) {
3992       $message = "No need to define NEED_${func}_GLOBAL if $func is never used";
3993     }
3994     elsif (exists $file{needs}{$func}) {
3995       if ($file{needs}{$func} eq 'extern') {
3996         $message = "No need to define NEED_${func}_GLOBAL when already needed globally";
3997       }
3998       elsif ($file{needs}{$func} eq 'static') {
3999         $message = "No need to define NEED_${func}_GLOBAL when only used in this file";
4000       }
4001     }
4002     if ($message) {
4003       diag($message);
4004       $file{changes} += ($c =~ s/^$HS*#$HS*define$HS+NEED_${func}_GLOBAL\b.*$LF//mg);
4005     }
4006   }
4007
4008   $file{needs_inc_ppport} = keys %{$file{uses}};
4009
4010   if ($file{needs_inc_ppport}) {
4011     my $pp = '';
4012
4013     for $func (sort keys %{$file{needs}}) {
4014       my $type = $file{needs}{$func};
4015       next if $type eq 'extern';
4016       my $suffix = $type eq 'global' ? '_GLOBAL' : '';
4017       unless (exists $file{"needed_$type"}{$func}) {
4018         if ($type eq 'global') {
4019           diag("Files [@{$global{needs}{$func}}] need $func, adding global request");
4020         }
4021         else {
4022           diag("File needs $func, adding static request");
4023         }
4024         $pp .= "#define NEED_$func$suffix\n";
4025       }
4026     }
4027
4028     if ($pp && ($c =~ s/^(?=$HS*#$HS*define$HS+NEED_\w+)/$pp/m)) {
4029       $pp = '';
4030       $file{changes}++;
4031     }
4032
4033     unless ($file{has_inc_ppport}) {
4034       diag("Needs to include '$ppport'");
4035       $pp .= qq(#include "$ppport"\n)
4036     }
4037
4038     if ($pp) {
4039       $file{changes} += ($c =~ s/^($HS*#$HS*define$HS+NEED_\w+.*?)^/$1$pp/ms)
4040                      || ($c =~ s/^(?=$HS*#$HS*include.*\Q$ppport\E)/$pp/m)
4041                      || ($c =~ s/^($HS*#$HS*include.*XSUB.*\s*?)^/$1$pp/m)
4042                      || ($c =~ s/^/$pp/);
4043     }
4044   }
4045   else {
4046     if ($file{has_inc_ppport}) {
4047       diag("No need to include '$ppport'");
4048       $file{changes} += ($c =~ s/^$HS*?#$HS*include.*\Q$ppport\E.*?$LF//m);
4049     }
4050   }
4051
4052   # put back in our C comments
4053   my $ix;
4054   my $cppc = 0;
4055   my @ccom = @{$file{ccom}};
4056   for $ix (0 .. $#ccom) {
4057     if (!$opt{cplusplus} && $ccom[$ix] =~ s!^//!!) {
4058       $cppc++;
4059       $file{changes} += $c =~ s/$rccs$ix$rcce/$ccs$ccom[$ix] $cce/;
4060     }
4061     else {
4062       $c =~ s/$rccs$ix$rcce/$ccom[$ix]/;
4063     }
4064   }
4065
4066   if ($cppc) {
4067     my $s = $cppc != 1 ? 's' : '';
4068     warning("Uses $cppc C++ style comment$s, which is not portable");
4069   }
4070
4071   my $s = $warnings != 1 ? 's' : '';
4072   my $warn = $warnings ? " ($warnings warning$s)" : '';
4073   info("Analysis completed$warn");
4074
4075   if ($file{changes}) {
4076     if (exists $opt{copy}) {
4077       my $newfile = "$filename$opt{copy}";
4078       if (-e $newfile) {
4079         error("'$newfile' already exists, refusing to write copy of '$filename'");
4080       }
4081       else {
4082         local *F;
4083         if (open F, ">$newfile") {
4084           info("Writing copy of '$filename' with changes to '$newfile'");
4085           print F $c;
4086           close F;
4087         }
4088         else {
4089           error("Cannot open '$newfile' for writing: $!");
4090         }
4091       }
4092     }
4093     elsif (exists $opt{patch} || $opt{changes}) {
4094       if (exists $opt{patch}) {
4095         unless ($patch_opened) {
4096           if (open PATCH, ">$opt{patch}") {
4097             $patch_opened = 1;
4098           }
4099           else {
4100             error("Cannot open '$opt{patch}' for writing: $!");
4101             delete $opt{patch};
4102             $opt{changes} = 1;
4103             goto fallback;
4104           }
4105         }
4106         mydiff(\*PATCH, $filename, $c);
4107       }
4108       else {
4109 fallback:
4110         info("Suggested changes:");
4111         mydiff(\*STDOUT, $filename, $c);
4112       }
4113     }
4114     else {
4115       my $s = $file{changes} == 1 ? '' : 's';
4116       info("$file{changes} potentially required change$s detected");
4117     }
4118   }
4119   else {
4120     info("Looks good");
4121   }
4122 }
4123
4124 close PATCH if $patch_opened;
4125
4126 exit 0;
4127
4128
4129 sub try_use { eval "use @_;"; return $@ eq '' }
4130
4131 sub mydiff
4132 {
4133   local *F = shift;
4134   my($file, $str) = @_;
4135   my $diff;
4136
4137   if (exists $opt{diff}) {
4138     $diff = run_diff($opt{diff}, $file, $str);
4139   }
4140
4141   if (!defined $diff and try_use('Text::Diff')) {
4142     $diff = Text::Diff::diff($file, \$str, { STYLE => 'Unified' });
4143     $diff = <<HEADER . $diff;
4144 --- $file
4145 +++ $file.patched
4146 HEADER
4147   }
4148
4149   if (!defined $diff) {
4150     $diff = run_diff('diff -u', $file, $str);
4151   }
4152
4153   if (!defined $diff) {
4154     $diff = run_diff('diff', $file, $str);
4155   }
4156
4157   if (!defined $diff) {
4158     error("Cannot generate a diff. Please install Text::Diff or use --copy.");
4159     return;
4160   }
4161
4162   print F $diff;
4163 }
4164
4165 sub run_diff
4166 {
4167   my($prog, $file, $str) = @_;
4168   my $tmp = 'dppptemp';
4169   my $suf = 'aaa';
4170   my $diff = '';
4171   local *F;
4172
4173   while (-e "$tmp.$suf") { $suf++ }
4174   $tmp = "$tmp.$suf";
4175
4176   if (open F, ">$tmp") {
4177     print F $str;
4178     close F;
4179
4180     if (open F, "$prog $file $tmp |") {
4181       while (<F>) {
4182         s/\Q$tmp\E/$file.patched/;
4183         $diff .= $_;
4184       }
4185       close F;
4186       unlink $tmp;
4187       return $diff;
4188     }
4189
4190     unlink $tmp;
4191   }
4192   else {
4193     error("Cannot open '$tmp' for writing: $!");
4194   }
4195
4196   return undef;
4197 }
4198
4199 sub rec_depend
4200 {
4201   my($func, $seen) = @_;
4202   return () unless exists $depends{$func};
4203   $seen = {%{$seen||{}}};
4204   return () if $seen->{$func}++;
4205   my %s;
4206   grep !$s{$_}++, map { ($_, rec_depend($_, $seen)) } @{$depends{$func}};
4207 }
4208
4209 sub parse_version
4210 {
4211   my $ver = shift;
4212
4213   if ($ver =~ /^(\d+)\.(\d+)\.(\d+)$/) {
4214     return ($1, $2, $3);
4215   }
4216   elsif ($ver !~ /^\d+\.[\d_]+$/) {
4217     die "cannot parse version '$ver'\n";
4218   }
4219
4220   $ver =~ s/_//g;
4221   $ver =~ s/$/000000/;
4222
4223   my($r,$v,$s) = $ver =~ /(\d+)\.(\d{3})(\d{3})/;
4224
4225   $v = int $v;
4226   $s = int $s;
4227
4228   if ($r < 5 || ($r == 5 && $v < 6)) {
4229     if ($s % 10) {
4230       die "cannot parse version '$ver'\n";
4231     }
4232   }
4233
4234   return ($r, $v, $s);
4235 }
4236
4237 sub format_version
4238 {
4239   my $ver = shift;
4240
4241   $ver =~ s/$/000000/;
4242   my($r,$v,$s) = $ver =~ /(\d+)\.(\d{3})(\d{3})/;
4243
4244   $v = int $v;
4245   $s = int $s;
4246
4247   if ($r < 5 || ($r == 5 && $v < 6)) {
4248     if ($s % 10) {
4249       die "invalid version '$ver'\n";
4250     }
4251     $s /= 10;
4252
4253     $ver = sprintf "%d.%03d", $r, $v;
4254     $s > 0 and $ver .= sprintf "_%02d", $s;
4255
4256     return $ver;
4257   }
4258
4259   return sprintf "%d.%d.%d", $r, $v, $s;
4260 }
4261
4262 sub info
4263 {
4264   $opt{quiet} and return;
4265   print @_, "\n";
4266 }
4267
4268 sub diag
4269 {
4270   $opt{quiet} and return;
4271   $opt{diag} and print @_, "\n";
4272 }
4273
4274 sub warning
4275 {
4276   $opt{quiet} and return;
4277   print "*** ", @_, "\n";
4278 }
4279
4280 sub error
4281 {
4282   print "*** ERROR: ", @_, "\n";
4283 }
4284
4285 my %given_hints;
4286 my %given_warnings;
4287 sub hint
4288 {
4289   $opt{quiet} and return;
4290   my $func = shift;
4291   my $rv = 0;
4292   if (exists $warnings{$func} && !$given_warnings{$func}++) {
4293     my $warn = $warnings{$func};
4294     $warn =~ s!^!*** !mg;
4295     print "*** WARNING: $func\n", $warn;
4296     $rv++;
4297   }
4298   if ($opt{hints} && exists $hints{$func} && !$given_hints{$func}++) {
4299     my $hint = $hints{$func};
4300     $hint =~ s/^/   /mg;
4301     print "   --- hint for $func ---\n", $hint;
4302   }
4303   $rv;
4304 }
4305
4306 sub usage
4307 {
4308   my($usage) = do { local(@ARGV,$/)=($0); <> } =~ /^=head\d$HS+SYNOPSIS\s*^(.*?)\s*^=/ms;
4309   my %M = ( 'I' => '*' );
4310   $usage =~ s/^\s*perl\s+\S+/$^X $0/;
4311   $usage =~ s/([A-Z])<([^>]+)>/$M{$1}$2$M{$1}/g;
4312
4313   print <<ENDUSAGE;
4314
4315 Usage: $usage
4316
4317 See perldoc $0 for details.
4318
4319 ENDUSAGE
4320
4321   exit 2;
4322 }
4323
4324 sub strip
4325 {
4326   my $self = do { local(@ARGV,$/)=($0); <> };
4327   my($copy) = $self =~ /^=head\d\s+COPYRIGHT\s*^(.*?)^=\w+/ms;
4328   $copy =~ s/^(?=\S+)/    /gms;
4329   $self =~ s/^$HS+Do NOT edit.*?(?=^-)/$copy/ms;
4330   $self =~ s/^SKIP.*(?=^__DATA__)/SKIP
4331 if (\@ARGV && \$ARGV[0] eq '--unstrip') {
4332   eval { require Devel::PPPort };
4333   \$@ and die "Cannot require Devel::PPPort, please install.\\n";
4334   if (eval \$Devel::PPPort::VERSION < $VERSION) {
4335     die "$0 was originally generated with Devel::PPPort $VERSION.\\n"
4336       . "Your Devel::PPPort is only version \$Devel::PPPort::VERSION.\\n"
4337       . "Please install a newer version, or --unstrip will not work.\\n";
4338   }
4339   Devel::PPPort::WriteFile(\$0);
4340   exit 0;
4341 }
4342 print <<END;
4343
4344 Sorry, but this is a stripped version of \$0.
4345
4346 To be able to use its original script and doc functionality,
4347 please try to regenerate this file using:
4348
4349   \$^X \$0 --unstrip
4350
4351 END
4352 /ms;
4353   my($pl, $c) = $self =~ /(.*^__DATA__)(.*)/ms;
4354   $c =~ s{
4355     / (?: \*[^*]*\*+(?:[^$ccs][^*]*\*+)* / | /[^\r\n]*)
4356   | ( "[^"\\]*(?:\\.[^"\\]*)*"
4357     | '[^'\\]*(?:\\.[^'\\]*)*' )
4358   | ($HS+) }{ defined $2 ? ' ' : ($1 || '') }gsex;
4359   $c =~ s!\s+$!!mg;
4360   $c =~ s!^$LF!!mg;
4361   $c =~ s!^\s*#\s*!#!mg;
4362   $c =~ s!^\s+!!mg;
4363
4364   open OUT, ">$0" or die "cannot strip $0: $!\n";
4365   print OUT "$pl$c\n";
4366
4367   exit 0;
4368 }
4369
4370 __DATA__
4371 */
4372
4373 #ifndef _P_P_PORTABILITY_H_
4374 #define _P_P_PORTABILITY_H_
4375
4376 #ifndef DPPP_NAMESPACE
4377 #  define DPPP_NAMESPACE DPPP_
4378 #endif
4379
4380 #define DPPP_CAT2(x,y) CAT2(x,y)
4381 #define DPPP_(name) DPPP_CAT2(DPPP_NAMESPACE, name)
4382
4383 #ifndef PERL_REVISION
4384 #  if !defined(__PATCHLEVEL_H_INCLUDED__) && !(defined(PATCHLEVEL) && defined(SUBVERSION))
4385 #    define PERL_PATCHLEVEL_H_IMPLICIT
4386 #    include <patchlevel.h>
4387 #  endif
4388 #  if !(defined(PERL_VERSION) || (defined(SUBVERSION) && defined(PATCHLEVEL)))
4389 #    include <could_not_find_Perl_patchlevel.h>
4390 #  endif
4391 #  ifndef PERL_REVISION
4392 #    define PERL_REVISION       (5)
4393      /* Replace: 1 */
4394 #    define PERL_VERSION        PATCHLEVEL
4395 #    define PERL_SUBVERSION     SUBVERSION
4396      /* Replace PERL_PATCHLEVEL with PERL_VERSION */
4397      /* Replace: 0 */
4398 #  endif
4399 #endif
4400
4401 #define _dpppDEC2BCD(dec) ((((dec)/100)<<8)|((((dec)%100)/10)<<4)|((dec)%10))
4402 #define PERL_BCDVERSION ((_dpppDEC2BCD(PERL_REVISION)<<24)|(_dpppDEC2BCD(PERL_VERSION)<<12)|_dpppDEC2BCD(PERL_SUBVERSION))
4403
4404 /* It is very unlikely that anyone will try to use this with Perl 6
4405    (or greater), but who knows.
4406  */
4407 #if PERL_REVISION != 5
4408 #  error ppport.h only works with Perl version 5
4409 #endif /* PERL_REVISION != 5 */
4410 #ifndef dTHR
4411 #  define dTHR                           dNOOP
4412 #endif
4413 #ifndef dTHX
4414 #  define dTHX                           dNOOP
4415 #endif
4416
4417 #ifndef dTHXa
4418 #  define dTHXa(x)                       dNOOP
4419 #endif
4420 #ifndef pTHX
4421 #  define pTHX                           void
4422 #endif
4423
4424 #ifndef pTHX_
4425 #  define pTHX_
4426 #endif
4427
4428 #ifndef aTHX
4429 #  define aTHX
4430 #endif
4431
4432 #ifndef aTHX_
4433 #  define aTHX_
4434 #endif
4435
4436 #if (PERL_BCDVERSION < 0x5006000)
4437 #  ifdef USE_THREADS
4438 #    define aTHXR  thr
4439 #    define aTHXR_ thr,
4440 #  else
4441 #    define aTHXR
4442 #    define aTHXR_
4443 #  endif
4444 #  define dTHXR  dTHR
4445 #else
4446 #  define aTHXR  aTHX
4447 #  define aTHXR_ aTHX_
4448 #  define dTHXR  dTHX
4449 #endif
4450 #ifndef dTHXoa
4451 #  define dTHXoa(x)                      dTHXa(x)
4452 #endif
4453
4454 #ifdef I_LIMITS
4455 #  include <limits.h>
4456 #endif
4457
4458 #ifndef PERL_UCHAR_MIN
4459 #  define PERL_UCHAR_MIN ((unsigned char)0)
4460 #endif
4461
4462 #ifndef PERL_UCHAR_MAX
4463 #  ifdef UCHAR_MAX
4464 #    define PERL_UCHAR_MAX ((unsigned char)UCHAR_MAX)
4465 #  else
4466 #    ifdef MAXUCHAR
4467 #      define PERL_UCHAR_MAX ((unsigned char)MAXUCHAR)
4468 #    else
4469 #      define PERL_UCHAR_MAX ((unsigned char)~(unsigned)0)
4470 #    endif
4471 #  endif
4472 #endif
4473
4474 #ifndef PERL_USHORT_MIN
4475 #  define PERL_USHORT_MIN ((unsigned short)0)
4476 #endif
4477
4478 #ifndef PERL_USHORT_MAX
4479 #  ifdef USHORT_MAX
4480 #    define PERL_USHORT_MAX ((unsigned short)USHORT_MAX)
4481 #  else
4482 #    ifdef MAXUSHORT
4483 #      define PERL_USHORT_MAX ((unsigned short)MAXUSHORT)
4484 #    else
4485 #      ifdef USHRT_MAX
4486 #        define PERL_USHORT_MAX ((unsigned short)USHRT_MAX)
4487 #      else
4488 #        define PERL_USHORT_MAX ((unsigned short)~(unsigned)0)
4489 #      endif
4490 #    endif
4491 #  endif
4492 #endif
4493
4494 #ifndef PERL_SHORT_MAX
4495 #  ifdef SHORT_MAX
4496 #    define PERL_SHORT_MAX ((short)SHORT_MAX)
4497 #  else
4498 #    ifdef MAXSHORT    /* Often used in <values.h> */
4499 #      define PERL_SHORT_MAX ((short)MAXSHORT)
4500 #    else
4501 #      ifdef SHRT_MAX
4502 #        define PERL_SHORT_MAX ((short)SHRT_MAX)
4503 #      else
4504 #        define PERL_SHORT_MAX ((short) (PERL_USHORT_MAX >> 1))
4505 #      endif
4506 #    endif
4507 #  endif
4508 #endif
4509
4510 #ifndef PERL_SHORT_MIN
4511 #  ifdef SHORT_MIN
4512 #    define PERL_SHORT_MIN ((short)SHORT_MIN)
4513 #  else
4514 #    ifdef MINSHORT
4515 #      define PERL_SHORT_MIN ((short)MINSHORT)
4516 #    else
4517 #      ifdef SHRT_MIN
4518 #        define PERL_SHORT_MIN ((short)SHRT_MIN)
4519 #      else
4520 #        define PERL_SHORT_MIN (-PERL_SHORT_MAX - ((3 & -1) == 3))
4521 #      endif
4522 #    endif
4523 #  endif
4524 #endif
4525
4526 #ifndef PERL_UINT_MAX
4527 #  ifdef UINT_MAX
4528 #    define PERL_UINT_MAX ((unsigned int)UINT_MAX)
4529 #  else
4530 #    ifdef MAXUINT
4531 #      define PERL_UINT_MAX ((unsigned int)MAXUINT)
4532 #    else
4533 #      define PERL_UINT_MAX (~(unsigned int)0)
4534 #    endif
4535 #  endif
4536 #endif
4537
4538 #ifndef PERL_UINT_MIN
4539 #  define PERL_UINT_MIN ((unsigned int)0)
4540 #endif
4541
4542 #ifndef PERL_INT_MAX
4543 #  ifdef INT_MAX
4544 #    define PERL_INT_MAX ((int)INT_MAX)
4545 #  else
4546 #    ifdef MAXINT    /* Often used in <values.h> */
4547 #      define PERL_INT_MAX ((int)MAXINT)
4548 #    else
4549 #      define PERL_INT_MAX ((int)(PERL_UINT_MAX >> 1))
4550 #    endif
4551 #  endif
4552 #endif
4553
4554 #ifndef PERL_INT_MIN
4555 #  ifdef INT_MIN
4556 #    define PERL_INT_MIN ((int)INT_MIN)
4557 #  else
4558 #    ifdef MININT
4559 #      define PERL_INT_MIN ((int)MININT)
4560 #    else
4561 #      define PERL_INT_MIN (-PERL_INT_MAX - ((3 & -1) == 3))
4562 #    endif
4563 #  endif
4564 #endif
4565
4566 #ifndef PERL_ULONG_MAX
4567 #  ifdef ULONG_MAX
4568 #    define PERL_ULONG_MAX ((unsigned long)ULONG_MAX)
4569 #  else
4570 #    ifdef MAXULONG
4571 #      define PERL_ULONG_MAX ((unsigned long)MAXULONG)
4572 #    else
4573 #      define PERL_ULONG_MAX (~(unsigned long)0)
4574 #    endif
4575 #  endif
4576 #endif
4577
4578 #ifndef PERL_ULONG_MIN
4579 #  define PERL_ULONG_MIN ((unsigned long)0L)
4580 #endif
4581
4582 #ifndef PERL_LONG_MAX
4583 #  ifdef LONG_MAX
4584 #    define PERL_LONG_MAX ((long)LONG_MAX)
4585 #  else
4586 #    ifdef MAXLONG
4587 #      define PERL_LONG_MAX ((long)MAXLONG)
4588 #    else
4589 #      define PERL_LONG_MAX ((long) (PERL_ULONG_MAX >> 1))
4590 #    endif
4591 #  endif
4592 #endif
4593
4594 #ifndef PERL_LONG_MIN
4595 #  ifdef LONG_MIN
4596 #    define PERL_LONG_MIN ((long)LONG_MIN)
4597 #  else
4598 #    ifdef MINLONG
4599 #      define PERL_LONG_MIN ((long)MINLONG)
4600 #    else
4601 #      define PERL_LONG_MIN (-PERL_LONG_MAX - ((3 & -1) == 3))
4602 #    endif
4603 #  endif
4604 #endif
4605
4606 #if defined(HAS_QUAD) && (defined(convex) || defined(uts))
4607 #  ifndef PERL_UQUAD_MAX
4608 #    ifdef ULONGLONG_MAX
4609 #      define PERL_UQUAD_MAX ((unsigned long long)ULONGLONG_MAX)
4610 #    else
4611 #      ifdef MAXULONGLONG
4612 #        define PERL_UQUAD_MAX ((unsigned long long)MAXULONGLONG)
4613 #      else
4614 #        define PERL_UQUAD_MAX (~(unsigned long long)0)
4615 #      endif
4616 #    endif
4617 #  endif
4618
4619 #  ifndef PERL_UQUAD_MIN
4620 #    define PERL_UQUAD_MIN ((unsigned long long)0L)
4621 #  endif
4622
4623 #  ifndef PERL_QUAD_MAX
4624 #    ifdef LONGLONG_MAX
4625 #      define PERL_QUAD_MAX ((long long)LONGLONG_MAX)
4626 #    else
4627 #      ifdef MAXLONGLONG
4628 #        define PERL_QUAD_MAX ((long long)MAXLONGLONG)
4629 #      else
4630 #        define PERL_QUAD_MAX ((long long) (PERL_UQUAD_MAX >> 1))
4631 #      endif
4632 #    endif
4633 #  endif
4634
4635 #  ifndef PERL_QUAD_MIN
4636 #    ifdef LONGLONG_MIN
4637 #      define PERL_QUAD_MIN ((long long)LONGLONG_MIN)
4638 #    else
4639 #      ifdef MINLONGLONG
4640 #        define PERL_QUAD_MIN ((long long)MINLONGLONG)
4641 #      else
4642 #        define PERL_QUAD_MIN (-PERL_QUAD_MAX - ((3 & -1) == 3))
4643 #      endif
4644 #    endif
4645 #  endif
4646 #endif
4647
4648 /* This is based on code from 5.003 perl.h */
4649 #ifdef HAS_QUAD
4650 #  ifdef cray
4651 #ifndef IVTYPE
4652 #  define IVTYPE                         int
4653 #endif
4654
4655 #ifndef IV_MIN
4656 #  define IV_MIN                         PERL_INT_MIN
4657 #endif
4658
4659 #ifndef IV_MAX
4660 #  define IV_MAX                         PERL_INT_MAX
4661 #endif
4662
4663 #ifndef UV_MIN
4664 #  define UV_MIN                         PERL_UINT_MIN
4665 #endif
4666
4667 #ifndef UV_MAX
4668 #  define UV_MAX                         PERL_UINT_MAX
4669 #endif
4670
4671 #    ifdef INTSIZE
4672 #ifndef IVSIZE
4673 #  define IVSIZE                         INTSIZE
4674 #endif
4675
4676 #    endif
4677 #  else
4678 #    if defined(convex) || defined(uts)
4679 #ifndef IVTYPE
4680 #  define IVTYPE                         long long
4681 #endif
4682
4683 #ifndef IV_MIN
4684 #  define IV_MIN                         PERL_QUAD_MIN
4685 #endif
4686
4687 #ifndef IV_MAX
4688 #  define IV_MAX                         PERL_QUAD_MAX
4689 #endif
4690
4691 #ifndef UV_MIN
4692 #  define UV_MIN                         PERL_UQUAD_MIN
4693 #endif
4694
4695 #ifndef UV_MAX
4696 #  define UV_MAX                         PERL_UQUAD_MAX
4697 #endif
4698
4699 #      ifdef LONGLONGSIZE
4700 #ifndef IVSIZE
4701 #  define IVSIZE                         LONGLONGSIZE
4702 #endif
4703
4704 #      endif
4705 #    else
4706 #ifndef IVTYPE
4707 #  define IVTYPE                         long
4708 #endif
4709
4710 #ifndef IV_MIN
4711 #  define IV_MIN                         PERL_LONG_MIN
4712 #endif
4713
4714 #ifndef IV_MAX
4715 #  define IV_MAX                         PERL_LONG_MAX
4716 #endif
4717
4718 #ifndef UV_MIN
4719 #  define UV_MIN                         PERL_ULONG_MIN
4720 #endif
4721
4722 #ifndef UV_MAX
4723 #  define UV_MAX                         PERL_ULONG_MAX
4724 #endif
4725
4726 #      ifdef LONGSIZE
4727 #ifndef IVSIZE
4728 #  define IVSIZE                         LONGSIZE
4729 #endif
4730
4731 #      endif
4732 #    endif
4733 #  endif
4734 #ifndef IVSIZE
4735 #  define IVSIZE                         8
4736 #endif
4737
4738 #ifndef PERL_QUAD_MIN
4739 #  define PERL_QUAD_MIN                  IV_MIN
4740 #endif
4741
4742 #ifndef PERL_QUAD_MAX
4743 #  define PERL_QUAD_MAX                  IV_MAX
4744 #endif
4745
4746 #ifndef PERL_UQUAD_MIN
4747 #  define PERL_UQUAD_MIN                 UV_MIN
4748 #endif
4749
4750 #ifndef PERL_UQUAD_MAX
4751 #  define PERL_UQUAD_MAX                 UV_MAX
4752 #endif
4753
4754 #else
4755 #ifndef IVTYPE
4756 #  define IVTYPE                         long
4757 #endif
4758
4759 #ifndef IV_MIN
4760 #  define IV_MIN                         PERL_LONG_MIN
4761 #endif
4762
4763 #ifndef IV_MAX
4764 #  define IV_MAX                         PERL_LONG_MAX
4765 #endif
4766
4767 #ifndef UV_MIN
4768 #  define UV_MIN                         PERL_ULONG_MIN
4769 #endif
4770
4771 #ifndef UV_MAX
4772 #  define UV_MAX                         PERL_ULONG_MAX
4773 #endif
4774
4775 #endif
4776
4777 #ifndef IVSIZE
4778 #  ifdef LONGSIZE
4779 #    define IVSIZE LONGSIZE
4780 #  else
4781 #    define IVSIZE 4 /* A bold guess, but the best we can make. */
4782 #  endif
4783 #endif
4784 #ifndef UVTYPE
4785 #  define UVTYPE                         unsigned IVTYPE
4786 #endif
4787
4788 #ifndef UVSIZE
4789 #  define UVSIZE                         IVSIZE
4790 #endif
4791 #ifndef sv_setuv
4792 #  define sv_setuv(sv, uv)               \
4793                STMT_START {                         \
4794                  UV TeMpUv = uv;                    \
4795                  if (TeMpUv <= IV_MAX)              \
4796                    sv_setiv(sv, TeMpUv);            \
4797                  else                               \
4798                    sv_setnv(sv, (double)TeMpUv);    \
4799                } STMT_END
4800 #endif
4801 #ifndef newSVuv
4802 #  define newSVuv(uv)                    ((uv) <= IV_MAX ? newSViv((IV)uv) : newSVnv((NV)uv))
4803 #endif
4804 #ifndef sv_2uv
4805 #  define sv_2uv(sv)                     ((PL_Sv = (sv)), (UV) (SvNOK(PL_Sv) ? SvNV(PL_Sv) : sv_2nv(PL_Sv)))
4806 #endif
4807
4808 #ifndef SvUVX
4809 #  define SvUVX(sv)                      ((UV)SvIVX(sv))
4810 #endif
4811
4812 #ifndef SvUVXx
4813 #  define SvUVXx(sv)                     SvUVX(sv)
4814 #endif
4815
4816 #ifndef SvUV
4817 #  define SvUV(sv)                       (SvIOK(sv) ? SvUVX(sv) : sv_2uv(sv))
4818 #endif
4819
4820 #ifndef SvUVx
4821 #  define SvUVx(sv)                      ((PL_Sv = (sv)), SvUV(PL_Sv))
4822 #endif
4823
4824 /* Hint: sv_uv
4825  * Always use the SvUVx() macro instead of sv_uv().
4826  */
4827 #ifndef sv_uv
4828 #  define sv_uv(sv)                      SvUVx(sv)
4829 #endif
4830
4831 #if !defined(SvUOK) && defined(SvIOK_UV)
4832 #  define SvUOK(sv) SvIOK_UV(sv)
4833 #endif
4834 #ifndef XST_mUV
4835 #  define XST_mUV(i,v)                   (ST(i) = sv_2mortal(newSVuv(v))  )
4836 #endif
4837
4838 #ifndef XSRETURN_UV
4839 #  define XSRETURN_UV(v)                 STMT_START { XST_mUV(0,v);  XSRETURN(1); } STMT_END
4840 #endif
4841 #ifndef PUSHu
4842 #  define PUSHu(u)                       STMT_START { sv_setuv(TARG, (UV)(u)); PUSHTARG;  } STMT_END
4843 #endif
4844
4845 #ifndef XPUSHu
4846 #  define XPUSHu(u)                      STMT_START { sv_setuv(TARG, (UV)(u)); XPUSHTARG; } STMT_END
4847 #endif
4848
4849 #ifdef HAS_MEMCMP
4850 #ifndef memNE
4851 #  define memNE(s1,s2,l)                 (memcmp(s1,s2,l))
4852 #endif
4853
4854 #ifndef memEQ
4855 #  define memEQ(s1,s2,l)                 (!memcmp(s1,s2,l))
4856 #endif
4857
4858 #else
4859 #ifndef memNE
4860 #  define memNE(s1,s2,l)                 (bcmp(s1,s2,l))
4861 #endif
4862
4863 #ifndef memEQ
4864 #  define memEQ(s1,s2,l)                 (!bcmp(s1,s2,l))
4865 #endif
4866
4867 #endif
4868 #ifndef MoveD
4869 #  define MoveD(s,d,n,t)                 memmove((char*)(d),(char*)(s), (n) * sizeof(t))
4870 #endif
4871
4872 #ifndef CopyD
4873 #  define CopyD(s,d,n,t)                 memcpy((char*)(d),(char*)(s), (n) * sizeof(t))
4874 #endif
4875
4876 #ifdef HAS_MEMSET
4877 #ifndef ZeroD
4878 #  define ZeroD(d,n,t)                   memzero((char*)(d), (n) * sizeof(t))
4879 #endif
4880
4881 #else
4882 #ifndef ZeroD
4883 #  define ZeroD(d,n,t)                   ((void)memzero((char*)(d), (n) * sizeof(t)), d)
4884 #endif
4885
4886 #endif
4887 #ifndef PoisonWith
4888 #  define PoisonWith(d,n,t,b)            (void)memset((char*)(d), (U8)(b), (n) * sizeof(t))
4889 #endif
4890
4891 #ifndef PoisonNew
4892 #  define PoisonNew(d,n,t)               PoisonWith(d,n,t,0xAB)
4893 #endif
4894
4895 #ifndef PoisonFree
4896 #  define PoisonFree(d,n,t)              PoisonWith(d,n,t,0xEF)
4897 #endif
4898
4899 #ifndef Poison
4900 #  define Poison(d,n,t)                  PoisonFree(d,n,t)
4901 #endif
4902 #ifndef Newx
4903 #  define Newx(v,n,t)                    New(0,v,n,t)
4904 #endif
4905
4906 #ifndef Newxc
4907 #  define Newxc(v,n,t,c)                 Newc(0,v,n,t,c)
4908 #endif
4909
4910 #ifndef Newxz
4911 #  define Newxz(v,n,t)                   Newz(0,v,n,t)
4912 #endif
4913
4914 #ifndef PERL_UNUSED_DECL
4915 #  ifdef HASATTRIBUTE
4916 #    if (defined(__GNUC__) && defined(__cplusplus)) || defined(__INTEL_COMPILER)
4917 #      define PERL_UNUSED_DECL
4918 #    else
4919 #      define PERL_UNUSED_DECL __attribute__((unused))
4920 #    endif
4921 #  else
4922 #    define PERL_UNUSED_DECL
4923 #  endif
4924 #endif
4925
4926 #ifndef PERL_UNUSED_ARG
4927 #  if defined(lint) && defined(S_SPLINT_S) /* www.splint.org */
4928 #    include <note.h>
4929 #    define PERL_UNUSED_ARG(x) NOTE(ARGUNUSED(x))
4930 #  else
4931 #    define PERL_UNUSED_ARG(x) ((void)x)
4932 #  endif
4933 #endif
4934
4935 #ifndef PERL_UNUSED_VAR
4936 #  define PERL_UNUSED_VAR(x) ((void)x)
4937 #endif
4938
4939 #ifndef PERL_UNUSED_CONTEXT
4940 #  ifdef USE_ITHREADS
4941 #    define PERL_UNUSED_CONTEXT PERL_UNUSED_ARG(my_perl)
4942 #  else
4943 #    define PERL_UNUSED_CONTEXT
4944 #  endif
4945 #endif
4946 #ifndef NOOP
4947 #  define NOOP                           /*EMPTY*/(void)0
4948 #endif
4949
4950 #ifndef dNOOP
4951 #  define dNOOP                          extern int /*@unused@*/ Perl___notused PERL_UNUSED_DECL
4952 #endif
4953
4954 #ifndef NVTYPE
4955 #  if defined(USE_LONG_DOUBLE) && defined(HAS_LONG_DOUBLE)
4956 #    define NVTYPE long double
4957 #  else
4958 #    define NVTYPE double
4959 #  endif
4960 typedef NVTYPE NV;
4961 #endif
4962
4963 #ifndef INT2PTR
4964 #  if (IVSIZE == PTRSIZE) && (UVSIZE == PTRSIZE)
4965 #    define PTRV                  UV
4966 #    define INT2PTR(any,d)        (any)(d)
4967 #  else
4968 #    if PTRSIZE == LONGSIZE
4969 #      define PTRV                unsigned long
4970 #    else
4971 #      define PTRV                unsigned
4972 #    endif
4973 #    define INT2PTR(any,d)        (any)(PTRV)(d)
4974 #  endif
4975 #endif
4976
4977 #ifndef PTR2ul
4978 #  if PTRSIZE == LONGSIZE
4979 #    define PTR2ul(p)     (unsigned long)(p)
4980 #  else
4981 #    define PTR2ul(p)     INT2PTR(unsigned long,p)
4982 #  endif
4983 #endif
4984 #ifndef PTR2nat
4985 #  define PTR2nat(p)                     (PTRV)(p)
4986 #endif
4987
4988 #ifndef NUM2PTR
4989 #  define NUM2PTR(any,d)                 (any)PTR2nat(d)
4990 #endif
4991
4992 #ifndef PTR2IV
4993 #  define PTR2IV(p)                      INT2PTR(IV,p)
4994 #endif
4995
4996 #ifndef PTR2UV
4997 #  define PTR2UV(p)                      INT2PTR(UV,p)
4998 #endif
4999
5000 #ifndef PTR2NV
5001 #  define PTR2NV(p)                      NUM2PTR(NV,p)
5002 #endif
5003
5004 #undef START_EXTERN_C
5005 #undef END_EXTERN_C
5006 #undef EXTERN_C
5007 #ifdef __cplusplus
5008 #  define START_EXTERN_C extern "C" {
5009 #  define END_EXTERN_C }
5010 #  define EXTERN_C extern "C"
5011 #else
5012 #  define START_EXTERN_C
5013 #  define END_EXTERN_C
5014 #  define EXTERN_C extern
5015 #endif
5016
5017 #if defined(PERL_GCC_PEDANTIC)
5018 #  ifndef PERL_GCC_BRACE_GROUPS_FORBIDDEN
5019 #    define PERL_GCC_BRACE_GROUPS_FORBIDDEN
5020 #  endif
5021 #endif
5022
5023 #if defined(__GNUC__) && !defined(PERL_GCC_BRACE_GROUPS_FORBIDDEN) && !defined(__cplusplus)
5024 #  ifndef PERL_USE_GCC_BRACE_GROUPS
5025 #    define PERL_USE_GCC_BRACE_GROUPS
5026 #  endif
5027 #endif
5028
5029 #undef STMT_START
5030 #undef STMT_END
5031 #ifdef PERL_USE_GCC_BRACE_GROUPS
5032 #  define STMT_START    (void)( /* gcc supports ``({ STATEMENTS; })'' */
5033 #  define STMT_END      )
5034 #else
5035 #  if defined(VOIDFLAGS) && (VOIDFLAGS) && (defined(sun) || defined(__sun__)) && !defined(__GNUC__)
5036 #    define STMT_START  if (1)
5037 #    define STMT_END    else (void)0
5038 #  else
5039 #    define STMT_START  do
5040 #    define STMT_END    while (0)
5041 #  endif
5042 #endif
5043 #ifndef boolSV
5044 #  define boolSV(b)                      ((b) ? &PL_sv_yes : &PL_sv_no)
5045 #endif
5046
5047 /* DEFSV appears first in 5.004_56 */
5048 #ifndef DEFSV
5049 #  define DEFSV                          GvSV(PL_defgv)
5050 #endif
5051
5052 #ifndef SAVE_DEFSV
5053 #  define SAVE_DEFSV                     SAVESPTR(GvSV(PL_defgv))
5054 #endif
5055
5056 #ifndef DEFSV_set
5057 #  define DEFSV_set(sv)                  (DEFSV = (sv))
5058 #endif
5059
5060 /* Older perls (<=5.003) lack AvFILLp */
5061 #ifndef AvFILLp
5062 #  define AvFILLp                        AvFILL
5063 #endif
5064 #ifndef ERRSV
5065 #  define ERRSV                          get_sv("@",FALSE)
5066 #endif
5067
5068 /* Hint: gv_stashpvn
5069  * This function's backport doesn't support the length parameter, but
5070  * rather ignores it. Portability can only be ensured if the length
5071  * parameter is used for speed reasons, but the length can always be
5072  * correctly computed from the string argument.
5073  */
5074 #ifndef gv_stashpvn
5075 #  define gv_stashpvn(str,len,create)    gv_stashpv(str,create)
5076 #endif
5077
5078 /* Replace: 1 */
5079 #ifndef get_cv
5080 #  define get_cv                         perl_get_cv
5081 #endif
5082
5083 #ifndef get_sv
5084 #  define get_sv                         perl_get_sv
5085 #endif
5086
5087 #ifndef get_av
5088 #  define get_av                         perl_get_av
5089 #endif
5090
5091 #ifndef get_hv
5092 #  define get_hv                         perl_get_hv
5093 #endif
5094
5095 /* Replace: 0 */
5096 #ifndef dUNDERBAR
5097 #  define dUNDERBAR                      dNOOP
5098 #endif
5099
5100 #ifndef UNDERBAR
5101 #  define UNDERBAR                       DEFSV
5102 #endif
5103 #ifndef dAX
5104 #  define dAX                            I32 ax = MARK - PL_stack_base + 1
5105 #endif
5106
5107 #ifndef dITEMS
5108 #  define dITEMS                         I32 items = SP - MARK
5109 #endif
5110 #ifndef dXSTARG
5111 #  define dXSTARG                        SV * targ = sv_newmortal()
5112 #endif
5113 #ifndef dAXMARK
5114 #  define dAXMARK                        I32 ax = POPMARK; \
5115                                register SV ** const mark = PL_stack_base + ax++
5116 #endif
5117 #ifndef XSprePUSH
5118 #  define XSprePUSH                      (sp = PL_stack_base + ax - 1)
5119 #endif
5120
5121 #if (PERL_BCDVERSION < 0x5005000)
5122 #  undef XSRETURN
5123 #  define XSRETURN(off)                                   \
5124       STMT_START {                                        \
5125           PL_stack_sp = PL_stack_base + ax + ((off) - 1); \
5126           return;                                         \
5127       } STMT_END
5128 #endif
5129 #ifndef XSPROTO
5130 #  define XSPROTO(name)                  void name(pTHX_ CV* cv)
5131 #endif
5132
5133 #ifndef SVfARG
5134 #  define SVfARG(p)                      ((void*)(p))
5135 #endif
5136 #ifndef PERL_ABS
5137 #  define PERL_ABS(x)                    ((x) < 0 ? -(x) : (x))
5138 #endif
5139 #ifndef dVAR
5140 #  define dVAR                           dNOOP
5141 #endif
5142 #ifndef SVf
5143 #  define SVf                            "_"
5144 #endif
5145 #ifndef UTF8_MAXBYTES
5146 #  define UTF8_MAXBYTES                  UTF8_MAXLEN
5147 #endif
5148 #ifndef CPERLscope
5149 #  define CPERLscope(x)                  x
5150 #endif
5151 #ifndef PERL_HASH
5152 #  define PERL_HASH(hash,str,len)        \
5153      STMT_START { \
5154         const char *s_PeRlHaSh = str; \
5155         I32 i_PeRlHaSh = len; \
5156         U32 hash_PeRlHaSh = 0; \
5157         while (i_PeRlHaSh--) \
5158             hash_PeRlHaSh = hash_PeRlHaSh * 33 + *s_PeRlHaSh++; \
5159         (hash) = hash_PeRlHaSh; \
5160     } STMT_END
5161 #endif
5162
5163 #ifndef PERLIO_FUNCS_DECL
5164 # ifdef PERLIO_FUNCS_CONST
5165 #  define PERLIO_FUNCS_DECL(funcs) const PerlIO_funcs funcs
5166 #  define PERLIO_FUNCS_CAST(funcs) (PerlIO_funcs*)(funcs)
5167 # else
5168 #  define PERLIO_FUNCS_DECL(funcs) PerlIO_funcs funcs
5169 #  define PERLIO_FUNCS_CAST(funcs) (funcs)
5170 # endif
5171 #endif
5172
5173 /* provide these typedefs for older perls */
5174 #if (PERL_BCDVERSION < 0x5009003)
5175
5176 # ifdef ARGSproto
5177 typedef OP* (CPERLscope(*Perl_ppaddr_t))(ARGSproto);
5178 # else
5179 typedef OP* (CPERLscope(*Perl_ppaddr_t))(pTHX);
5180 # endif
5181
5182 typedef OP* (CPERLscope(*Perl_check_t)) (pTHX_ OP*);
5183
5184 #endif
5185 #ifndef isPSXSPC
5186 #  define isPSXSPC(c)                    (isSPACE(c) || (c) == '\v')
5187 #endif
5188
5189 #ifndef isBLANK
5190 #  define isBLANK(c)                     ((c) == ' ' || (c) == '\t')
5191 #endif
5192
5193 #ifdef EBCDIC
5194 #ifndef isALNUMC
5195 #  define isALNUMC(c)                    isalnum(c)
5196 #endif
5197
5198 #ifndef isASCII
5199 #  define isASCII(c)                     isascii(c)
5200 #endif
5201
5202 #ifndef isCNTRL
5203 #  define isCNTRL(c)                     iscntrl(c)
5204 #endif
5205
5206 #ifndef isGRAPH
5207 #  define isGRAPH(c)                     isgraph(c)
5208 #endif
5209
5210 #ifndef isPRINT
5211 #  define isPRINT(c)                     isprint(c)
5212 #endif
5213
5214 #ifndef isPUNCT
5215 #  define isPUNCT(c)                     ispunct(c)
5216 #endif
5217
5218 #ifndef isXDIGIT
5219 #  define isXDIGIT(c)                    isxdigit(c)
5220 #endif
5221
5222 #else
5223 # if (PERL_BCDVERSION < 0x5010000)
5224 /* Hint: isPRINT
5225  * The implementation in older perl versions includes all of the
5226  * isSPACE() characters, which is wrong. The version provided by
5227  * Devel::PPPort always overrides a present buggy version.
5228  */
5229 #  undef isPRINT
5230 # endif
5231 #ifndef isALNUMC
5232 #  define isALNUMC(c)                    (isALPHA(c) || isDIGIT(c))
5233 #endif
5234
5235 #ifndef isASCII
5236 #  define isASCII(c)                     ((c) <= 127)
5237 #endif
5238
5239 #ifndef isCNTRL
5240 #  define isCNTRL(c)                     ((c) < ' ' || (c) == 127)
5241 #endif
5242
5243 #ifndef isGRAPH
5244 #  define isGRAPH(c)                     (isALNUM(c) || isPUNCT(c))
5245 #endif
5246
5247 #ifndef isPRINT
5248 #  define isPRINT(c)                     (((c) >= 32 && (c) < 127))
5249 #endif
5250
5251 #ifndef isPUNCT
5252 #  define isPUNCT(c)                     (((c) >= 33 && (c) <= 47) || ((c) >= 58 && (c) <= 64)  || ((c) >= 91 && (c) <= 96) || ((c) >= 123 && (c) <= 126))
5253 #endif
5254
5255 #ifndef isXDIGIT
5256 #  define isXDIGIT(c)                    (isDIGIT(c) || ((c) >= 'a' && (c) <= 'f') || ((c) >= 'A' && (c) <= 'F'))
5257 #endif
5258
5259 #endif
5260
5261 #ifndef PERL_SIGNALS_UNSAFE_FLAG
5262
5263 #define PERL_SIGNALS_UNSAFE_FLAG 0x0001
5264
5265 #if (PERL_BCDVERSION < 0x5008000)
5266 #  define D_PPP_PERL_SIGNALS_INIT   PERL_SIGNALS_UNSAFE_FLAG
5267 #else
5268 #  define D_PPP_PERL_SIGNALS_INIT   0
5269 #endif
5270
5271 #if defined(NEED_PL_signals)
5272 static U32 DPPP_(my_PL_signals) = D_PPP_PERL_SIGNALS_INIT;
5273 #elif defined(NEED_PL_signals_GLOBAL)
5274 U32 DPPP_(my_PL_signals) = D_PPP_PERL_SIGNALS_INIT;
5275 #else
5276 extern U32 DPPP_(my_PL_signals);
5277 #endif
5278 #define PL_signals DPPP_(my_PL_signals)
5279
5280 #endif
5281
5282 /* Hint: PL_ppaddr
5283  * Calling an op via PL_ppaddr requires passing a context argument
5284  * for threaded builds. Since the context argument is different for
5285  * 5.005 perls, you can use aTHXR (supplied by ppport.h), which will
5286  * automatically be defined as the correct argument.
5287  */
5288
5289 #if (PERL_BCDVERSION <= 0x5005005)
5290 /* Replace: 1 */
5291 #  define PL_ppaddr                 ppaddr
5292 #  define PL_no_modify              no_modify
5293 /* Replace: 0 */
5294 #endif
5295
5296 #if (PERL_BCDVERSION <= 0x5004005)
5297 /* Replace: 1 */
5298 #  define PL_DBsignal               DBsignal
5299 #  define PL_DBsingle               DBsingle
5300 #  define PL_DBsub                  DBsub
5301 #  define PL_DBtrace                DBtrace
5302 #  define PL_Sv                     Sv
5303 #  define PL_bufend                 bufend
5304 #  define PL_bufptr                 bufptr
5305 #  define PL_compiling              compiling
5306 #  define PL_copline                copline
5307 #  define PL_curcop                 curcop
5308 #  define PL_curstash               curstash
5309 #  define PL_debstash               debstash
5310 #  define PL_defgv                  defgv
5311 #  define PL_diehook                diehook
5312 #  define PL_dirty                  dirty
5313 #  define PL_dowarn                 dowarn
5314 #  define PL_errgv                  errgv
5315 #  define PL_error_count            error_count
5316 #  define PL_expect                 expect
5317 #  define PL_hexdigit               hexdigit
5318 #  define PL_hints                  hints
5319 #  define PL_in_my                  in_my
5320 #  define PL_laststatval            laststatval
5321 #  define PL_lex_state              lex_state
5322 #  define PL_lex_stuff              lex_stuff
5323 #  define PL_linestr                linestr
5324 #  define PL_na                     na
5325 #  define PL_perl_destruct_level    perl_destruct_level
5326 #  define PL_perldb                 perldb
5327 #  define PL_rsfp_filters           rsfp_filters
5328 #  define PL_rsfp                   rsfp
5329 #  define PL_stack_base             stack_base
5330 #  define PL_stack_sp               stack_sp
5331 #  define PL_statcache              statcache
5332 #  define PL_stdingv                stdingv
5333 #  define PL_sv_arenaroot           sv_arenaroot
5334 #  define PL_sv_no                  sv_no
5335 #  define PL_sv_undef               sv_undef
5336 #  define PL_sv_yes                 sv_yes
5337 #  define PL_tainted                tainted
5338 #  define PL_tainting               tainting
5339 #  define PL_tokenbuf               tokenbuf
5340 /* Replace: 0 */
5341 #endif
5342
5343 /* Warning: PL_parser
5344  * For perl versions earlier than 5.9.5, this is an always
5345  * non-NULL dummy. Also, it cannot be dereferenced. Don't
5346  * use it if you can avoid is and unless you absolutely know
5347  * what you're doing.
5348  * If you always check that PL_parser is non-NULL, you can
5349  * define DPPP_PL_parser_NO_DUMMY to avoid the creation of
5350  * a dummy parser structure.
5351  */
5352
5353 #if (PERL_BCDVERSION >= 0x5009005)
5354 # ifdef DPPP_PL_parser_NO_DUMMY
5355 #  define D_PPP_my_PL_parser_var(var) ((PL_parser ? PL_parser : \
5356                 (croak("panic: PL_parser == NULL in %s:%d", \
5357                        __FILE__, __LINE__), (yy_parser *) NULL))->var)
5358 # else
5359 #  ifdef DPPP_PL_parser_NO_DUMMY_WARNING
5360 #   define D_PPP_parser_dummy_warning(var)
5361 #  else
5362 #   define D_PPP_parser_dummy_warning(var) \
5363              warn("warning: dummy PL_" #var " used in %s:%d", __FILE__, __LINE__),
5364 #  endif
5365 #  define D_PPP_my_PL_parser_var(var) ((PL_parser ? PL_parser : \
5366                 (D_PPP_parser_dummy_warning(var) &DPPP_(dummy_PL_parser)))->var)
5367 #if defined(NEED_PL_parser)
5368 static yy_parser DPPP_(dummy_PL_parser);
5369 #elif defined(NEED_PL_parser_GLOBAL)
5370 yy_parser DPPP_(dummy_PL_parser);
5371 #else
5372 extern yy_parser DPPP_(dummy_PL_parser);
5373 #endif
5374
5375 # endif
5376
5377 /* PL_expect, PL_copline, PL_rsfp, PL_rsfp_filters, PL_linestr, PL_bufptr, PL_bufend, PL_lex_state, PL_lex_stuff, PL_tokenbuf depends on PL_parser */
5378 /* Warning: PL_expect, PL_copline, PL_rsfp, PL_rsfp_filters, PL_linestr, PL_bufptr, PL_bufend, PL_lex_state, PL_lex_stuff, PL_tokenbuf
5379  * Do not use this variable unless you know exactly what you're
5380  * doint. It is internal to the perl parser and may change or even
5381  * be removed in the future. As of perl 5.9.5, you have to check
5382  * for (PL_parser != NULL) for this variable to have any effect.
5383  * An always non-NULL PL_parser dummy is provided for earlier
5384  * perl versions.
5385  * If PL_parser is NULL when you try to access this variable, a
5386  * dummy is being accessed instead and a warning is issued unless
5387  * you define DPPP_PL_parser_NO_DUMMY_WARNING.
5388  * If DPPP_PL_parser_NO_DUMMY is defined, the code trying to access
5389  * this variable will croak with a panic message.
5390  */
5391
5392 # define PL_expect         D_PPP_my_PL_parser_var(expect)
5393 # define PL_copline        D_PPP_my_PL_parser_var(copline)
5394 # define PL_rsfp           D_PPP_my_PL_parser_var(rsfp)
5395 # define PL_rsfp_filters   D_PPP_my_PL_parser_var(rsfp_filters)
5396 # define PL_linestr        D_PPP_my_PL_parser_var(linestr)
5397 # define PL_bufptr         D_PPP_my_PL_parser_var(bufptr)
5398 # define PL_bufend         D_PPP_my_PL_parser_var(bufend)
5399 # define PL_lex_state      D_PPP_my_PL_parser_var(lex_state)
5400 # define PL_lex_stuff      D_PPP_my_PL_parser_var(lex_stuff)
5401 # define PL_tokenbuf       D_PPP_my_PL_parser_var(tokenbuf)
5402 # define PL_in_my          D_PPP_my_PL_parser_var(in_my)
5403 # define PL_in_my_stash    D_PPP_my_PL_parser_var(in_my_stash)
5404 # define PL_error_count    D_PPP_my_PL_parser_var(error_count)
5405
5406
5407 #else
5408
5409 /* ensure that PL_parser != NULL and cannot be dereferenced */
5410 # define PL_parser         ((void *) 1)
5411
5412 #endif
5413 #ifndef mPUSHs
5414 #  define mPUSHs(s)                      PUSHs(sv_2mortal(s))
5415 #endif
5416
5417 #ifndef PUSHmortal
5418 #  define PUSHmortal                     PUSHs(sv_newmortal())
5419 #endif
5420
5421 #ifndef mPUSHp
5422 #  define mPUSHp(p,l)                    sv_setpvn(PUSHmortal, (p), (l))
5423 #endif
5424
5425 #ifndef mPUSHn
5426 #  define mPUSHn(n)                      sv_setnv(PUSHmortal, (NV)(n))
5427 #endif
5428
5429 #ifndef mPUSHi
5430 #  define mPUSHi(i)                      sv_setiv(PUSHmortal, (IV)(i))
5431 #endif
5432
5433 #ifndef mPUSHu
5434 #  define mPUSHu(u)                      sv_setuv(PUSHmortal, (UV)(u))
5435 #endif
5436 #ifndef mXPUSHs
5437 #  define mXPUSHs(s)                     XPUSHs(sv_2mortal(s))
5438 #endif
5439
5440 #ifndef XPUSHmortal
5441 #  define XPUSHmortal                    XPUSHs(sv_newmortal())
5442 #endif
5443
5444 #ifndef mXPUSHp
5445 #  define mXPUSHp(p,l)                   STMT_START { EXTEND(sp,1); sv_setpvn(PUSHmortal, (p), (l)); } STMT_END
5446 #endif
5447
5448 #ifndef mXPUSHn
5449 #  define mXPUSHn(n)                     STMT_START { EXTEND(sp,1); sv_setnv(PUSHmortal, (NV)(n)); } STMT_END
5450 #endif
5451
5452 #ifndef mXPUSHi
5453 #  define mXPUSHi(i)                     STMT_START { EXTEND(sp,1); sv_setiv(PUSHmortal, (IV)(i)); } STMT_END
5454 #endif
5455
5456 #ifndef mXPUSHu
5457 #  define mXPUSHu(u)                     STMT_START { EXTEND(sp,1); sv_setuv(PUSHmortal, (UV)(u)); } STMT_END
5458 #endif
5459
5460 /* Replace: 1 */
5461 #ifndef call_sv
5462 #  define call_sv                        perl_call_sv
5463 #endif
5464
5465 #ifndef call_pv
5466 #  define call_pv                        perl_call_pv
5467 #endif
5468
5469 #ifndef call_argv
5470 #  define call_argv                      perl_call_argv
5471 #endif
5472
5473 #ifndef call_method
5474 #  define call_method                    perl_call_method
5475 #endif
5476 #ifndef eval_sv
5477 #  define eval_sv                        perl_eval_sv
5478 #endif
5479
5480 /* Replace: 0 */
5481 #ifndef PERL_LOADMOD_DENY
5482 #  define PERL_LOADMOD_DENY              0x1
5483 #endif
5484
5485 #ifndef PERL_LOADMOD_NOIMPORT
5486 #  define PERL_LOADMOD_NOIMPORT          0x2
5487 #endif
5488
5489 #ifndef PERL_LOADMOD_IMPORT_OPS
5490 #  define PERL_LOADMOD_IMPORT_OPS        0x4
5491 #endif
5492
5493 #ifndef G_METHOD
5494 # define G_METHOD               64
5495 # ifdef call_sv
5496 #  undef call_sv
5497 # endif
5498 # if (PERL_BCDVERSION < 0x5006000)
5499 #  define call_sv(sv, flags)  ((flags) & G_METHOD ? perl_call_method((char *) SvPV_nolen_const(sv), \
5500                                 (flags) & ~G_METHOD) : perl_call_sv(sv, flags))
5501 # else
5502 #  define call_sv(sv, flags)  ((flags) & G_METHOD ? Perl_call_method(aTHX_ (char *) SvPV_nolen_const(sv), \
5503                                 (flags) & ~G_METHOD) : Perl_call_sv(aTHX_ sv, flags))
5504 # endif
5505 #endif
5506
5507 /* Replace perl_eval_pv with eval_pv */
5508
5509 #ifndef eval_pv
5510 #if defined(NEED_eval_pv)
5511 static SV* DPPP_(my_eval_pv)(char *p, I32 croak_on_error);
5512 static
5513 #else
5514 extern SV* DPPP_(my_eval_pv)(char *p, I32 croak_on_error);
5515 #endif
5516
5517 #ifdef eval_pv
5518 #  undef eval_pv
5519 #endif
5520 #define eval_pv(a,b) DPPP_(my_eval_pv)(aTHX_ a,b)
5521 #define Perl_eval_pv DPPP_(my_eval_pv)
5522
5523 #if defined(NEED_eval_pv) || defined(NEED_eval_pv_GLOBAL)
5524
5525 SV*
5526 DPPP_(my_eval_pv)(char *p, I32 croak_on_error)
5527 {
5528     dSP;
5529     SV* sv = newSVpv(p, 0);
5530
5531     PUSHMARK(sp);
5532     eval_sv(sv, G_SCALAR);
5533     SvREFCNT_dec(sv);
5534
5535     SPAGAIN;
5536     sv = POPs;
5537     PUTBACK;
5538
5539     if (croak_on_error && SvTRUE(GvSV(errgv)))
5540         croak(SvPVx(GvSV(errgv), na));
5541
5542     return sv;
5543 }
5544
5545 #endif
5546 #endif
5547
5548 #ifndef vload_module
5549 #if defined(NEED_vload_module)
5550 static void DPPP_(my_vload_module)(U32 flags, SV *name, SV *ver, va_list *args);
5551 static
5552 #else
5553 extern void DPPP_(my_vload_module)(U32 flags, SV *name, SV *ver, va_list *args);
5554 #endif
5555
5556 #ifdef vload_module
5557 #  undef vload_module
5558 #endif
5559 #define vload_module(a,b,c,d) DPPP_(my_vload_module)(aTHX_ a,b,c,d)
5560 #define Perl_vload_module DPPP_(my_vload_module)
5561
5562 #if defined(NEED_vload_module) || defined(NEED_vload_module_GLOBAL)
5563
5564 void
5565 DPPP_(my_vload_module)(U32 flags, SV *name, SV *ver, va_list *args)
5566 {
5567     dTHR;
5568     dVAR;
5569     OP *veop, *imop;
5570
5571     OP * const modname = newSVOP(OP_CONST, 0, name);
5572     /* 5.005 has a somewhat hacky force_normal that doesn't croak on
5573        SvREADONLY() if PL_compling is true. Current perls take care in
5574        ck_require() to correctly turn off SvREADONLY before calling
5575        force_normal_flags(). This seems a better fix than fudging PL_compling
5576      */
5577     SvREADONLY_off(((SVOP*)modname)->op_sv);
5578     modname->op_private |= OPpCONST_BARE;
5579     if (ver) {
5580         veop = newSVOP(OP_CONST, 0, ver);
5581     }
5582     else
5583         veop = NULL;
5584     if (flags & PERL_LOADMOD_NOIMPORT) {
5585         imop = sawparens(newNULLLIST());
5586     }
5587     else if (flags & PERL_LOADMOD_IMPORT_OPS) {
5588         imop = va_arg(*args, OP*);
5589     }
5590     else {
5591         SV *sv;
5592         imop = NULL;
5593         sv = va_arg(*args, SV*);
5594         while (sv) {
5595             imop = append_elem(OP_LIST, imop, newSVOP(OP_CONST, 0, sv));
5596             sv = va_arg(*args, SV*);
5597         }
5598     }
5599     {
5600         const line_t ocopline = PL_copline;
5601         COP * const ocurcop = PL_curcop;
5602         const int oexpect = PL_expect;
5603
5604 #if (PERL_BCDVERSION >= 0x5004000)
5605         utilize(!(flags & PERL_LOADMOD_DENY), start_subparse(FALSE, 0),
5606                 veop, modname, imop);
5607 #else
5608         utilize(!(flags & PERL_LOADMOD_DENY), start_subparse(),
5609                 modname, imop);
5610 #endif
5611         PL_expect = oexpect;
5612         PL_copline = ocopline;
5613         PL_curcop = ocurcop;
5614     }
5615 }
5616
5617 #endif
5618 #endif
5619
5620 #ifndef load_module
5621 #if defined(NEED_load_module)
5622 static void DPPP_(my_load_module)(U32 flags, SV *name, SV *ver, ...);
5623 static
5624 #else
5625 extern void DPPP_(my_load_module)(U32 flags, SV *name, SV *ver, ...);
5626 #endif
5627
5628 #ifdef load_module
5629 #  undef load_module
5630 #endif
5631 #define load_module DPPP_(my_load_module)
5632 #define Perl_load_module DPPP_(my_load_module)
5633
5634 #if defined(NEED_load_module) || defined(NEED_load_module_GLOBAL)
5635
5636 void
5637 DPPP_(my_load_module)(U32 flags, SV *name, SV *ver, ...)
5638 {
5639     va_list args;
5640     va_start(args, ver);
5641     vload_module(flags, name, ver, &args);
5642     va_end(args);
5643 }
5644
5645 #endif
5646 #endif
5647 #ifndef newRV_inc
5648 #  define newRV_inc(sv)                  newRV(sv)   /* Replace */
5649 #endif
5650
5651 #ifndef newRV_noinc
5652 #if defined(NEED_newRV_noinc)
5653 static SV * DPPP_(my_newRV_noinc)(SV *sv);
5654 static
5655 #else
5656 extern SV * DPPP_(my_newRV_noinc)(SV *sv);
5657 #endif
5658
5659 #ifdef newRV_noinc
5660 #  undef newRV_noinc
5661 #endif
5662 #define newRV_noinc(a) DPPP_(my_newRV_noinc)(aTHX_ a)
5663 #define Perl_newRV_noinc DPPP_(my_newRV_noinc)
5664
5665 #if defined(NEED_newRV_noinc) || defined(NEED_newRV_noinc_GLOBAL)
5666 SV *
5667 DPPP_(my_newRV_noinc)(SV *sv)
5668 {
5669   SV *rv = (SV *)newRV(sv);
5670   SvREFCNT_dec(sv);
5671   return rv;
5672 }
5673 #endif
5674 #endif
5675
5676 /* Hint: newCONSTSUB
5677  * Returns a CV* as of perl-5.7.1. This return value is not supported
5678  * by Devel::PPPort.
5679  */
5680
5681 /* newCONSTSUB from IO.xs is in the core starting with 5.004_63 */
5682 #if (PERL_BCDVERSION < 0x5004063) && (PERL_BCDVERSION != 0x5004005)
5683 #if defined(NEED_newCONSTSUB)
5684 static void DPPP_(my_newCONSTSUB)(HV *stash, const char *name, SV *sv);
5685 static
5686 #else
5687 extern void DPPP_(my_newCONSTSUB)(HV *stash, const char *name, SV *sv);
5688 #endif
5689
5690 #ifdef newCONSTSUB
5691 #  undef newCONSTSUB
5692 #endif
5693 #define newCONSTSUB(a,b,c) DPPP_(my_newCONSTSUB)(aTHX_ a,b,c)
5694 #define Perl_newCONSTSUB DPPP_(my_newCONSTSUB)
5695
5696 #if defined(NEED_newCONSTSUB) || defined(NEED_newCONSTSUB_GLOBAL)
5697
5698 /* This is just a trick to avoid a dependency of newCONSTSUB on PL_parser */
5699 /* (There's no PL_parser in perl < 5.005, so this is completely safe)     */
5700 #define D_PPP_PL_copline PL_copline
5701
5702 void
5703 DPPP_(my_newCONSTSUB)(HV *stash, const char *name, SV *sv)
5704 {
5705         U32 oldhints = PL_hints;
5706         HV *old_cop_stash = PL_curcop->cop_stash;
5707         HV *old_curstash = PL_curstash;
5708         line_t oldline = PL_curcop->cop_line;
5709         PL_curcop->cop_line = D_PPP_PL_copline;
5710
5711         PL_hints &= ~HINT_BLOCK_SCOPE;
5712         if (stash)
5713                 PL_curstash = PL_curcop->cop_stash = stash;
5714
5715         newSUB(
5716
5717 #if   (PERL_BCDVERSION < 0x5003022)
5718                 start_subparse(),
5719 #elif (PERL_BCDVERSION == 0x5003022)
5720                 start_subparse(0),
5721 #else  /* 5.003_23  onwards */
5722                 start_subparse(FALSE, 0),
5723 #endif
5724
5725                 newSVOP(OP_CONST, 0, newSVpv((char *) name, 0)),
5726                 newSVOP(OP_CONST, 0, &PL_sv_no),   /* SvPV(&PL_sv_no) == "" -- GMB */
5727                 newSTATEOP(0, Nullch, newSVOP(OP_CONST, 0, sv))
5728         );
5729
5730         PL_hints = oldhints;
5731         PL_curcop->cop_stash = old_cop_stash;
5732         PL_curstash = old_curstash;
5733         PL_curcop->cop_line = oldline;
5734 }
5735 #endif
5736 #endif
5737
5738 /*
5739  * Boilerplate macros for initializing and accessing interpreter-local
5740  * data from C.  All statics in extensions should be reworked to use
5741  * this, if you want to make the extension thread-safe.  See ext/re/re.xs
5742  * for an example of the use of these macros.
5743  *
5744  * Code that uses these macros is responsible for the following:
5745  * 1. #define MY_CXT_KEY to a unique string, e.g. "DynaLoader_guts"
5746  * 2. Declare a typedef named my_cxt_t that is a structure that contains
5747  *    all the data that needs to be interpreter-local.
5748  * 3. Use the START_MY_CXT macro after the declaration of my_cxt_t.
5749  * 4. Use the MY_CXT_INIT macro such that it is called exactly once
5750  *    (typically put in the BOOT: section).
5751  * 5. Use the members of the my_cxt_t structure everywhere as
5752  *    MY_CXT.member.
5753  * 6. Use the dMY_CXT macro (a declaration) in all the functions that
5754  *    access MY_CXT.
5755  */
5756
5757 #if defined(MULTIPLICITY) || defined(PERL_OBJECT) || \
5758     defined(PERL_CAPI)    || defined(PERL_IMPLICIT_CONTEXT)
5759
5760 #ifndef START_MY_CXT
5761
5762 /* This must appear in all extensions that define a my_cxt_t structure,
5763  * right after the definition (i.e. at file scope).  The non-threads
5764  * case below uses it to declare the data as static. */
5765 #define START_MY_CXT
5766
5767 #if (PERL_BCDVERSION < 0x5004068)
5768 /* Fetches the SV that keeps the per-interpreter data. */
5769 #define dMY_CXT_SV \
5770         SV *my_cxt_sv = get_sv(MY_CXT_KEY, FALSE)
5771 #else /* >= perl5.004_68 */
5772 #define dMY_CXT_SV \
5773         SV *my_cxt_sv = *hv_fetch(PL_modglobal, MY_CXT_KEY,             \
5774                                   sizeof(MY_CXT_KEY)-1, TRUE)
5775 #endif /* < perl5.004_68 */
5776
5777 /* This declaration should be used within all functions that use the
5778  * interpreter-local data. */
5779 #define dMY_CXT \
5780         dMY_CXT_SV;                                                     \
5781         my_cxt_t *my_cxtp = INT2PTR(my_cxt_t*,SvUV(my_cxt_sv))
5782
5783 /* Creates and zeroes the per-interpreter data.
5784  * (We allocate my_cxtp in a Perl SV so that it will be released when
5785  * the interpreter goes away.) */
5786 #define MY_CXT_INIT \
5787         dMY_CXT_SV;                                                     \
5788         /* newSV() allocates one more than needed */                    \
5789         my_cxt_t *my_cxtp = (my_cxt_t*)SvPVX(newSV(sizeof(my_cxt_t)-1));\
5790         Zero(my_cxtp, 1, my_cxt_t);                                     \
5791         sv_setuv(my_cxt_sv, PTR2UV(my_cxtp))
5792
5793 /* This macro must be used to access members of the my_cxt_t structure.
5794  * e.g. MYCXT.some_data */
5795 #define MY_CXT          (*my_cxtp)
5796
5797 /* Judicious use of these macros can reduce the number of times dMY_CXT
5798  * is used.  Use is similar to pTHX, aTHX etc. */
5799 #define pMY_CXT         my_cxt_t *my_cxtp
5800 #define pMY_CXT_        pMY_CXT,
5801 #define _pMY_CXT        ,pMY_CXT
5802 #define aMY_CXT         my_cxtp
5803 #define aMY_CXT_        aMY_CXT,
5804 #define _aMY_CXT        ,aMY_CXT
5805
5806 #endif /* START_MY_CXT */
5807
5808 #ifndef MY_CXT_CLONE
5809 /* Clones the per-interpreter data. */
5810 #define MY_CXT_CLONE \
5811         dMY_CXT_SV;                                                     \
5812         my_cxt_t *my_cxtp = (my_cxt_t*)SvPVX(newSV(sizeof(my_cxt_t)-1));\
5813         Copy(INT2PTR(my_cxt_t*, SvUV(my_cxt_sv)), my_cxtp, 1, my_cxt_t);\
5814         sv_setuv(my_cxt_sv, PTR2UV(my_cxtp))
5815 #endif
5816
5817 #else /* single interpreter */
5818
5819 #ifndef START_MY_CXT
5820
5821 #define START_MY_CXT    static my_cxt_t my_cxt;
5822 #define dMY_CXT_SV      dNOOP
5823 #define dMY_CXT         dNOOP
5824 #define MY_CXT_INIT     NOOP
5825 #define MY_CXT          my_cxt
5826
5827 #define pMY_CXT         void
5828 #define pMY_CXT_
5829 #define _pMY_CXT
5830 #define aMY_CXT
5831 #define aMY_CXT_
5832 #define _aMY_CXT
5833
5834 #endif /* START_MY_CXT */
5835
5836 #ifndef MY_CXT_CLONE
5837 #define MY_CXT_CLONE    NOOP
5838 #endif
5839
5840 #endif
5841
5842 #ifndef IVdf
5843 #  if IVSIZE == LONGSIZE
5844 #    define     IVdf      "ld"
5845 #    define     UVuf      "lu"
5846 #    define     UVof      "lo"
5847 #    define     UVxf      "lx"
5848 #    define     UVXf      "lX"
5849 #  else
5850 #    if IVSIZE == INTSIZE
5851 #      define   IVdf      "d"
5852 #      define   UVuf      "u"
5853 #      define   UVof      "o"
5854 #      define   UVxf      "x"
5855 #      define   UVXf      "X"
5856 #    endif
5857 #  endif
5858 #endif
5859
5860 #ifndef NVef
5861 #  if defined(USE_LONG_DOUBLE) && defined(HAS_LONG_DOUBLE) && \
5862       defined(PERL_PRIfldbl) && (PERL_BCDVERSION != 0x5006000)
5863             /* Not very likely, but let's try anyway. */
5864 #    define NVef          PERL_PRIeldbl
5865 #    define NVff          PERL_PRIfldbl
5866 #    define NVgf          PERL_PRIgldbl
5867 #  else
5868 #    define NVef          "e"
5869 #    define NVff          "f"
5870 #    define NVgf          "g"
5871 #  endif
5872 #endif
5873
5874 #ifndef SvREFCNT_inc
5875 #  ifdef PERL_USE_GCC_BRACE_GROUPS
5876 #    define SvREFCNT_inc(sv)            \
5877       ({                                \
5878           SV * const _sv = (SV*)(sv);   \
5879           if (_sv)                      \
5880                (SvREFCNT(_sv))++;       \
5881           _sv;                          \
5882       })
5883 #  else
5884 #    define SvREFCNT_inc(sv)    \
5885           ((PL_Sv=(SV*)(sv)) ? (++(SvREFCNT(PL_Sv)),PL_Sv) : NULL)
5886 #  endif
5887 #endif
5888
5889 #ifndef SvREFCNT_inc_simple
5890 #  ifdef PERL_USE_GCC_BRACE_GROUPS
5891 #    define SvREFCNT_inc_simple(sv)     \
5892       ({                                        \
5893           if (sv)                               \
5894                (SvREFCNT(sv))++;                \
5895           (SV *)(sv);                           \
5896       })
5897 #  else
5898 #    define SvREFCNT_inc_simple(sv) \
5899           ((sv) ? (SvREFCNT(sv)++,(SV*)(sv)) : NULL)
5900 #  endif
5901 #endif
5902
5903 #ifndef SvREFCNT_inc_NN
5904 #  ifdef PERL_USE_GCC_BRACE_GROUPS
5905 #    define SvREFCNT_inc_NN(sv)         \
5906       ({                                        \
5907           SV * const _sv = (SV*)(sv);   \
5908           SvREFCNT(_sv)++;              \
5909           _sv;                          \
5910       })
5911 #  else
5912 #    define SvREFCNT_inc_NN(sv) \
5913           (PL_Sv=(SV*)(sv),++(SvREFCNT(PL_Sv)),PL_Sv)
5914 #  endif
5915 #endif
5916
5917 #ifndef SvREFCNT_inc_void
5918 #  ifdef PERL_USE_GCC_BRACE_GROUPS
5919 #    define SvREFCNT_inc_void(sv)               \
5920       ({                                        \
5921           SV * const _sv = (SV*)(sv);   \
5922           if (_sv)                      \
5923               (void)(SvREFCNT(_sv)++);  \
5924       })
5925 #  else
5926 #    define SvREFCNT_inc_void(sv) \
5927           (void)((PL_Sv=(SV*)(sv)) ? ++(SvREFCNT(PL_Sv)) : 0)
5928 #  endif
5929 #endif
5930 #ifndef SvREFCNT_inc_simple_void
5931 #  define SvREFCNT_inc_simple_void(sv)   STMT_START { if (sv) SvREFCNT(sv)++; } STMT_END
5932 #endif
5933
5934 #ifndef SvREFCNT_inc_simple_NN
5935 #  define SvREFCNT_inc_simple_NN(sv)     (++SvREFCNT(sv), (SV*)(sv))
5936 #endif
5937
5938 #ifndef SvREFCNT_inc_void_NN
5939 #  define SvREFCNT_inc_void_NN(sv)       (void)(++SvREFCNT((SV*)(sv)))
5940 #endif
5941
5942 #ifndef SvREFCNT_inc_simple_void_NN
5943 #  define SvREFCNT_inc_simple_void_NN(sv) (void)(++SvREFCNT((SV*)(sv)))
5944 #endif
5945
5946 #ifndef newSV_type
5947
5948 #if defined(NEED_newSV_type)
5949 static SV* DPPP_(my_newSV_type)(pTHX_ svtype const t);
5950 static
5951 #else
5952 extern SV* DPPP_(my_newSV_type)(pTHX_ svtype const t);
5953 #endif
5954
5955 #ifdef newSV_type
5956 #  undef newSV_type
5957 #endif
5958 #define newSV_type(a) DPPP_(my_newSV_type)(aTHX_ a)
5959 #define Perl_newSV_type DPPP_(my_newSV_type)
5960
5961 #if defined(NEED_newSV_type) || defined(NEED_newSV_type_GLOBAL)
5962
5963 SV*
5964 DPPP_(my_newSV_type)(pTHX_ svtype const t)
5965 {
5966   SV* const sv = newSV(0);
5967   sv_upgrade(sv, t);
5968   return sv;
5969 }
5970
5971 #endif
5972
5973 #endif
5974
5975 #if (PERL_BCDVERSION < 0x5006000)
5976 # define D_PPP_CONSTPV_ARG(x)  ((char *) (x))
5977 #else
5978 # define D_PPP_CONSTPV_ARG(x)  (x)
5979 #endif
5980 #ifndef newSVpvn
5981 #  define newSVpvn(data,len)             ((data)                                              \
5982                                     ? ((len) ? newSVpv((data), (len)) : newSVpv("", 0)) \
5983                                     : newSV(0))
5984 #endif
5985 #ifndef newSVpvn_utf8
5986 #  define newSVpvn_utf8(s, len, u)       newSVpvn_flags((s), (len), (u) ? SVf_UTF8 : 0)
5987 #endif
5988 #ifndef SVf_UTF8
5989 #  define SVf_UTF8                       0
5990 #endif
5991
5992 #ifndef newSVpvn_flags
5993
5994 #if defined(NEED_newSVpvn_flags)
5995 static SV * DPPP_(my_newSVpvn_flags)(pTHX_ const char *s, STRLEN len, U32 flags);
5996 static
5997 #else
5998 extern SV * DPPP_(my_newSVpvn_flags)(pTHX_ const char *s, STRLEN len, U32 flags);
5999 #endif
6000
6001 #ifdef newSVpvn_flags
6002 #  undef newSVpvn_flags
6003 #endif
6004 #define newSVpvn_flags(a,b,c) DPPP_(my_newSVpvn_flags)(aTHX_ a,b,c)
6005 #define Perl_newSVpvn_flags DPPP_(my_newSVpvn_flags)
6006
6007 #if defined(NEED_newSVpvn_flags) || defined(NEED_newSVpvn_flags_GLOBAL)
6008
6009 SV *
6010 DPPP_(my_newSVpvn_flags)(pTHX_ const char *s, STRLEN len, U32 flags)
6011 {
6012   SV *sv = newSVpvn(D_PPP_CONSTPV_ARG(s), len);
6013   SvFLAGS(sv) |= (flags & SVf_UTF8);
6014   return (flags & SVs_TEMP) ? sv_2mortal(sv) : sv;
6015 }
6016
6017 #endif
6018
6019 #endif
6020
6021 /* Backwards compatibility stuff... :-( */
6022 #if !defined(NEED_sv_2pv_flags) && defined(NEED_sv_2pv_nolen)
6023 #  define NEED_sv_2pv_flags
6024 #endif
6025 #if !defined(NEED_sv_2pv_flags_GLOBAL) && defined(NEED_sv_2pv_nolen_GLOBAL)
6026 #  define NEED_sv_2pv_flags_GLOBAL
6027 #endif
6028
6029 /* Hint: sv_2pv_nolen
6030  * Use the SvPV_nolen() or SvPV_nolen_const() macros instead of sv_2pv_nolen().
6031  */
6032 #ifndef sv_2pv_nolen
6033 #  define sv_2pv_nolen(sv)               SvPV_nolen(sv)
6034 #endif
6035
6036 #ifdef SvPVbyte
6037
6038 /* Hint: SvPVbyte
6039  * Does not work in perl-5.6.1, ppport.h implements a version
6040  * borrowed from perl-5.7.3.
6041  */
6042
6043 #if (PERL_BCDVERSION < 0x5007000)
6044
6045 #if defined(NEED_sv_2pvbyte)
6046 static char * DPPP_(my_sv_2pvbyte)(pTHX_ SV *sv, STRLEN *lp);
6047 static
6048 #else
6049 extern char * DPPP_(my_sv_2pvbyte)(pTHX_ SV *sv, STRLEN *lp);
6050 #endif
6051
6052 #ifdef sv_2pvbyte
6053 #  undef sv_2pvbyte
6054 #endif
6055 #define sv_2pvbyte(a,b) DPPP_(my_sv_2pvbyte)(aTHX_ a,b)
6056 #define Perl_sv_2pvbyte DPPP_(my_sv_2pvbyte)
6057
6058 #if defined(NEED_sv_2pvbyte) || defined(NEED_sv_2pvbyte_GLOBAL)
6059
6060 char *
6061 DPPP_(my_sv_2pvbyte)(pTHX_ SV *sv, STRLEN *lp)
6062 {
6063   sv_utf8_downgrade(sv,0);
6064   return SvPV(sv,*lp);
6065 }
6066
6067 #endif
6068
6069 /* Hint: sv_2pvbyte
6070  * Use the SvPVbyte() macro instead of sv_2pvbyte().
6071  */
6072
6073 #undef SvPVbyte
6074
6075 #define SvPVbyte(sv, lp)                                                \
6076         ((SvFLAGS(sv) & (SVf_POK|SVf_UTF8)) == (SVf_POK)                \
6077          ? ((lp = SvCUR(sv)), SvPVX(sv)) : sv_2pvbyte(sv, &lp))
6078
6079 #endif
6080
6081 #else
6082
6083 #  define SvPVbyte          SvPV
6084 #  define sv_2pvbyte        sv_2pv
6085
6086 #endif
6087 #ifndef sv_2pvbyte_nolen
6088 #  define sv_2pvbyte_nolen(sv)           sv_2pv_nolen(sv)
6089 #endif
6090
6091 /* Hint: sv_pvn
6092  * Always use the SvPV() macro instead of sv_pvn().
6093  */
6094
6095 /* Hint: sv_pvn_force
6096  * Always use the SvPV_force() macro instead of sv_pvn_force().
6097  */
6098
6099 /* If these are undefined, they're not handled by the core anyway */
6100 #ifndef SV_IMMEDIATE_UNREF
6101 #  define SV_IMMEDIATE_UNREF             0
6102 #endif
6103
6104 #ifndef SV_GMAGIC
6105 #  define SV_GMAGIC                      0
6106 #endif
6107
6108 #ifndef SV_COW_DROP_PV
6109 #  define SV_COW_DROP_PV                 0
6110 #endif
6111
6112 #ifndef SV_UTF8_NO_ENCODING
6113 #  define SV_UTF8_NO_ENCODING            0
6114 #endif
6115
6116 #ifndef SV_NOSTEAL
6117 #  define SV_NOSTEAL                     0
6118 #endif
6119
6120 #ifndef SV_CONST_RETURN
6121 #  define SV_CONST_RETURN                0
6122 #endif
6123
6124 #ifndef SV_MUTABLE_RETURN
6125 #  define SV_MUTABLE_RETURN              0
6126 #endif
6127
6128 #ifndef SV_SMAGIC
6129 #  define SV_SMAGIC                      0
6130 #endif
6131
6132 #ifndef SV_HAS_TRAILING_NUL
6133 #  define SV_HAS_TRAILING_NUL            0
6134 #endif
6135
6136 #ifndef SV_COW_SHARED_HASH_KEYS
6137 #  define SV_COW_SHARED_HASH_KEYS        0
6138 #endif
6139
6140 #if (PERL_BCDVERSION < 0x5007002)
6141
6142 #if defined(NEED_sv_2pv_flags)
6143 static char * DPPP_(my_sv_2pv_flags)(pTHX_ SV *sv, STRLEN *lp, I32 flags);
6144 static
6145 #else
6146 extern char * DPPP_(my_sv_2pv_flags)(pTHX_ SV *sv, STRLEN *lp, I32 flags);
6147 #endif
6148
6149 #ifdef sv_2pv_flags
6150 #  undef sv_2pv_flags
6151 #endif
6152 #define sv_2pv_flags(a,b,c) DPPP_(my_sv_2pv_flags)(aTHX_ a,b,c)
6153 #define Perl_sv_2pv_flags DPPP_(my_sv_2pv_flags)
6154
6155 #if defined(NEED_sv_2pv_flags) || defined(NEED_sv_2pv_flags_GLOBAL)
6156
6157 char *
6158 DPPP_(my_sv_2pv_flags)(pTHX_ SV *sv, STRLEN *lp, I32 flags)
6159 {
6160   STRLEN n_a = (STRLEN) flags;
6161   return sv_2pv(sv, lp ? lp : &n_a);
6162 }
6163
6164 #endif
6165
6166 #if defined(NEED_sv_pvn_force_flags)
6167 static char * DPPP_(my_sv_pvn_force_flags)(pTHX_ SV *sv, STRLEN *lp, I32 flags);
6168 static
6169 #else
6170 extern char * DPPP_(my_sv_pvn_force_flags)(pTHX_ SV *sv, STRLEN *lp, I32 flags);
6171 #endif
6172
6173 #ifdef sv_pvn_force_flags
6174 #  undef sv_pvn_force_flags
6175 #endif
6176 #define sv_pvn_force_flags(a,b,c) DPPP_(my_sv_pvn_force_flags)(aTHX_ a,b,c)
6177 #define Perl_sv_pvn_force_flags DPPP_(my_sv_pvn_force_flags)
6178
6179 #if defined(NEED_sv_pvn_force_flags) || defined(NEED_sv_pvn_force_flags_GLOBAL)
6180
6181 char *
6182 DPPP_(my_sv_pvn_force_flags)(pTHX_ SV *sv, STRLEN *lp, I32 flags)
6183 {
6184   STRLEN n_a = (STRLEN) flags;
6185   return sv_pvn_force(sv, lp ? lp : &n_a);
6186 }
6187
6188 #endif
6189
6190 #endif
6191
6192 #if (PERL_BCDVERSION < 0x5008008) || ( (PERL_BCDVERSION >= 0x5009000) && (PERL_BCDVERSION < 0x5009003) )
6193 # define DPPP_SVPV_NOLEN_LP_ARG &PL_na
6194 #else
6195 # define DPPP_SVPV_NOLEN_LP_ARG 0
6196 #endif
6197 #ifndef SvPV_const
6198 #  define SvPV_const(sv, lp)             SvPV_flags_const(sv, lp, SV_GMAGIC)
6199 #endif
6200
6201 #ifndef SvPV_mutable
6202 #  define SvPV_mutable(sv, lp)           SvPV_flags_mutable(sv, lp, SV_GMAGIC)
6203 #endif
6204 #ifndef SvPV_flags
6205 #  define SvPV_flags(sv, lp, flags)      \
6206                  ((SvFLAGS(sv) & (SVf_POK)) == SVf_POK \
6207                   ? ((lp = SvCUR(sv)), SvPVX(sv)) : sv_2pv_flags(sv, &lp, flags))
6208 #endif
6209 #ifndef SvPV_flags_const
6210 #  define SvPV_flags_const(sv, lp, flags) \
6211                  ((SvFLAGS(sv) & (SVf_POK)) == SVf_POK \
6212                   ? ((lp = SvCUR(sv)), SvPVX_const(sv)) : \
6213                   (const char*) sv_2pv_flags(sv, &lp, flags|SV_CONST_RETURN))
6214 #endif
6215 #ifndef SvPV_flags_const_nolen
6216 #  define SvPV_flags_const_nolen(sv, flags) \
6217                  ((SvFLAGS(sv) & (SVf_POK)) == SVf_POK \
6218                   ? SvPVX_const(sv) : \
6219                   (const char*) sv_2pv_flags(sv, DPPP_SVPV_NOLEN_LP_ARG, flags|SV_CONST_RETURN))
6220 #endif
6221 #ifndef SvPV_flags_mutable
6222 #  define SvPV_flags_mutable(sv, lp, flags) \
6223                  ((SvFLAGS(sv) & (SVf_POK)) == SVf_POK \
6224                   ? ((lp = SvCUR(sv)), SvPVX_mutable(sv)) : \
6225                   sv_2pv_flags(sv, &lp, flags|SV_MUTABLE_RETURN))
6226 #endif
6227 #ifndef SvPV_force
6228 #  define SvPV_force(sv, lp)             SvPV_force_flags(sv, lp, SV_GMAGIC)
6229 #endif
6230
6231 #ifndef SvPV_force_nolen
6232 #  define SvPV_force_nolen(sv)           SvPV_force_flags_nolen(sv, SV_GMAGIC)
6233 #endif
6234
6235 #ifndef SvPV_force_mutable
6236 #  define SvPV_force_mutable(sv, lp)     SvPV_force_flags_mutable(sv, lp, SV_GMAGIC)
6237 #endif
6238
6239 #ifndef SvPV_force_nomg
6240 #  define SvPV_force_nomg(sv, lp)        SvPV_force_flags(sv, lp, 0)
6241 #endif
6242
6243 #ifndef SvPV_force_nomg_nolen
6244 #  define SvPV_force_nomg_nolen(sv)      SvPV_force_flags_nolen(sv, 0)
6245 #endif
6246 #ifndef SvPV_force_flags
6247 #  define SvPV_force_flags(sv, lp, flags) \
6248                  ((SvFLAGS(sv) & (SVf_POK|SVf_THINKFIRST)) == SVf_POK \
6249                  ? ((lp = SvCUR(sv)), SvPVX(sv)) : sv_pvn_force_flags(sv, &lp, flags))
6250 #endif
6251 #ifndef SvPV_force_flags_nolen
6252 #  define SvPV_force_flags_nolen(sv, flags) \
6253                  ((SvFLAGS(sv) & (SVf_POK|SVf_THINKFIRST)) == SVf_POK \
6254                  ? SvPVX(sv) : sv_pvn_force_flags(sv, DPPP_SVPV_NOLEN_LP_ARG, flags))
6255 #endif
6256 #ifndef SvPV_force_flags_mutable
6257 #  define SvPV_force_flags_mutable(sv, lp, flags) \
6258                  ((SvFLAGS(sv) & (SVf_POK|SVf_THINKFIRST)) == SVf_POK \
6259                  ? ((lp = SvCUR(sv)), SvPVX_mutable(sv)) \
6260                   : sv_pvn_force_flags(sv, &lp, flags|SV_MUTABLE_RETURN))
6261 #endif
6262 #ifndef SvPV_nolen
6263 #  define SvPV_nolen(sv)                 \
6264                  ((SvFLAGS(sv) & (SVf_POK)) == SVf_POK \
6265                   ? SvPVX(sv) : sv_2pv_flags(sv, DPPP_SVPV_NOLEN_LP_ARG, SV_GMAGIC))
6266 #endif
6267 #ifndef SvPV_nolen_const
6268 #  define SvPV_nolen_const(sv)           \
6269                  ((SvFLAGS(sv) & (SVf_POK)) == SVf_POK \
6270                   ? SvPVX_const(sv) : sv_2pv_flags(sv, DPPP_SVPV_NOLEN_LP_ARG, SV_GMAGIC|SV_CONST_RETURN))
6271 #endif
6272 #ifndef SvPV_nomg
6273 #  define SvPV_nomg(sv, lp)              SvPV_flags(sv, lp, 0)
6274 #endif
6275
6276 #ifndef SvPV_nomg_const
6277 #  define SvPV_nomg_const(sv, lp)        SvPV_flags_const(sv, lp, 0)
6278 #endif
6279
6280 #ifndef SvPV_nomg_const_nolen
6281 #  define SvPV_nomg_const_nolen(sv)      SvPV_flags_const_nolen(sv, 0)
6282 #endif
6283 #ifndef SvPV_renew
6284 #  define SvPV_renew(sv,n)               STMT_START { SvLEN_set(sv, n); \
6285                  SvPV_set((sv), (char *) saferealloc(          \
6286                        (Malloc_t)SvPVX(sv), (MEM_SIZE)((n)))); \
6287                } STMT_END
6288 #endif
6289 #ifndef SvMAGIC_set
6290 #  define SvMAGIC_set(sv, val)           \
6291                 STMT_START { assert(SvTYPE(sv) >= SVt_PVMG); \
6292                 (((XPVMG*) SvANY(sv))->xmg_magic = (val)); } STMT_END
6293 #endif
6294
6295 #if (PERL_BCDVERSION < 0x5009003)
6296 #ifndef SvPVX_const
6297 #  define SvPVX_const(sv)                ((const char*) (0 + SvPVX(sv)))
6298 #endif
6299
6300 #ifndef SvPVX_mutable
6301 #  define SvPVX_mutable(sv)              (0 + SvPVX(sv))
6302 #endif
6303 #ifndef SvRV_set
6304 #  define SvRV_set(sv, val)              \
6305                 STMT_START { assert(SvTYPE(sv) >=  SVt_RV); \
6306                 (((XRV*) SvANY(sv))->xrv_rv = (val)); } STMT_END
6307 #endif
6308
6309 #else
6310 #ifndef SvPVX_const
6311 #  define SvPVX_const(sv)                ((const char*)((sv)->sv_u.svu_pv))
6312 #endif
6313
6314 #ifndef SvPVX_mutable
6315 #  define SvPVX_mutable(sv)              ((sv)->sv_u.svu_pv)
6316 #endif
6317 #ifndef SvRV_set
6318 #  define SvRV_set(sv, val)              \
6319                 STMT_START { assert(SvTYPE(sv) >=  SVt_RV); \
6320                 ((sv)->sv_u.svu_rv = (val)); } STMT_END
6321 #endif
6322
6323 #endif
6324 #ifndef SvSTASH_set
6325 #  define SvSTASH_set(sv, val)           \
6326                 STMT_START { assert(SvTYPE(sv) >= SVt_PVMG); \
6327                 (((XPVMG*) SvANY(sv))->xmg_stash = (val)); } STMT_END
6328 #endif
6329
6330 #if (PERL_BCDVERSION < 0x5004000)
6331 #ifndef SvUV_set
6332 #  define SvUV_set(sv, val)              \
6333                 STMT_START { assert(SvTYPE(sv) == SVt_IV || SvTYPE(sv) >= SVt_PVIV); \
6334                 (((XPVIV*) SvANY(sv))->xiv_iv = (IV) (val)); } STMT_END
6335 #endif
6336
6337 #else
6338 #ifndef SvUV_set
6339 #  define SvUV_set(sv, val)              \
6340                 STMT_START { assert(SvTYPE(sv) == SVt_IV || SvTYPE(sv) >= SVt_PVIV); \
6341                 (((XPVUV*) SvANY(sv))->xuv_uv = (val)); } STMT_END
6342 #endif
6343
6344 #endif
6345
6346 #if (PERL_BCDVERSION >= 0x5004000) && !defined(vnewSVpvf)
6347 #if defined(NEED_vnewSVpvf)
6348 static SV * DPPP_(my_vnewSVpvf)(pTHX_ const char *pat, va_list *args);
6349 static
6350 #else
6351 extern SV * DPPP_(my_vnewSVpvf)(pTHX_ const char *pat, va_list *args);
6352 #endif
6353
6354 #ifdef vnewSVpvf
6355 #  undef vnewSVpvf
6356 #endif
6357 #define vnewSVpvf(a,b) DPPP_(my_vnewSVpvf)(aTHX_ a,b)
6358 #define Perl_vnewSVpvf DPPP_(my_vnewSVpvf)
6359
6360 #if defined(NEED_vnewSVpvf) || defined(NEED_vnewSVpvf_GLOBAL)
6361
6362 SV *
6363 DPPP_(my_vnewSVpvf)(pTHX_ const char *pat, va_list *args)
6364 {
6365   register SV *sv = newSV(0);
6366   sv_vsetpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*));
6367   return sv;
6368 }
6369
6370 #endif
6371 #endif
6372
6373 #if (PERL_BCDVERSION >= 0x5004000) && !defined(sv_vcatpvf)
6374 #  define sv_vcatpvf(sv, pat, args)  sv_vcatpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*))
6375 #endif
6376
6377 #if (PERL_BCDVERSION >= 0x5004000) && !defined(sv_vsetpvf)
6378 #  define sv_vsetpvf(sv, pat, args)  sv_vsetpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*))
6379 #endif
6380
6381 #if (PERL_BCDVERSION >= 0x5004000) && !defined(sv_catpvf_mg)
6382 #if defined(NEED_sv_catpvf_mg)
6383 static void DPPP_(my_sv_catpvf_mg)(pTHX_ SV *sv, const char *pat, ...);
6384 static
6385 #else
6386 extern void DPPP_(my_sv_catpvf_mg)(pTHX_ SV *sv, const char *pat, ...);
6387 #endif
6388
6389 #define Perl_sv_catpvf_mg DPPP_(my_sv_catpvf_mg)
6390
6391 #if defined(NEED_sv_catpvf_mg) || defined(NEED_sv_catpvf_mg_GLOBAL)
6392
6393 void
6394 DPPP_(my_sv_catpvf_mg)(pTHX_ SV *sv, const char *pat, ...)
6395 {
6396   va_list args;
6397   va_start(args, pat);
6398   sv_vcatpvfn(sv, pat, strlen(pat), &args, Null(SV**), 0, Null(bool*));
6399   SvSETMAGIC(sv);
6400   va_end(args);
6401 }
6402
6403 #endif
6404 #endif
6405
6406 #ifdef PERL_IMPLICIT_CONTEXT
6407 #if (PERL_BCDVERSION >= 0x5004000) && !defined(sv_catpvf_mg_nocontext)
6408 #if defined(NEED_sv_catpvf_mg_nocontext)
6409 static void DPPP_(my_sv_catpvf_mg_nocontext)(SV *sv, const char *pat, ...);
6410 static
6411 #else
6412 extern void DPPP_(my_sv_catpvf_mg_nocontext)(SV *sv, const char *pat, ...);
6413 #endif
6414
6415 #define sv_catpvf_mg_nocontext DPPP_(my_sv_catpvf_mg_nocontext)
6416 #define Perl_sv_catpvf_mg_nocontext DPPP_(my_sv_catpvf_mg_nocontext)
6417
6418 #if defined(NEED_sv_catpvf_mg_nocontext) || defined(NEED_sv_catpvf_mg_nocontext_GLOBAL)
6419
6420 void
6421 DPPP_(my_sv_catpvf_mg_nocontext)(SV *sv, const char *pat, ...)
6422 {
6423   dTHX;
6424   va_list args;
6425   va_start(args, pat);
6426   sv_vcatpvfn(sv, pat, strlen(pat), &args, Null(SV**), 0, Null(bool*));
6427   SvSETMAGIC(sv);
6428   va_end(args);
6429 }
6430
6431 #endif
6432 #endif
6433 #endif
6434
6435 /* sv_catpvf_mg depends on sv_catpvf_mg_nocontext */
6436 #ifndef sv_catpvf_mg
6437 #  ifdef PERL_IMPLICIT_CONTEXT
6438 #    define sv_catpvf_mg   Perl_sv_catpvf_mg_nocontext
6439 #  else
6440 #    define sv_catpvf_mg   Perl_sv_catpvf_mg
6441 #  endif
6442 #endif
6443
6444 #if (PERL_BCDVERSION >= 0x5004000) && !defined(sv_vcatpvf_mg)
6445 #  define sv_vcatpvf_mg(sv, pat, args)                                     \
6446    STMT_START {                                                            \
6447      sv_vcatpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*));  \
6448      SvSETMAGIC(sv);                                                       \
6449    } STMT_END
6450 #endif
6451
6452 #if (PERL_BCDVERSION >= 0x5004000) && !defined(sv_setpvf_mg)
6453 #if defined(NEED_sv_setpvf_mg)
6454 static void DPPP_(my_sv_setpvf_mg)(pTHX_ SV *sv, const char *pat, ...);
6455 static
6456 #else
6457 extern void DPPP_(my_sv_setpvf_mg)(pTHX_ SV *sv, const char *pat, ...);
6458 #endif
6459
6460 #define Perl_sv_setpvf_mg DPPP_(my_sv_setpvf_mg)
6461
6462 #if defined(NEED_sv_setpvf_mg) || defined(NEED_sv_setpvf_mg_GLOBAL)
6463
6464 void
6465 DPPP_(my_sv_setpvf_mg)(pTHX_ SV *sv, const char *pat, ...)
6466 {
6467   va_list args;
6468   va_start(args, pat);
6469   sv_vsetpvfn(sv, pat, strlen(pat), &args, Null(SV**), 0, Null(bool*));
6470   SvSETMAGIC(sv);
6471   va_end(args);
6472 }
6473
6474 #endif
6475 #endif
6476
6477 #ifdef PERL_IMPLICIT_CONTEXT
6478 #if (PERL_BCDVERSION >= 0x5004000) && !defined(sv_setpvf_mg_nocontext)
6479 #if defined(NEED_sv_setpvf_mg_nocontext)
6480 static void DPPP_(my_sv_setpvf_mg_nocontext)(SV *sv, const char *pat, ...);
6481 static
6482 #else
6483 extern void DPPP_(my_sv_setpvf_mg_nocontext)(SV *sv, const char *pat, ...);
6484 #endif
6485
6486 #define sv_setpvf_mg_nocontext DPPP_(my_sv_setpvf_mg_nocontext)
6487 #define Perl_sv_setpvf_mg_nocontext DPPP_(my_sv_setpvf_mg_nocontext)
6488
6489 #if defined(NEED_sv_setpvf_mg_nocontext) || defined(NEED_sv_setpvf_mg_nocontext_GLOBAL)
6490
6491 void
6492 DPPP_(my_sv_setpvf_mg_nocontext)(SV *sv, const char *pat, ...)
6493 {
6494   dTHX;
6495   va_list args;
6496   va_start(args, pat);
6497   sv_vsetpvfn(sv, pat, strlen(pat), &args, Null(SV**), 0, Null(bool*));
6498   SvSETMAGIC(sv);
6499   va_end(args);
6500 }
6501
6502 #endif
6503 #endif
6504 #endif
6505
6506 /* sv_setpvf_mg depends on sv_setpvf_mg_nocontext */
6507 #ifndef sv_setpvf_mg
6508 #  ifdef PERL_IMPLICIT_CONTEXT
6509 #    define sv_setpvf_mg   Perl_sv_setpvf_mg_nocontext
6510 #  else
6511 #    define sv_setpvf_mg   Perl_sv_setpvf_mg
6512 #  endif
6513 #endif
6514
6515 #if (PERL_BCDVERSION >= 0x5004000) && !defined(sv_vsetpvf_mg)
6516 #  define sv_vsetpvf_mg(sv, pat, args)                                     \
6517    STMT_START {                                                            \
6518      sv_vsetpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*));  \
6519      SvSETMAGIC(sv);                                                       \
6520    } STMT_END
6521 #endif
6522
6523 #ifndef newSVpvn_share
6524
6525 #if defined(NEED_newSVpvn_share)
6526 static SV * DPPP_(my_newSVpvn_share)(pTHX_ const char *src, I32 len, U32 hash);
6527 static
6528 #else
6529 extern SV * DPPP_(my_newSVpvn_share)(pTHX_ const char *src, I32 len, U32 hash);
6530 #endif
6531
6532 #ifdef newSVpvn_share
6533 #  undef newSVpvn_share
6534 #endif
6535 #define newSVpvn_share(a,b,c) DPPP_(my_newSVpvn_share)(aTHX_ a,b,c)
6536 #define Perl_newSVpvn_share DPPP_(my_newSVpvn_share)
6537
6538 #if defined(NEED_newSVpvn_share) || defined(NEED_newSVpvn_share_GLOBAL)
6539
6540 SV *
6541 DPPP_(my_newSVpvn_share)(pTHX_ const char *src, I32 len, U32 hash)
6542 {
6543   SV *sv;
6544   if (len < 0)
6545     len = -len;
6546   if (!hash)
6547     PERL_HASH(hash, (char*) src, len);
6548   sv = newSVpvn((char *) src, len);
6549   sv_upgrade(sv, SVt_PVIV);
6550   SvIVX(sv) = hash;
6551   SvREADONLY_on(sv);
6552   SvPOK_on(sv);
6553   return sv;
6554 }
6555
6556 #endif
6557
6558 #endif
6559 #ifndef SvSHARED_HASH
6560 #  define SvSHARED_HASH(sv)              (0 + SvUVX(sv))
6561 #endif
6562 #ifndef HvNAME_get
6563 #  define HvNAME_get(hv)                 HvNAME(hv)
6564 #endif
6565 #ifndef HvNAMELEN_get
6566 #  define HvNAMELEN_get(hv)              (HvNAME_get(hv) ? (I32)strlen(HvNAME_get(hv)) : 0)
6567 #endif
6568 #ifndef GvSVn
6569 #  define GvSVn(gv)                      GvSV(gv)
6570 #endif
6571
6572 #ifndef isGV_with_GP
6573 #  define isGV_with_GP(gv)               isGV(gv)
6574 #endif
6575 #ifndef WARN_ALL
6576 #  define WARN_ALL                       0
6577 #endif
6578
6579 #ifndef WARN_CLOSURE
6580 #  define WARN_CLOSURE                   1
6581 #endif
6582
6583 #ifndef WARN_DEPRECATED
6584 #  define WARN_DEPRECATED                2
6585 #endif
6586
6587 #ifndef WARN_EXITING
6588 #  define WARN_EXITING                   3
6589 #endif
6590
6591 #ifndef WARN_GLOB
6592 #  define WARN_GLOB                      4
6593 #endif
6594
6595 #ifndef WARN_IO
6596 #  define WARN_IO                        5
6597 #endif
6598
6599 #ifndef WARN_CLOSED
6600 #  define WARN_CLOSED                    6
6601 #endif
6602
6603 #ifndef WARN_EXEC
6604 #  define WARN_EXEC                      7
6605 #endif
6606
6607 #ifndef WARN_LAYER
6608 #  define WARN_LAYER                     8
6609 #endif
6610
6611 #ifndef WARN_NEWLINE
6612 #  define WARN_NEWLINE                   9
6613 #endif
6614
6615 #ifndef WARN_PIPE
6616 #  define WARN_PIPE                      10
6617 #endif
6618
6619 #ifndef WARN_UNOPENED
6620 #  define WARN_UNOPENED                  11
6621 #endif
6622
6623 #ifndef WARN_MISC
6624 #  define WARN_MISC                      12
6625 #endif
6626
6627 #ifndef WARN_NUMERIC
6628 #  define WARN_NUMERIC                   13
6629 #endif
6630
6631 #ifndef WARN_ONCE
6632 #  define WARN_ONCE                      14
6633 #endif
6634
6635 #ifndef WARN_OVERFLOW
6636 #  define WARN_OVERFLOW                  15
6637 #endif
6638
6639 #ifndef WARN_PACK
6640 #  define WARN_PACK                      16
6641 #endif
6642
6643 #ifndef WARN_PORTABLE
6644 #  define WARN_PORTABLE                  17
6645 #endif
6646
6647 #ifndef WARN_RECURSION
6648 #  define WARN_RECURSION                 18
6649 #endif
6650
6651 #ifndef WARN_REDEFINE
6652 #  define WARN_REDEFINE                  19
6653 #endif
6654
6655 #ifndef WARN_REGEXP
6656 #  define WARN_REGEXP                    20
6657 #endif
6658
6659 #ifndef WARN_SEVERE
6660 #  define WARN_SEVERE                    21
6661 #endif
6662
6663 #ifndef WARN_DEBUGGING
6664 #  define WARN_DEBUGGING                 22
6665 #endif
6666
6667 #ifndef WARN_INPLACE
6668 #  define WARN_INPLACE                   23
6669 #endif
6670
6671 #ifndef WARN_INTERNAL
6672 #  define WARN_INTERNAL                  24
6673 #endif
6674
6675 #ifndef WARN_MALLOC
6676 #  define WARN_MALLOC                    25
6677 #endif
6678
6679 #ifndef WARN_SIGNAL
6680 #  define WARN_SIGNAL                    26
6681 #endif
6682
6683 #ifndef WARN_SUBSTR
6684 #  define WARN_SUBSTR                    27
6685 #endif
6686
6687 #ifndef WARN_SYNTAX
6688 #  define WARN_SYNTAX                    28
6689 #endif
6690
6691 #ifndef WARN_AMBIGUOUS
6692 #  define WARN_AMBIGUOUS                 29
6693 #endif
6694
6695 #ifndef WARN_BAREWORD
6696 #  define WARN_BAREWORD                  30
6697 #endif
6698
6699 #ifndef WARN_DIGIT
6700 #  define WARN_DIGIT                     31
6701 #endif
6702
6703 #ifndef WARN_PARENTHESIS
6704 #  define WARN_PARENTHESIS               32
6705 #endif
6706
6707 #ifndef WARN_PRECEDENCE
6708 #  define WARN_PRECEDENCE                33
6709 #endif
6710
6711 #ifndef WARN_PRINTF
6712 #  define WARN_PRINTF                    34
6713 #endif
6714
6715 #ifndef WARN_PROTOTYPE
6716 #  define WARN_PROTOTYPE                 35
6717 #endif
6718
6719 #ifndef WARN_QW
6720 #  define WARN_QW                        36
6721 #endif
6722
6723 #ifndef WARN_RESERVED
6724 #  define WARN_RESERVED                  37
6725 #endif
6726
6727 #ifndef WARN_SEMICOLON
6728 #  define WARN_SEMICOLON                 38
6729 #endif
6730
6731 #ifndef WARN_TAINT
6732 #  define WARN_TAINT                     39
6733 #endif
6734
6735 #ifndef WARN_THREADS
6736 #  define WARN_THREADS                   40
6737 #endif
6738
6739 #ifndef WARN_UNINITIALIZED
6740 #  define WARN_UNINITIALIZED             41
6741 #endif
6742
6743 #ifndef WARN_UNPACK
6744 #  define WARN_UNPACK                    42
6745 #endif
6746
6747 #ifndef WARN_UNTIE
6748 #  define WARN_UNTIE                     43
6749 #endif
6750
6751 #ifndef WARN_UTF8
6752 #  define WARN_UTF8                      44
6753 #endif
6754
6755 #ifndef WARN_VOID
6756 #  define WARN_VOID                      45
6757 #endif
6758
6759 #ifndef WARN_ASSERTIONS
6760 #  define WARN_ASSERTIONS                46
6761 #endif
6762 #ifndef packWARN
6763 #  define packWARN(a)                    (a)
6764 #endif
6765
6766 #ifndef ckWARN
6767 #  ifdef G_WARN_ON
6768 #    define  ckWARN(a)                  (PL_dowarn & G_WARN_ON)
6769 #  else
6770 #    define  ckWARN(a)                  PL_dowarn
6771 #  endif
6772 #endif
6773
6774 #if (PERL_BCDVERSION >= 0x5004000) && !defined(warner)
6775 #if defined(NEED_warner)
6776 static void DPPP_(my_warner)(U32 err, const char *pat, ...);
6777 static
6778 #else
6779 extern void DPPP_(my_warner)(U32 err, const char *pat, ...);
6780 #endif
6781
6782 #define Perl_warner DPPP_(my_warner)
6783
6784 #if defined(NEED_warner) || defined(NEED_warner_GLOBAL)
6785
6786 void
6787 DPPP_(my_warner)(U32 err, const char *pat, ...)
6788 {
6789   SV *sv;
6790   va_list args;
6791
6792   PERL_UNUSED_ARG(err);
6793
6794   va_start(args, pat);
6795   sv = vnewSVpvf(pat, &args);
6796   va_end(args);
6797   sv_2mortal(sv);
6798   warn("%s", SvPV_nolen(sv));
6799 }
6800
6801 #define warner  Perl_warner
6802
6803 #define Perl_warner_nocontext  Perl_warner
6804
6805 #endif
6806 #endif
6807
6808 /* concatenating with "" ensures that only literal strings are accepted as argument
6809  * note that STR_WITH_LEN() can't be used as argument to macros or functions that
6810  * under some configurations might be macros
6811  */
6812 #ifndef STR_WITH_LEN
6813 #  define STR_WITH_LEN(s)                (s ""), (sizeof(s)-1)
6814 #endif
6815 #ifndef newSVpvs
6816 #  define newSVpvs(str)                  newSVpvn(str "", sizeof(str) - 1)
6817 #endif
6818
6819 #ifndef newSVpvs_flags
6820 #  define newSVpvs_flags(str, flags)     newSVpvn_flags(str "", sizeof(str) - 1, flags)
6821 #endif
6822
6823 #ifndef sv_catpvs
6824 #  define sv_catpvs(sv, str)             sv_catpvn(sv, str "", sizeof(str) - 1)
6825 #endif
6826
6827 #ifndef sv_setpvs
6828 #  define sv_setpvs(sv, str)             sv_setpvn(sv, str "", sizeof(str) - 1)
6829 #endif
6830
6831 #ifndef hv_fetchs
6832 #  define hv_fetchs(hv, key, lval)       hv_fetch(hv, key "", sizeof(key) - 1, lval)
6833 #endif
6834
6835 #ifndef hv_stores
6836 #  define hv_stores(hv, key, val)        hv_store(hv, key "", sizeof(key) - 1, val, 0)
6837 #endif
6838 #ifndef gv_fetchpvn_flags
6839 #  define gv_fetchpvn_flags(name, len, flags, svt) gv_fetchpv(name, flags, svt)
6840 #endif
6841
6842 #ifndef gv_fetchpvs
6843 #  define gv_fetchpvs(name, flags, svt)  gv_fetchpvn_flags(name "", sizeof(name) - 1, flags, svt)
6844 #endif
6845
6846 #ifndef gv_stashpvs
6847 #  define gv_stashpvs(name, flags)       gv_stashpvn(name "", sizeof(name) - 1, flags)
6848 #endif
6849 #ifndef SvGETMAGIC
6850 #  define SvGETMAGIC(x)                  STMT_START { if (SvGMAGICAL(x)) mg_get(x); } STMT_END
6851 #endif
6852 #ifndef PERL_MAGIC_sv
6853 #  define PERL_MAGIC_sv                  '\0'
6854 #endif
6855
6856 #ifndef PERL_MAGIC_overload
6857 #  define PERL_MAGIC_overload            'A'
6858 #endif
6859
6860 #ifndef PERL_MAGIC_overload_elem
6861 #  define PERL_MAGIC_overload_elem       'a'
6862 #endif
6863
6864 #ifndef PERL_MAGIC_overload_table
6865 #  define PERL_MAGIC_overload_table      'c'
6866 #endif
6867
6868 #ifndef PERL_MAGIC_bm
6869 #  define PERL_MAGIC_bm                  'B'
6870 #endif
6871
6872 #ifndef PERL_MAGIC_regdata
6873 #  define PERL_MAGIC_regdata             'D'
6874 #endif
6875
6876 #ifndef PERL_MAGIC_regdatum
6877 #  define PERL_MAGIC_regdatum            'd'
6878 #endif
6879
6880 #ifndef PERL_MAGIC_env
6881 #  define PERL_MAGIC_env                 'E'
6882 #endif
6883
6884 #ifndef PERL_MAGIC_envelem
6885 #  define PERL_MAGIC_envelem             'e'
6886 #endif
6887
6888 #ifndef PERL_MAGIC_fm
6889 #  define PERL_MAGIC_fm                  'f'
6890 #endif
6891
6892 #ifndef PERL_MAGIC_regex_global
6893 #  define PERL_MAGIC_regex_global        'g'
6894 #endif
6895
6896 #ifndef PERL_MAGIC_isa
6897 #  define PERL_MAGIC_isa                 'I'
6898 #endif
6899
6900 #ifndef PERL_MAGIC_isaelem
6901 #  define PERL_MAGIC_isaelem             'i'
6902 #endif
6903
6904 #ifndef PERL_MAGIC_nkeys
6905 #  define PERL_MAGIC_nkeys               'k'
6906 #endif
6907
6908 #ifndef PERL_MAGIC_dbfile
6909 #  define PERL_MAGIC_dbfile              'L'
6910 #endif
6911
6912 #ifndef PERL_MAGIC_dbline
6913 #  define PERL_MAGIC_dbline              'l'
6914 #endif
6915
6916 #ifndef PERL_MAGIC_mutex
6917 #  define PERL_MAGIC_mutex               'm'
6918 #endif
6919
6920 #ifndef PERL_MAGIC_shared
6921 #  define PERL_MAGIC_shared              'N'
6922 #endif
6923
6924 #ifndef PERL_MAGIC_shared_scalar
6925 #  define PERL_MAGIC_shared_scalar       'n'
6926 #endif
6927
6928 #ifndef PERL_MAGIC_collxfrm
6929 #  define PERL_MAGIC_collxfrm            'o'
6930 #endif
6931
6932 #ifndef PERL_MAGIC_tied
6933 #  define PERL_MAGIC_tied                'P'
6934 #endif
6935
6936 #ifndef PERL_MAGIC_tiedelem
6937 #  define PERL_MAGIC_tiedelem            'p'
6938 #endif
6939
6940 #ifndef PERL_MAGIC_tiedscalar
6941 #  define PERL_MAGIC_tiedscalar          'q'
6942 #endif
6943
6944 #ifndef PERL_MAGIC_qr
6945 #  define PERL_MAGIC_qr                  'r'
6946 #endif
6947
6948 #ifndef PERL_MAGIC_sig
6949 #  define PERL_MAGIC_sig                 'S'
6950 #endif
6951
6952 #ifndef PERL_MAGIC_sigelem
6953 #  define PERL_MAGIC_sigelem             's'
6954 #endif
6955
6956 #ifndef PERL_MAGIC_taint
6957 #  define PERL_MAGIC_taint               't'
6958 #endif
6959
6960 #ifndef PERL_MAGIC_uvar
6961 #  define PERL_MAGIC_uvar                'U'
6962 #endif
6963
6964 #ifndef PERL_MAGIC_uvar_elem
6965 #  define PERL_MAGIC_uvar_elem           'u'
6966 #endif
6967
6968 #ifndef PERL_MAGIC_vstring
6969 #  define PERL_MAGIC_vstring             'V'
6970 #endif
6971
6972 #ifndef PERL_MAGIC_vec
6973 #  define PERL_MAGIC_vec                 'v'
6974 #endif
6975
6976 #ifndef PERL_MAGIC_utf8
6977 #  define PERL_MAGIC_utf8                'w'
6978 #endif
6979
6980 #ifndef PERL_MAGIC_substr
6981 #  define PERL_MAGIC_substr              'x'
6982 #endif
6983
6984 #ifndef PERL_MAGIC_defelem
6985 #  define PERL_MAGIC_defelem             'y'
6986 #endif
6987
6988 #ifndef PERL_MAGIC_glob
6989 #  define PERL_MAGIC_glob                '*'
6990 #endif
6991
6992 #ifndef PERL_MAGIC_arylen
6993 #  define PERL_MAGIC_arylen              '#'
6994 #endif
6995
6996 #ifndef PERL_MAGIC_pos
6997 #  define PERL_MAGIC_pos                 '.'
6998 #endif
6999
7000 #ifndef PERL_MAGIC_backref
7001 #  define PERL_MAGIC_backref             '<'
7002 #endif
7003
7004 #ifndef PERL_MAGIC_ext
7005 #  define PERL_MAGIC_ext                 '~'
7006 #endif
7007
7008 /* That's the best we can do... */
7009 #ifndef sv_catpvn_nomg
7010 #  define sv_catpvn_nomg                 sv_catpvn
7011 #endif
7012
7013 #ifndef sv_catsv_nomg
7014 #  define sv_catsv_nomg                  sv_catsv
7015 #endif
7016
7017 #ifndef sv_setsv_nomg
7018 #  define sv_setsv_nomg                  sv_setsv
7019 #endif
7020
7021 #ifndef sv_pvn_nomg
7022 #  define sv_pvn_nomg                    sv_pvn
7023 #endif
7024
7025 #ifndef SvIV_nomg
7026 #  define SvIV_nomg                      SvIV
7027 #endif
7028
7029 #ifndef SvUV_nomg
7030 #  define SvUV_nomg                      SvUV
7031 #endif
7032
7033 #ifndef sv_catpv_mg
7034 #  define sv_catpv_mg(sv, ptr)          \
7035    STMT_START {                         \
7036      SV *TeMpSv = sv;                   \
7037      sv_catpv(TeMpSv,ptr);              \
7038      SvSETMAGIC(TeMpSv);                \
7039    } STMT_END
7040 #endif
7041
7042 #ifndef sv_catpvn_mg
7043 #  define sv_catpvn_mg(sv, ptr, len)    \
7044    STMT_START {                         \
7045      SV *TeMpSv = sv;                   \
7046      sv_catpvn(TeMpSv,ptr,len);         \
7047      SvSETMAGIC(TeMpSv);                \
7048    } STMT_END
7049 #endif
7050
7051 #ifndef sv_catsv_mg
7052 #  define sv_catsv_mg(dsv, ssv)         \
7053    STMT_START {                         \
7054      SV *TeMpSv = dsv;                  \
7055      sv_catsv(TeMpSv,ssv);              \
7056      SvSETMAGIC(TeMpSv);                \
7057    } STMT_END
7058 #endif
7059
7060 #ifndef sv_setiv_mg
7061 #  define sv_setiv_mg(sv, i)            \
7062    STMT_START {                         \
7063      SV *TeMpSv = sv;                   \
7064      sv_setiv(TeMpSv,i);                \
7065      SvSETMAGIC(TeMpSv);                \
7066    } STMT_END
7067 #endif
7068
7069 #ifndef sv_setnv_mg
7070 #  define sv_setnv_mg(sv, num)          \
7071    STMT_START {                         \
7072      SV *TeMpSv = sv;                   \
7073      sv_setnv(TeMpSv,num);              \
7074      SvSETMAGIC(TeMpSv);                \
7075    } STMT_END
7076 #endif
7077
7078 #ifndef sv_setpv_mg
7079 #  define sv_setpv_mg(sv, ptr)          \
7080    STMT_START {                         \
7081      SV *TeMpSv = sv;                   \
7082      sv_setpv(TeMpSv,ptr);              \
7083      SvSETMAGIC(TeMpSv);                \
7084    } STMT_END
7085 #endif
7086
7087 #ifndef sv_setpvn_mg
7088 #  define sv_setpvn_mg(sv, ptr, len)    \
7089    STMT_START {                         \
7090      SV *TeMpSv = sv;                   \
7091      sv_setpvn(TeMpSv,ptr,len);         \
7092      SvSETMAGIC(TeMpSv);                \
7093    } STMT_END
7094 #endif
7095
7096 #ifndef sv_setsv_mg
7097 #  define sv_setsv_mg(dsv, ssv)         \
7098    STMT_START {                         \
7099      SV *TeMpSv = dsv;                  \
7100      sv_setsv(TeMpSv,ssv);              \
7101      SvSETMAGIC(TeMpSv);                \
7102    } STMT_END
7103 #endif
7104
7105 #ifndef sv_setuv_mg
7106 #  define sv_setuv_mg(sv, i)            \
7107    STMT_START {                         \
7108      SV *TeMpSv = sv;                   \
7109      sv_setuv(TeMpSv,i);                \
7110      SvSETMAGIC(TeMpSv);                \
7111    } STMT_END
7112 #endif
7113
7114 #ifndef sv_usepvn_mg
7115 #  define sv_usepvn_mg(sv, ptr, len)    \
7116    STMT_START {                         \
7117      SV *TeMpSv = sv;                   \
7118      sv_usepvn(TeMpSv,ptr,len);         \
7119      SvSETMAGIC(TeMpSv);                \
7120    } STMT_END
7121 #endif
7122 #ifndef SvVSTRING_mg
7123 #  define SvVSTRING_mg(sv)               (SvMAGICAL(sv) ? mg_find(sv, PERL_MAGIC_vstring) : NULL)
7124 #endif
7125
7126 /* Hint: sv_magic_portable
7127  * This is a compatibility function that is only available with
7128  * Devel::PPPort. It is NOT in the perl core.
7129  * Its purpose is to mimic the 5.8.0 behaviour of sv_magic() when
7130  * it is being passed a name pointer with namlen == 0. In that
7131  * case, perl 5.8.0 and later store the pointer, not a copy of it.
7132  * The compatibility can be provided back to perl 5.004. With
7133  * earlier versions, the code will not compile.
7134  */
7135
7136 #if (PERL_BCDVERSION < 0x5004000)
7137
7138   /* code that uses sv_magic_portable will not compile */
7139
7140 #elif (PERL_BCDVERSION < 0x5008000)
7141
7142 #  define sv_magic_portable(sv, obj, how, name, namlen)     \
7143    STMT_START {                                             \
7144      SV *SvMp_sv = (sv);                                    \
7145      char *SvMp_name = (char *) (name);                     \
7146      I32 SvMp_namlen = (namlen);                            \
7147      if (SvMp_name && SvMp_namlen == 0)                     \
7148      {                                                      \
7149        MAGIC *mg;                                           \
7150        sv_magic(SvMp_sv, obj, how, 0, 0);                   \
7151        mg = SvMAGIC(SvMp_sv);                               \
7152        mg->mg_len = -42; /* XXX: this is the tricky part */ \
7153        mg->mg_ptr = SvMp_name;                              \
7154      }                                                      \
7155      else                                                   \
7156      {                                                      \
7157        sv_magic(SvMp_sv, obj, how, SvMp_name, SvMp_namlen); \
7158      }                                                      \
7159    } STMT_END
7160
7161 #else
7162
7163 #  define sv_magic_portable(a, b, c, d, e)  sv_magic(a, b, c, d, e)
7164
7165 #endif
7166
7167 #ifdef USE_ITHREADS
7168 #ifndef CopFILE
7169 #  define CopFILE(c)                     ((c)->cop_file)
7170 #endif
7171
7172 #ifndef CopFILEGV
7173 #  define CopFILEGV(c)                   (CopFILE(c) ? gv_fetchfile(CopFILE(c)) : Nullgv)
7174 #endif
7175
7176 #ifndef CopFILE_set
7177 #  define CopFILE_set(c,pv)              ((c)->cop_file = savepv(pv))
7178 #endif
7179
7180 #ifndef CopFILESV
7181 #  define CopFILESV(c)                   (CopFILE(c) ? GvSV(gv_fetchfile(CopFILE(c))) : Nullsv)
7182 #endif
7183
7184 #ifndef CopFILEAV
7185 #  define CopFILEAV(c)                   (CopFILE(c) ? GvAV(gv_fetchfile(CopFILE(c))) : Nullav)
7186 #endif
7187
7188 #ifndef CopSTASHPV
7189 #  define CopSTASHPV(c)                  ((c)->cop_stashpv)
7190 #endif
7191
7192 #ifndef CopSTASHPV_set
7193 #  define CopSTASHPV_set(c,pv)           ((c)->cop_stashpv = ((pv) ? savepv(pv) : Nullch))
7194 #endif
7195
7196 #ifndef CopSTASH
7197 #  define CopSTASH(c)                    (CopSTASHPV(c) ? gv_stashpv(CopSTASHPV(c),GV_ADD) : Nullhv)
7198 #endif
7199
7200 #ifndef CopSTASH_set
7201 #  define CopSTASH_set(c,hv)             CopSTASHPV_set(c, (hv) ? HvNAME(hv) : Nullch)
7202 #endif
7203
7204 #ifndef CopSTASH_eq
7205 #  define CopSTASH_eq(c,hv)              ((hv) && (CopSTASHPV(c) == HvNAME(hv) \
7206                                         || (CopSTASHPV(c) && HvNAME(hv) \
7207                                         && strEQ(CopSTASHPV(c), HvNAME(hv)))))
7208 #endif
7209
7210 #else
7211 #ifndef CopFILEGV
7212 #  define CopFILEGV(c)                   ((c)->cop_filegv)
7213 #endif
7214
7215 #ifndef CopFILEGV_set
7216 #  define CopFILEGV_set(c,gv)            ((c)->cop_filegv = (GV*)SvREFCNT_inc(gv))
7217 #endif
7218
7219 #ifndef CopFILE_set
7220 #  define CopFILE_set(c,pv)              CopFILEGV_set((c), gv_fetchfile(pv))
7221 #endif
7222
7223 #ifndef CopFILESV
7224 #  define CopFILESV(c)                   (CopFILEGV(c) ? GvSV(CopFILEGV(c)) : Nullsv)
7225 #endif
7226
7227 #ifndef CopFILEAV
7228 #  define CopFILEAV(c)                   (CopFILEGV(c) ? GvAV(CopFILEGV(c)) : Nullav)
7229 #endif
7230
7231 #ifndef CopFILE
7232 #  define CopFILE(c)                     (CopFILESV(c) ? SvPVX(CopFILESV(c)) : Nullch)
7233 #endif
7234
7235 #ifndef CopSTASH
7236 #  define CopSTASH(c)                    ((c)->cop_stash)
7237 #endif
7238
7239 #ifndef CopSTASH_set
7240 #  define CopSTASH_set(c,hv)             ((c)->cop_stash = (hv))
7241 #endif
7242
7243 #ifndef CopSTASHPV
7244 #  define CopSTASHPV(c)                  (CopSTASH(c) ? HvNAME(CopSTASH(c)) : Nullch)
7245 #endif
7246
7247 #ifndef CopSTASHPV_set
7248 #  define CopSTASHPV_set(c,pv)           CopSTASH_set((c), gv_stashpv(pv,GV_ADD))
7249 #endif
7250
7251 #ifndef CopSTASH_eq
7252 #  define CopSTASH_eq(c,hv)              (CopSTASH(c) == (hv))
7253 #endif
7254
7255 #endif /* USE_ITHREADS */
7256 #ifndef IN_PERL_COMPILETIME
7257 #  define IN_PERL_COMPILETIME            (PL_curcop == &PL_compiling)
7258 #endif
7259
7260 #ifndef IN_LOCALE_RUNTIME
7261 #  define IN_LOCALE_RUNTIME              (PL_curcop->op_private & HINT_LOCALE)
7262 #endif
7263
7264 #ifndef IN_LOCALE_COMPILETIME
7265 #  define IN_LOCALE_COMPILETIME          (PL_hints & HINT_LOCALE)
7266 #endif
7267
7268 #ifndef IN_LOCALE
7269 #  define IN_LOCALE                      (IN_PERL_COMPILETIME ? IN_LOCALE_COMPILETIME : IN_LOCALE_RUNTIME)
7270 #endif
7271 #ifndef IS_NUMBER_IN_UV
7272 #  define IS_NUMBER_IN_UV                0x01
7273 #endif
7274
7275 #ifndef IS_NUMBER_GREATER_THAN_UV_MAX
7276 #  define IS_NUMBER_GREATER_THAN_UV_MAX  0x02
7277 #endif
7278
7279 #ifndef IS_NUMBER_NOT_INT
7280 #  define IS_NUMBER_NOT_INT              0x04
7281 #endif
7282
7283 #ifndef IS_NUMBER_NEG
7284 #  define IS_NUMBER_NEG                  0x08
7285 #endif
7286
7287 #ifndef IS_NUMBER_INFINITY
7288 #  define IS_NUMBER_INFINITY             0x10
7289 #endif
7290
7291 #ifndef IS_NUMBER_NAN
7292 #  define IS_NUMBER_NAN                  0x20
7293 #endif
7294 #ifndef GROK_NUMERIC_RADIX
7295 #  define GROK_NUMERIC_RADIX(sp, send)   grok_numeric_radix(sp, send)
7296 #endif
7297 #ifndef PERL_SCAN_GREATER_THAN_UV_MAX
7298 #  define PERL_SCAN_GREATER_THAN_UV_MAX  0x02
7299 #endif
7300
7301 #ifndef PERL_SCAN_SILENT_ILLDIGIT
7302 #  define PERL_SCAN_SILENT_ILLDIGIT      0x04
7303 #endif
7304
7305 #ifndef PERL_SCAN_ALLOW_UNDERSCORES
7306 #  define PERL_SCAN_ALLOW_UNDERSCORES    0x01
7307 #endif
7308
7309 #ifndef PERL_SCAN_DISALLOW_PREFIX
7310 #  define PERL_SCAN_DISALLOW_PREFIX      0x02
7311 #endif
7312
7313 #ifndef grok_numeric_radix
7314 #if defined(NEED_grok_numeric_radix)
7315 static bool DPPP_(my_grok_numeric_radix)(pTHX_ const char ** sp, const char * send);
7316 static
7317 #else
7318 extern bool DPPP_(my_grok_numeric_radix)(pTHX_ const char ** sp, const char * send);
7319 #endif
7320
7321 #ifdef grok_numeric_radix
7322 #  undef grok_numeric_radix
7323 #endif
7324 #define grok_numeric_radix(a,b) DPPP_(my_grok_numeric_radix)(aTHX_ a,b)
7325 #define Perl_grok_numeric_radix DPPP_(my_grok_numeric_radix)
7326
7327 #if defined(NEED_grok_numeric_radix) || defined(NEED_grok_numeric_radix_GLOBAL)
7328 bool
7329 DPPP_(my_grok_numeric_radix)(pTHX_ const char **sp, const char *send)
7330 {
7331 #ifdef USE_LOCALE_NUMERIC
7332 #ifdef PL_numeric_radix_sv
7333     if (PL_numeric_radix_sv && IN_LOCALE) {
7334         STRLEN len;
7335         char* radix = SvPV(PL_numeric_radix_sv, len);
7336         if (*sp + len <= send && memEQ(*sp, radix, len)) {
7337             *sp += len;
7338             return TRUE;
7339         }
7340     }
7341 #else
7342     /* older perls don't have PL_numeric_radix_sv so the radix
7343      * must manually be requested from locale.h
7344      */
7345 #include <locale.h>
7346     dTHR;  /* needed for older threaded perls */
7347     struct lconv *lc = localeconv();
7348     char *radix = lc->decimal_point;
7349     if (radix && IN_LOCALE) {
7350         STRLEN len = strlen(radix);
7351         if (*sp + len <= send && memEQ(*sp, radix, len)) {
7352             *sp += len;
7353             return TRUE;
7354         }
7355     }
7356 #endif
7357 #endif /* USE_LOCALE_NUMERIC */
7358     /* always try "." if numeric radix didn't match because
7359      * we may have data from different locales mixed */
7360     if (*sp < send && **sp == '.') {
7361         ++*sp;
7362         return TRUE;
7363     }
7364     return FALSE;
7365 }
7366 #endif
7367 #endif
7368
7369 #ifndef grok_number
7370 #if defined(NEED_grok_number)
7371 static int DPPP_(my_grok_number)(pTHX_ const char * pv, STRLEN len, UV * valuep);
7372 static
7373 #else
7374 extern int DPPP_(my_grok_number)(pTHX_ const char * pv, STRLEN len, UV * valuep);
7375 #endif
7376
7377 #ifdef grok_number
7378 #  undef grok_number
7379 #endif
7380 #define grok_number(a,b,c) DPPP_(my_grok_number)(aTHX_ a,b,c)
7381 #define Perl_grok_number DPPP_(my_grok_number)
7382
7383 #if defined(NEED_grok_number) || defined(NEED_grok_number_GLOBAL)
7384 int
7385 DPPP_(my_grok_number)(pTHX_ const char *pv, STRLEN len, UV *valuep)
7386 {
7387   const char *s = pv;
7388   const char *send = pv + len;
7389   const UV max_div_10 = UV_MAX / 10;
7390   const char max_mod_10 = UV_MAX % 10;
7391   int numtype = 0;
7392   int sawinf = 0;
7393   int sawnan = 0;
7394
7395   while (s < send && isSPACE(*s))
7396     s++;
7397   if (s == send) {
7398     return 0;
7399   } else if (*s == '-') {
7400     s++;
7401     numtype = IS_NUMBER_NEG;
7402   }
7403   else if (*s == '+')
7404   s++;
7405
7406   if (s == send)
7407     return 0;
7408
7409   /* next must be digit or the radix separator or beginning of infinity */
7410   if (isDIGIT(*s)) {
7411     /* UVs are at least 32 bits, so the first 9 decimal digits cannot
7412        overflow.  */
7413     UV value = *s - '0';
7414     /* This construction seems to be more optimiser friendly.
7415        (without it gcc does the isDIGIT test and the *s - '0' separately)
7416        With it gcc on arm is managing 6 instructions (6 cycles) per digit.
7417        In theory the optimiser could deduce how far to unroll the loop
7418        before checking for overflow.  */
7419     if (++s < send) {
7420       int digit = *s - '0';
7421       if (digit >= 0 && digit <= 9) {
7422         value = value * 10 + digit;
7423         if (++s < send) {
7424           digit = *s - '0';
7425           if (digit >= 0 && digit <= 9) {
7426             value = value * 10 + digit;
7427             if (++s < send) {
7428               digit = *s - '0';
7429               if (digit >= 0 && digit <= 9) {
7430                 value = value * 10 + digit;
7431                 if (++s < send) {
7432                   digit = *s - '0';
7433                   if (digit >= 0 && digit <= 9) {
7434                     value = value * 10 + digit;
7435                     if (++s < send) {
7436                       digit = *s - '0';
7437                       if (digit >= 0 && digit <= 9) {
7438                         value = value * 10 + digit;
7439                         if (++s < send) {
7440                           digit = *s - '0';
7441                           if (digit >= 0 && digit <= 9) {
7442                             value = value * 10 + digit;
7443                             if (++s < send) {
7444                               digit = *s - '0';
7445                               if (digit >= 0 && digit <= 9) {
7446                                 value = value * 10 + digit;
7447                                 if (++s < send) {
7448                                   digit = *s - '0';
7449                                   if (digit >= 0 && digit <= 9) {
7450                                     value = value * 10 + digit;
7451                                     if (++s < send) {
7452                                       /* Now got 9 digits, so need to check
7453                                          each time for overflow.  */
7454                                       digit = *s - '0';
7455                                       while (digit >= 0 && digit <= 9
7456                                              && (value < max_div_10
7457                                                  || (value == max_div_10
7458                                                      && digit <= max_mod_10))) {
7459                                         value = value * 10 + digit;
7460                                         if (++s < send)
7461                                           digit = *s - '0';
7462                                         else
7463                                           break;
7464                                       }
7465                                       if (digit >= 0 && digit <= 9
7466                                           && (s < send)) {
7467                                         /* value overflowed.
7468                                            skip the remaining digits, don't
7469                                            worry about setting *valuep.  */
7470                                         do {
7471                                           s++;
7472                                         } while (s < send && isDIGIT(*s));
7473                                         numtype |=
7474                                           IS_NUMBER_GREATER_THAN_UV_MAX;
7475                                         goto skip_value;
7476                                       }
7477                                     }
7478                                   }
7479                                 }
7480                               }
7481                             }
7482                           }
7483                         }
7484                       }
7485                     }
7486                   }
7487                 }
7488               }
7489             }
7490           }
7491         }
7492       }
7493     }
7494     numtype |= IS_NUMBER_IN_UV;
7495     if (valuep)
7496       *valuep = value;
7497
7498   skip_value:
7499     if (GROK_NUMERIC_RADIX(&s, send)) {
7500       numtype |= IS_NUMBER_NOT_INT;
7501       while (s < send && isDIGIT(*s))  /* optional digits after the radix */
7502         s++;
7503     }
7504   }
7505   else if (GROK_NUMERIC_RADIX(&s, send)) {
7506     numtype |= IS_NUMBER_NOT_INT | IS_NUMBER_IN_UV; /* valuep assigned below */
7507     /* no digits before the radix means we need digits after it */
7508     if (s < send && isDIGIT(*s)) {
7509       do {
7510         s++;
7511       } while (s < send && isDIGIT(*s));
7512       if (valuep) {
7513         /* integer approximation is valid - it's 0.  */
7514         *valuep = 0;
7515       }
7516     }
7517     else
7518       return 0;
7519   } else if (*s == 'I' || *s == 'i') {
7520     s++; if (s == send || (*s != 'N' && *s != 'n')) return 0;
7521     s++; if (s == send || (*s != 'F' && *s != 'f')) return 0;
7522     s++; if (s < send && (*s == 'I' || *s == 'i')) {
7523       s++; if (s == send || (*s != 'N' && *s != 'n')) return 0;
7524       s++; if (s == send || (*s != 'I' && *s != 'i')) return 0;
7525       s++; if (s == send || (*s != 'T' && *s != 't')) return 0;
7526       s++; if (s == send || (*s != 'Y' && *s != 'y')) return 0;
7527       s++;
7528     }
7529     sawinf = 1;
7530   } else if (*s == 'N' || *s == 'n') {
7531     /* XXX TODO: There are signaling NaNs and quiet NaNs. */
7532     s++; if (s == send || (*s != 'A' && *s != 'a')) return 0;
7533     s++; if (s == send || (*s != 'N' && *s != 'n')) return 0;
7534     s++;
7535     sawnan = 1;
7536   } else
7537     return 0;
7538
7539   if (sawinf) {
7540     numtype &= IS_NUMBER_NEG; /* Keep track of sign  */
7541     numtype |= IS_NUMBER_INFINITY | IS_NUMBER_NOT_INT;
7542   } else if (sawnan) {
7543     numtype &= IS_NUMBER_NEG; /* Keep track of sign  */
7544     numtype |= IS_NUMBER_NAN | IS_NUMBER_NOT_INT;
7545   } else if (s < send) {
7546     /* we can have an optional exponent part */
7547     if (*s == 'e' || *s == 'E') {
7548       /* The only flag we keep is sign.  Blow away any "it's UV"  */
7549       numtype &= IS_NUMBER_NEG;
7550       numtype |= IS_NUMBER_NOT_INT;
7551       s++;
7552       if (s < send && (*s == '-' || *s == '+'))
7553         s++;
7554       if (s < send && isDIGIT(*s)) {
7555         do {
7556           s++;
7557         } while (s < send && isDIGIT(*s));
7558       }
7559       else
7560       return 0;
7561     }
7562   }
7563   while (s < send && isSPACE(*s))
7564     s++;
7565   if (s >= send)
7566     return numtype;
7567   if (len == 10 && memEQ(pv, "0 but true", 10)) {
7568     if (valuep)
7569       *valuep = 0;
7570     return IS_NUMBER_IN_UV;
7571   }
7572   return 0;
7573 }
7574 #endif
7575 #endif
7576
7577 /*
7578  * The grok_* routines have been modified to use warn() instead of
7579  * Perl_warner(). Also, 'hexdigit' was the former name of PL_hexdigit,
7580  * which is why the stack variable has been renamed to 'xdigit'.
7581  */
7582
7583 #ifndef grok_bin
7584 #if defined(NEED_grok_bin)
7585 static UV DPPP_(my_grok_bin)(pTHX_ const char * start, STRLEN * len_p, I32 * flags, NV * result);
7586 static
7587 #else
7588 extern UV DPPP_(my_grok_bin)(pTHX_ const char * start, STRLEN * len_p, I32 * flags, NV * result);
7589 #endif
7590
7591 #ifdef grok_bin
7592 #  undef grok_bin
7593 #endif
7594 #define grok_bin(a,b,c,d) DPPP_(my_grok_bin)(aTHX_ a,b,c,d)
7595 #define Perl_grok_bin DPPP_(my_grok_bin)
7596
7597 #if defined(NEED_grok_bin) || defined(NEED_grok_bin_GLOBAL)
7598 UV
7599 DPPP_(my_grok_bin)(pTHX_ const char *start, STRLEN *len_p, I32 *flags, NV *result)
7600 {
7601     const char *s = start;
7602     STRLEN len = *len_p;
7603     UV value = 0;
7604     NV value_nv = 0;
7605
7606     const UV max_div_2 = UV_MAX / 2;
7607     bool allow_underscores = *flags & PERL_SCAN_ALLOW_UNDERSCORES;
7608     bool overflowed = FALSE;
7609
7610     if (!(*flags & PERL_SCAN_DISALLOW_PREFIX)) {
7611         /* strip off leading b or 0b.
7612            for compatibility silently suffer "b" and "0b" as valid binary
7613            numbers. */
7614         if (len >= 1) {
7615             if (s[0] == 'b') {
7616                 s++;
7617                 len--;
7618             }
7619             else if (len >= 2 && s[0] == '0' && s[1] == 'b') {
7620                 s+=2;
7621                 len-=2;
7622             }
7623         }
7624     }
7625
7626     for (; len-- && *s; s++) {
7627         char bit = *s;
7628         if (bit == '0' || bit == '1') {
7629             /* Write it in this wonky order with a goto to attempt to get the
7630                compiler to make the common case integer-only loop pretty tight.
7631                With gcc seems to be much straighter code than old scan_bin.  */
7632           redo:
7633             if (!overflowed) {
7634                 if (value <= max_div_2) {
7635                     value = (value << 1) | (bit - '0');
7636                     continue;
7637                 }
7638                 /* Bah. We're just overflowed.  */
7639                 warn("Integer overflow in binary number");
7640                 overflowed = TRUE;
7641                 value_nv = (NV) value;
7642             }
7643             value_nv *= 2.0;
7644             /* If an NV has not enough bits in its mantissa to
7645              * represent a UV this summing of small low-order numbers
7646              * is a waste of time (because the NV cannot preserve
7647              * the low-order bits anyway): we could just remember when
7648              * did we overflow and in the end just multiply value_nv by the
7649              * right amount. */
7650             value_nv += (NV)(bit - '0');
7651             continue;
7652         }
7653         if (bit == '_' && len && allow_underscores && (bit = s[1])
7654             && (bit == '0' || bit == '1'))
7655             {
7656                 --len;
7657                 ++s;
7658                 goto redo;
7659             }
7660         if (!(*flags & PERL_SCAN_SILENT_ILLDIGIT))
7661             warn("Illegal binary digit '%c' ignored", *s);
7662         break;
7663     }
7664
7665     if (   ( overflowed && value_nv > 4294967295.0)
7666 #if UVSIZE > 4
7667         || (!overflowed && value > 0xffffffff  )
7668 #endif
7669         ) {
7670         warn("Binary number > 0b11111111111111111111111111111111 non-portable");
7671     }
7672     *len_p = s - start;
7673     if (!overflowed) {
7674         *flags = 0;
7675         return value;
7676     }
7677     *flags = PERL_SCAN_GREATER_THAN_UV_MAX;
7678     if (result)
7679         *result = value_nv;
7680     return UV_MAX;
7681 }
7682 #endif
7683 #endif
7684
7685 #ifndef grok_hex
7686 #if defined(NEED_grok_hex)
7687 static UV DPPP_(my_grok_hex)(pTHX_ const char * start, STRLEN * len_p, I32 * flags, NV * result);
7688 static
7689 #else
7690 extern UV DPPP_(my_grok_hex)(pTHX_ const char * start, STRLEN * len_p, I32 * flags, NV * result);
7691 #endif
7692
7693 #ifdef grok_hex
7694 #  undef grok_hex
7695 #endif
7696 #define grok_hex(a,b,c,d) DPPP_(my_grok_hex)(aTHX_ a,b,c,d)
7697 #define Perl_grok_hex DPPP_(my_grok_hex)
7698
7699 #if defined(NEED_grok_hex) || defined(NEED_grok_hex_GLOBAL)
7700 UV
7701 DPPP_(my_grok_hex)(pTHX_ const char *start, STRLEN *len_p, I32 *flags, NV *result)
7702 {
7703     const char *s = start;
7704     STRLEN len = *len_p;
7705     UV value = 0;
7706     NV value_nv = 0;
7707
7708     const UV max_div_16 = UV_MAX / 16;
7709     bool allow_underscores = *flags & PERL_SCAN_ALLOW_UNDERSCORES;
7710     bool overflowed = FALSE;
7711     const char *xdigit;
7712
7713     if (!(*flags & PERL_SCAN_DISALLOW_PREFIX)) {
7714         /* strip off leading x or 0x.
7715            for compatibility silently suffer "x" and "0x" as valid hex numbers.
7716         */
7717         if (len >= 1) {
7718             if (s[0] == 'x') {
7719                 s++;
7720                 len--;
7721             }
7722             else if (len >= 2 && s[0] == '0' && s[1] == 'x') {
7723                 s+=2;
7724                 len-=2;
7725             }
7726         }
7727     }
7728
7729     for (; len-- && *s; s++) {
7730         xdigit = strchr((char *) PL_hexdigit, *s);
7731         if (xdigit) {
7732             /* Write it in this wonky order with a goto to attempt to get the
7733                compiler to make the common case integer-only loop pretty tight.
7734                With gcc seems to be much straighter code than old scan_hex.  */
7735           redo:
7736             if (!overflowed) {
7737                 if (value <= max_div_16) {
7738                     value = (value << 4) | ((xdigit - PL_hexdigit) & 15);
7739                     continue;
7740                 }
7741                 warn("Integer overflow in hexadecimal number");
7742                 overflowed = TRUE;
7743                 value_nv = (NV) value;
7744             }
7745             value_nv *= 16.0;
7746             /* If an NV has not enough bits in its mantissa to
7747              * represent a UV this summing of small low-order numbers
7748              * is a waste of time (because the NV cannot preserve
7749              * the low-order bits anyway): we could just remember when
7750              * did we overflow and in the end just multiply value_nv by the
7751              * right amount of 16-tuples. */
7752             value_nv += (NV)((xdigit - PL_hexdigit) & 15);
7753             continue;
7754         }
7755         if (*s == '_' && len && allow_underscores && s[1]
7756                 && (xdigit = strchr((char *) PL_hexdigit, s[1])))
7757             {
7758                 --len;
7759                 ++s;
7760                 goto redo;
7761             }
7762         if (!(*flags & PERL_SCAN_SILENT_ILLDIGIT))
7763             warn("Illegal hexadecimal digit '%c' ignored", *s);
7764         break;
7765     }
7766
7767     if (   ( overflowed && value_nv > 4294967295.0)
7768 #if UVSIZE > 4
7769         || (!overflowed && value > 0xffffffff  )
7770 #endif
7771         ) {
7772         warn("Hexadecimal number > 0xffffffff non-portable");
7773     }
7774     *len_p = s - start;
7775     if (!overflowed) {
7776         *flags = 0;
7777         return value;
7778     }
7779     *flags = PERL_SCAN_GREATER_THAN_UV_MAX;
7780     if (result)
7781         *result = value_nv;
7782     return UV_MAX;
7783 }
7784 #endif
7785 #endif
7786
7787 #ifndef grok_oct
7788 #if defined(NEED_grok_oct)
7789 static UV DPPP_(my_grok_oct)(pTHX_ const char * start, STRLEN * len_p, I32 * flags, NV * result);
7790 static
7791 #else
7792 extern UV DPPP_(my_grok_oct)(pTHX_ const char * start, STRLEN * len_p, I32 * flags, NV * result);
7793 #endif
7794
7795 #ifdef grok_oct
7796 #  undef grok_oct
7797 #endif
7798 #define grok_oct(a,b,c,d) DPPP_(my_grok_oct)(aTHX_ a,b,c,d)
7799 #define Perl_grok_oct DPPP_(my_grok_oct)
7800
7801 #if defined(NEED_grok_oct) || defined(NEED_grok_oct_GLOBAL)
7802 UV
7803 DPPP_(my_grok_oct)(pTHX_ const char *start, STRLEN *len_p, I32 *flags, NV *result)
7804 {
7805     const char *s = start;
7806     STRLEN len = *len_p;
7807     UV value = 0;
7808     NV value_nv = 0;
7809
7810     const UV max_div_8 = UV_MAX / 8;
7811     bool allow_underscores = *flags & PERL_SCAN_ALLOW_UNDERSCORES;
7812     bool overflowed = FALSE;
7813
7814     for (; len-- && *s; s++) {
7815          /* gcc 2.95 optimiser not smart enough to figure that this subtraction
7816             out front allows slicker code.  */
7817         int digit = *s - '0';
7818         if (digit >= 0 && digit <= 7) {
7819             /* Write it in this wonky order with a goto to attempt to get the
7820                compiler to make the common case integer-only loop pretty tight.
7821             */
7822           redo:
7823             if (!overflowed) {
7824                 if (value <= max_div_8) {
7825                     value = (value << 3) | digit;
7826                     continue;
7827                 }
7828                 /* Bah. We're just overflowed.  */
7829                 warn("Integer overflow in octal number");
7830                 overflowed = TRUE;
7831                 value_nv = (NV) value;
7832             }
7833             value_nv *= 8.0;
7834             /* If an NV has not enough bits in its mantissa to
7835              * represent a UV this summing of small low-order numbers
7836              * is a waste of time (because the NV cannot preserve
7837              * the low-order bits anyway): we could just remember when
7838              * did we overflow and in the end just multiply value_nv by the
7839              * right amount of 8-tuples. */
7840             value_nv += (NV)digit;
7841             continue;
7842         }
7843         if (digit == ('_' - '0') && len && allow_underscores
7844             && (digit = s[1] - '0') && (digit >= 0 && digit <= 7))
7845             {
7846                 --len;
7847                 ++s;
7848                 goto redo;
7849             }
7850         /* Allow \octal to work the DWIM way (that is, stop scanning
7851          * as soon as non-octal characters are seen, complain only iff
7852          * someone seems to want to use the digits eight and nine). */
7853         if (digit == 8 || digit == 9) {
7854             if (!(*flags & PERL_SCAN_SILENT_ILLDIGIT))
7855                 warn("Illegal octal digit '%c' ignored", *s);
7856         }
7857         break;
7858     }
7859
7860     if (   ( overflowed && value_nv > 4294967295.0)
7861 #if UVSIZE > 4
7862         || (!overflowed && value > 0xffffffff  )
7863 #endif
7864         ) {
7865         warn("Octal number > 037777777777 non-portable");
7866     }
7867     *len_p = s - start;
7868     if (!overflowed) {
7869         *flags = 0;
7870         return value;
7871     }
7872     *flags = PERL_SCAN_GREATER_THAN_UV_MAX;
7873     if (result)
7874         *result = value_nv;
7875     return UV_MAX;
7876 }
7877 #endif
7878 #endif
7879
7880 #if !defined(my_snprintf)
7881 #if defined(NEED_my_snprintf)
7882 static int DPPP_(my_my_snprintf)(char * buffer, const Size_t len, const char * format, ...);
7883 static
7884 #else
7885 extern int DPPP_(my_my_snprintf)(char * buffer, const Size_t len, const char * format, ...);
7886 #endif
7887
7888 #define my_snprintf DPPP_(my_my_snprintf)
7889 #define Perl_my_snprintf DPPP_(my_my_snprintf)
7890
7891 #if defined(NEED_my_snprintf) || defined(NEED_my_snprintf_GLOBAL)
7892
7893 int
7894 DPPP_(my_my_snprintf)(char *buffer, const Size_t len, const char *format, ...)
7895 {
7896     dTHX;
7897     int retval;
7898     va_list ap;
7899     va_start(ap, format);
7900 #ifdef HAS_VSNPRINTF
7901     retval = vsnprintf(buffer, len, format, ap);
7902 #else
7903     retval = vsprintf(buffer, format, ap);
7904 #endif
7905     va_end(ap);
7906     if (retval < 0 || (len > 0 && (Size_t)retval >= len))
7907         Perl_croak(aTHX_ "panic: my_snprintf buffer overflow");
7908     return retval;
7909 }
7910
7911 #endif
7912 #endif
7913
7914 #if !defined(my_sprintf)
7915 #if defined(NEED_my_sprintf)
7916 static int DPPP_(my_my_sprintf)(char * buffer, const char * pat, ...);
7917 static
7918 #else
7919 extern int DPPP_(my_my_sprintf)(char * buffer, const char * pat, ...);
7920 #endif
7921
7922 #define my_sprintf DPPP_(my_my_sprintf)
7923 #define Perl_my_sprintf DPPP_(my_my_sprintf)
7924
7925 #if defined(NEED_my_sprintf) || defined(NEED_my_sprintf_GLOBAL)
7926
7927 int
7928 DPPP_(my_my_sprintf)(char *buffer, const char* pat, ...)
7929 {
7930     va_list args;
7931     va_start(args, pat);
7932     vsprintf(buffer, pat, args);
7933     va_end(args);
7934     return strlen(buffer);
7935 }
7936
7937 #endif
7938 #endif
7939
7940 #ifdef NO_XSLOCKS
7941 #  ifdef dJMPENV
7942 #    define dXCPT             dJMPENV; int rEtV = 0
7943 #    define XCPT_TRY_START    JMPENV_PUSH(rEtV); if (rEtV == 0)
7944 #    define XCPT_TRY_END      JMPENV_POP;
7945 #    define XCPT_CATCH        if (rEtV != 0)
7946 #    define XCPT_RETHROW      JMPENV_JUMP(rEtV)
7947 #  else
7948 #    define dXCPT             Sigjmp_buf oldTOP; int rEtV = 0
7949 #    define XCPT_TRY_START    Copy(top_env, oldTOP, 1, Sigjmp_buf); rEtV = Sigsetjmp(top_env, 1); if (rEtV == 0)
7950 #    define XCPT_TRY_END      Copy(oldTOP, top_env, 1, Sigjmp_buf);
7951 #    define XCPT_CATCH        if (rEtV != 0)
7952 #    define XCPT_RETHROW      Siglongjmp(top_env, rEtV)
7953 #  endif
7954 #endif
7955
7956 #if !defined(my_strlcat)
7957 #if defined(NEED_my_strlcat)
7958 static Size_t DPPP_(my_my_strlcat)(char * dst, const char * src, Size_t size);
7959 static
7960 #else
7961 extern Size_t DPPP_(my_my_strlcat)(char * dst, const char * src, Size_t size);
7962 #endif
7963
7964 #define my_strlcat DPPP_(my_my_strlcat)
7965 #define Perl_my_strlcat DPPP_(my_my_strlcat)
7966
7967 #if defined(NEED_my_strlcat) || defined(NEED_my_strlcat_GLOBAL)
7968
7969 Size_t
7970 DPPP_(my_my_strlcat)(char *dst, const char *src, Size_t size)
7971 {
7972     Size_t used, length, copy;
7973
7974     used = strlen(dst);
7975     length = strlen(src);
7976     if (size > 0 && used < size - 1) {
7977         copy = (length >= size - used) ? size - used - 1 : length;
7978         memcpy(dst + used, src, copy);
7979         dst[used + copy] = '\0';
7980     }
7981     return used + length;
7982 }
7983 #endif
7984 #endif
7985
7986 #if !defined(my_strlcpy)
7987 #if defined(NEED_my_strlcpy)
7988 static Size_t DPPP_(my_my_strlcpy)(char * dst, const char * src, Size_t size);
7989 static
7990 #else
7991 extern Size_t DPPP_(my_my_strlcpy)(char * dst, const char * src, Size_t size);
7992 #endif
7993
7994 #define my_strlcpy DPPP_(my_my_strlcpy)
7995 #define Perl_my_strlcpy DPPP_(my_my_strlcpy)
7996
7997 #if defined(NEED_my_strlcpy) || defined(NEED_my_strlcpy_GLOBAL)
7998
7999 Size_t
8000 DPPP_(my_my_strlcpy)(char *dst, const char *src, Size_t size)
8001 {
8002     Size_t length, copy;
8003
8004     length = strlen(src);
8005     if (size > 0) {
8006         copy = (length >= size) ? size - 1 : length;
8007         memcpy(dst, src, copy);
8008         dst[copy] = '\0';
8009     }
8010     return length;
8011 }
8012
8013 #endif
8014 #endif
8015 #ifndef PERL_PV_ESCAPE_QUOTE
8016 #  define PERL_PV_ESCAPE_QUOTE           0x0001
8017 #endif
8018
8019 #ifndef PERL_PV_PRETTY_QUOTE
8020 #  define PERL_PV_PRETTY_QUOTE           PERL_PV_ESCAPE_QUOTE
8021 #endif
8022
8023 #ifndef PERL_PV_PRETTY_ELLIPSES
8024 #  define PERL_PV_PRETTY_ELLIPSES        0x0002
8025 #endif
8026
8027 #ifndef PERL_PV_PRETTY_LTGT
8028 #  define PERL_PV_PRETTY_LTGT            0x0004
8029 #endif
8030
8031 #ifndef PERL_PV_ESCAPE_FIRSTCHAR
8032 #  define PERL_PV_ESCAPE_FIRSTCHAR       0x0008
8033 #endif
8034
8035 #ifndef PERL_PV_ESCAPE_UNI
8036 #  define PERL_PV_ESCAPE_UNI             0x0100
8037 #endif
8038
8039 #ifndef PERL_PV_ESCAPE_UNI_DETECT
8040 #  define PERL_PV_ESCAPE_UNI_DETECT      0x0200
8041 #endif
8042
8043 #ifndef PERL_PV_ESCAPE_ALL
8044 #  define PERL_PV_ESCAPE_ALL             0x1000
8045 #endif
8046
8047 #ifndef PERL_PV_ESCAPE_NOBACKSLASH
8048 #  define PERL_PV_ESCAPE_NOBACKSLASH     0x2000
8049 #endif
8050
8051 #ifndef PERL_PV_ESCAPE_NOCLEAR
8052 #  define PERL_PV_ESCAPE_NOCLEAR         0x4000
8053 #endif
8054
8055 #ifndef PERL_PV_ESCAPE_RE
8056 #  define PERL_PV_ESCAPE_RE              0x8000
8057 #endif
8058
8059 #ifndef PERL_PV_PRETTY_NOCLEAR
8060 #  define PERL_PV_PRETTY_NOCLEAR         PERL_PV_ESCAPE_NOCLEAR
8061 #endif
8062 #ifndef PERL_PV_PRETTY_DUMP
8063 #  define PERL_PV_PRETTY_DUMP            PERL_PV_PRETTY_ELLIPSES|PERL_PV_PRETTY_QUOTE
8064 #endif
8065
8066 #ifndef PERL_PV_PRETTY_REGPROP
8067 #  define PERL_PV_PRETTY_REGPROP         PERL_PV_PRETTY_ELLIPSES|PERL_PV_PRETTY_LTGT|PERL_PV_ESCAPE_RE
8068 #endif
8069
8070 /* Hint: pv_escape
8071  * Note that unicode functionality is only backported to
8072  * those perl versions that support it. For older perl
8073  * versions, the implementation will fall back to bytes.
8074  */
8075
8076 #ifndef pv_escape
8077 #if defined(NEED_pv_escape)
8078 static char * DPPP_(my_pv_escape)(pTHX_ SV * dsv, char const * const str, const STRLEN count, const STRLEN max, STRLEN * const escaped, const U32 flags);
8079 static
8080 #else
8081 extern char * DPPP_(my_pv_escape)(pTHX_ SV * dsv, char const * const str, const STRLEN count, const STRLEN max, STRLEN * const escaped, const U32 flags);
8082 #endif
8083
8084 #ifdef pv_escape
8085 #  undef pv_escape
8086 #endif
8087 #define pv_escape(a,b,c,d,e,f) DPPP_(my_pv_escape)(aTHX_ a,b,c,d,e,f)
8088 #define Perl_pv_escape DPPP_(my_pv_escape)
8089
8090 #if defined(NEED_pv_escape) || defined(NEED_pv_escape_GLOBAL)
8091
8092 char *
8093 DPPP_(my_pv_escape)(pTHX_ SV *dsv, char const * const str,
8094   const STRLEN count, const STRLEN max,
8095   STRLEN * const escaped, const U32 flags)
8096 {
8097     const char esc = flags & PERL_PV_ESCAPE_RE ? '%' : '\\';
8098     const char dq = flags & PERL_PV_ESCAPE_QUOTE ? '"' : esc;
8099     char octbuf[32] = "%123456789ABCDF";
8100     STRLEN wrote = 0;
8101     STRLEN chsize = 0;
8102     STRLEN readsize = 1;
8103 #if defined(is_utf8_string) && defined(utf8_to_uvchr)
8104     bool isuni = flags & PERL_PV_ESCAPE_UNI ? 1 : 0;
8105 #endif
8106     const char *pv  = str;
8107     const char * const end = pv + count;
8108     octbuf[0] = esc;
8109
8110     if (!(flags & PERL_PV_ESCAPE_NOCLEAR))
8111         sv_setpvs(dsv, "");
8112
8113 #if defined(is_utf8_string) && defined(utf8_to_uvchr)
8114     if ((flags & PERL_PV_ESCAPE_UNI_DETECT) && is_utf8_string((U8*)pv, count))
8115         isuni = 1;
8116 #endif
8117
8118     for (; pv < end && (!max || wrote < max) ; pv += readsize) {
8119         const UV u =
8120 #if defined(is_utf8_string) && defined(utf8_to_uvchr)
8121                      isuni ? utf8_to_uvchr((U8*)pv, &readsize) :
8122 #endif
8123                              (U8)*pv;
8124         const U8 c = (U8)u & 0xFF;
8125
8126         if (u > 255 || (flags & PERL_PV_ESCAPE_ALL)) {
8127             if (flags & PERL_PV_ESCAPE_FIRSTCHAR)
8128                 chsize = my_snprintf(octbuf, sizeof octbuf,
8129                                       "%"UVxf, u);
8130             else
8131                 chsize = my_snprintf(octbuf, sizeof octbuf,
8132                                       "%cx{%"UVxf"}", esc, u);
8133         } else if (flags & PERL_PV_ESCAPE_NOBACKSLASH) {
8134             chsize = 1;
8135         } else {
8136             if (c == dq || c == esc || !isPRINT(c)) {
8137                 chsize = 2;
8138                 switch (c) {
8139                 case '\\' : /* fallthrough */
8140                 case '%'  : if (c == esc)
8141                                 octbuf[1] = esc;
8142                             else
8143                                 chsize = 1;
8144                             break;
8145                 case '\v' : octbuf[1] = 'v'; break;
8146                 case '\t' : octbuf[1] = 't'; break;
8147                 case '\r' : octbuf[1] = 'r'; break;
8148                 case '\n' : octbuf[1] = 'n'; break;
8149                 case '\f' : octbuf[1] = 'f'; break;
8150                 case '"'  : if (dq == '"')
8151                                 octbuf[1] = '"';
8152                             else
8153                                 chsize = 1;
8154                             break;
8155                 default:    chsize = my_snprintf(octbuf, sizeof octbuf,
8156                                 pv < end && isDIGIT((U8)*(pv+readsize))
8157                                 ? "%c%03o" : "%c%o", esc, c);
8158                 }
8159             } else {
8160                 chsize = 1;
8161             }
8162         }
8163         if (max && wrote + chsize > max) {
8164             break;
8165         } else if (chsize > 1) {
8166             sv_catpvn(dsv, octbuf, chsize);
8167             wrote += chsize;
8168         } else {
8169             char tmp[2];
8170             my_snprintf(tmp, sizeof tmp, "%c", c);
8171             sv_catpvn(dsv, tmp, 1);
8172             wrote++;
8173         }
8174         if (flags & PERL_PV_ESCAPE_FIRSTCHAR)
8175             break;
8176     }
8177     if (escaped != NULL)
8178         *escaped= pv - str;
8179     return SvPVX(dsv);
8180 }
8181
8182 #endif
8183 #endif
8184
8185 #ifndef pv_pretty
8186 #if defined(NEED_pv_pretty)
8187 static char * DPPP_(my_pv_pretty)(pTHX_ SV * dsv, char const * const str, const STRLEN count, const STRLEN max, char const * const start_color, char const * const end_color, const U32 flags);
8188 static
8189 #else
8190 extern char * DPPP_(my_pv_pretty)(pTHX_ SV * dsv, char const * const str, const STRLEN count, const STRLEN max, char const * const start_color, char const * const end_color, const U32 flags);
8191 #endif
8192
8193 #ifdef pv_pretty
8194 #  undef pv_pretty
8195 #endif
8196 #define pv_pretty(a,b,c,d,e,f,g) DPPP_(my_pv_pretty)(aTHX_ a,b,c,d,e,f,g)
8197 #define Perl_pv_pretty DPPP_(my_pv_pretty)
8198
8199 #if defined(NEED_pv_pretty) || defined(NEED_pv_pretty_GLOBAL)
8200
8201 char *
8202 DPPP_(my_pv_pretty)(pTHX_ SV *dsv, char const * const str, const STRLEN count,
8203   const STRLEN max, char const * const start_color, char const * const end_color,
8204   const U32 flags)
8205 {
8206     const U8 dq = (flags & PERL_PV_PRETTY_QUOTE) ? '"' : '%';
8207     STRLEN escaped;
8208
8209     if (!(flags & PERL_PV_PRETTY_NOCLEAR))
8210         sv_setpvs(dsv, "");
8211
8212     if (dq == '"')
8213         sv_catpvs(dsv, "\"");
8214     else if (flags & PERL_PV_PRETTY_LTGT)
8215         sv_catpvs(dsv, "<");
8216
8217     if (start_color != NULL)
8218         sv_catpv(dsv, D_PPP_CONSTPV_ARG(start_color));
8219
8220     pv_escape(dsv, str, count, max, &escaped, flags | PERL_PV_ESCAPE_NOCLEAR);
8221
8222     if (end_color != NULL)
8223         sv_catpv(dsv, D_PPP_CONSTPV_ARG(end_color));
8224
8225     if (dq == '"')
8226         sv_catpvs(dsv, "\"");
8227     else if (flags & PERL_PV_PRETTY_LTGT)
8228         sv_catpvs(dsv, ">");
8229
8230     if ((flags & PERL_PV_PRETTY_ELLIPSES) && escaped < count)
8231         sv_catpvs(dsv, "...");
8232
8233     return SvPVX(dsv);
8234 }
8235
8236 #endif
8237 #endif
8238
8239 #ifndef pv_display
8240 #if defined(NEED_pv_display)
8241 static char * DPPP_(my_pv_display)(pTHX_ SV * dsv, const char * pv, STRLEN cur, STRLEN len, STRLEN pvlim);
8242 static
8243 #else
8244 extern char * DPPP_(my_pv_display)(pTHX_ SV * dsv, const char * pv, STRLEN cur, STRLEN len, STRLEN pvlim);
8245 #endif
8246
8247 #ifdef pv_display
8248 #  undef pv_display
8249 #endif
8250 #define pv_display(a,b,c,d,e) DPPP_(my_pv_display)(aTHX_ a,b,c,d,e)
8251 #define Perl_pv_display DPPP_(my_pv_display)
8252
8253 #if defined(NEED_pv_display) || defined(NEED_pv_display_GLOBAL)
8254
8255 char *
8256 DPPP_(my_pv_display)(pTHX_ SV *dsv, const char *pv, STRLEN cur, STRLEN len, STRLEN pvlim)
8257 {
8258     pv_pretty(dsv, pv, cur, pvlim, NULL, NULL, PERL_PV_PRETTY_DUMP);
8259     if (len > cur && pv[cur] == '\0')
8260         sv_catpvs(dsv, "\\0");
8261     return SvPVX(dsv);
8262 }
8263
8264 #endif
8265 #endif
8266
8267 #endif /* _P_P_PORTABILITY_H_ */
8268
8269 /* End of File ppport.h */