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