This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Upgrade to Devel::PPPort 3.06.
[perl5.git] / ext / Devel / PPPort / PPPort.pm
CommitLineData
adfe19db
MHM
1################################################################################
2#
3# !!!!! Do NOT edit this file directly! -- Edit PPPort_pm.PL instead. !!!!!
4#
5################################################################################
6#
7# Perl/Pollution/Portability
8#
9################################################################################
10#
9132e1a3 11# $Revision: 33 $
adfe19db 12# $Author: mhx $
9132e1a3 13# $Date: 2005/01/31 08:10:55 +0100 $
adfe19db
MHM
14#
15################################################################################
16#
9132e1a3 17# Version 3.x, Copyright (C) 2004-2005, Marcus Holland-Moritz.
adfe19db
MHM
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################################################################################
0a7c7f4f
JH
25
26=head1 NAME
27
a6d05634 28Devel::PPPort - Perl/Pollution/Portability
0a7c7f4f
JH
29
30=head1 SYNOPSIS
31
adfe19db
MHM
32 Devel::PPPort::WriteFile(); # defaults to ./ppport.h
33 Devel::PPPort::WriteFile('someheader.h');
0a7c7f4f
JH
34
35=head1 DESCRIPTION
36
adfe19db 37Perl's API has changed over time, gaining new features, new functions,
44284200 38increasing its flexibility, and reducing the impact on the C namespace
adfe19db
MHM
39environment (reduced pollution). The header file written by this module,
40typically F<ppport.h>, attempts to bring some of the newer Perl API
44284200
JH
41features to older versions of Perl, so that you can worry less about
42keeping track of old releases, but users can still reap the benefit.
adfe19db
MHM
43
44C<Devel::PPPort> contains a single function, called C<WriteFile>. Its
45only purpose is to write the F<ppport.h> C header file. This file
46contains a series of macros and, if explicitly requested, functions that
47allow XS modules to be built using older versions of Perl. Currently,
48Perl versions from 5.003 to 5.9.2 are supported.
49
50This module is used by C<h2xs> to write the file F<ppport.h>.
51
52=head2 Why use ppport.h?
44284200 53
adfe19db 54You should use F<ppport.h> in modern code so that your code will work
44284200
JH
55with the widest range of Perl interpreters possible, without significant
56additional work.
57
adfe19db
MHM
58You should attempt older code to fully use F<ppport.h>, because the
59reduced pollution of newer Perl versions is an important thing. It's so
44284200
JH
60important that the old polluting ways of original Perl modules will not be
61supported very far into the future, and your module will almost certainly
adfe19db 62break! By adapting to it now, you'll gain compatibility and a sense of
44284200
JH
63having done the electronic ecology some good.
64
adfe19db
MHM
65=head2 How to use ppport.h
66
67Don't direct the users of your module to download C<Devel::PPPort>.
68They are most probably no XS writers. Also, don't make F<ppport.h>
69optional. Rather, just take the most recent copy of F<ppport.h> that
70you can find (e.g. by generating it with the latest C<Devel::PPPort>
71release from CPAN), copy it into your project, adjust your project to
72use it, and distribute the header along with your module.
73
74=head2 Running ppport.h
75
76But F<ppport.h> is more than just a C header. It's also a Perl script
77that can check your source code. It will suggest hints and portability
78notes, and can even make suggestions on how to change your code. You
79can run it like any other Perl program:
80
9132e1a3 81 perl ppport.h [options] [files]
44284200 82
adfe19db 83It also has embedded documentation, so you can use
44284200 84
adfe19db
MHM
85 perldoc ppport.h
86
87to find out more about how to use it.
88
89=head1 FUNCTIONS
0a7c7f4f
JH
90
91=head2 WriteFile
92
adfe19db
MHM
93C<WriteFile> takes one optional argument. When called with one
94argument, it expects to be passed a filename. When called with
95no arguments, it defaults to the filename F<ppport.h>.
96
97The function returns a true value if the file was written successfully.
98Otherwise it returns a false value.
99
100=head1 COMPATIBILITY
0a7c7f4f 101
adfe19db
MHM
102F<ppport.h> supports Perl versions from 5.003 to 5.9.2
103in threaded and non-threaded configurations.
0a7c7f4f 104
adfe19db 105=head2 Provided Perl compatibility API
44284200 106
adfe19db
MHM
107The header file written by this module, typically F<ppport.h>, provides
108access to the following elements of the Perl API that is not available
109in older Perl releases:
44284200 110
adfe19db
MHM
111 _aMY_CXT
112 _pMY_CXT
9e19d553
JH
113 aMY_CXT
114 aMY_CXT_
9e19d553
JH
115 aTHX
116 aTHX_
117 AvFILLp
adfe19db 118 boolSV
e78280ee
TP
119 call_argv
120 call_method
121 call_pv
122 call_sv
adfe19db
MHM
123 CopFILE
124 CopFILE_set
125 CopFILEAV
126 CopFILEGV
127 CopFILEGV_set
128 CopFILESV
129 CopSTASH
130 CopSTASH_eq
131 CopSTASH_set
132 CopSTASHPV
133 CopSTASHPV_set
134 CopyD
50b814c3 135 dAX
44284200 136 DEFSV
50b814c3 137 dITEMS
adfe19db 138 dMY_CXT
9e19d553
JH
139 dMY_CXT_SV
140 dNOOP
141 dTHR
142 dTHX
143 dTHXa
144 dTHXoa
adfe19db 145 dUNDERBAR
9132e1a3
MHM
146 dXCPT
147 dXSTARG
a745474a 148 END_EXTERN_C
44284200 149 ERRSV
adfe19db
MHM
150 eval_pv
151 eval_sv
a745474a 152 EXTERN_C
e1fd986f
TP
153 get_av
154 get_cv
155 get_hv
156 get_sv
7dcda430 157 grok_bin
adfe19db 158 grok_hex
5af89305 159 grok_number
adfe19db 160 GROK_NUMERIC_RADIX
5af89305 161 grok_numeric_radix
adfe19db
MHM
162 grok_oct
163 gv_stashpvn
164 IN_LOCALE
165 IN_LOCALE_COMPILETIME
166 IN_LOCALE_RUNTIME
167 IN_PERL_COMPILETIME
168 INT2PTR
169 IS_NUMBER_GREATER_THAN_UV_MAX
170 IS_NUMBER_IN_UV
171 IS_NUMBER_INFINITY
172 IS_NUMBER_NAN
173 IS_NUMBER_NEG
174 IS_NUMBER_NOT_INT
9e19d553 175 IVdf
adfe19db
MHM
176 IVSIZE
177 IVTYPE
178 memEQ
179 memNE
180 MoveD
181 mPUSHi
182 mPUSHn
183 mPUSHp
184 mPUSHu
185 mXPUSHi
186 mXPUSHn
187 mXPUSHp
188 mXPUSHu
44284200 189 MY_CXT
a745474a 190 MY_CXT_CLONE
44284200 191 MY_CXT_INIT
adfe19db
MHM
192 newCONSTSUB
193 newRV_inc
194 newRV_noinc
195 newSVpvn
196 newSVuv
44284200 197 NOOP
adfe19db 198 NUM2PTR
9e19d553
JH
199 NVef
200 NVff
201 NVgf
adfe19db
MHM
202 NVTYPE
203 PERL_BCDVERSION
a745474a 204 PERL_GCC_BRACE_GROUPS_FORBIDDEN
adfe19db
MHM
205 PERL_INT_MAX
206 PERL_INT_MIN
207 PERL_LONG_MAX
208 PERL_LONG_MIN
209 PERL_MAGIC_arylen
210 PERL_MAGIC_backref
211 PERL_MAGIC_bm
212 PERL_MAGIC_collxfrm
213 PERL_MAGIC_dbfile
214 PERL_MAGIC_dbline
215 PERL_MAGIC_defelem
216 PERL_MAGIC_env
217 PERL_MAGIC_envelem
218 PERL_MAGIC_ext
219 PERL_MAGIC_fm
220 PERL_MAGIC_glob
221 PERL_MAGIC_isa
222 PERL_MAGIC_isaelem
223 PERL_MAGIC_mutex
224 PERL_MAGIC_nkeys
225 PERL_MAGIC_overload
226 PERL_MAGIC_overload_elem
227 PERL_MAGIC_overload_table
228 PERL_MAGIC_pos
229 PERL_MAGIC_qr
230 PERL_MAGIC_regdata
231 PERL_MAGIC_regdatum
232 PERL_MAGIC_regex_global
233 PERL_MAGIC_shared
234 PERL_MAGIC_shared_scalar
235 PERL_MAGIC_sig
236 PERL_MAGIC_sigelem
237 PERL_MAGIC_substr
238 PERL_MAGIC_sv
239 PERL_MAGIC_taint
240 PERL_MAGIC_tied
241 PERL_MAGIC_tiedelem
242 PERL_MAGIC_tiedscalar
243 PERL_MAGIC_utf8
244 PERL_MAGIC_uvar
245 PERL_MAGIC_uvar_elem
246 PERL_MAGIC_vec
247 PERL_MAGIC_vstring
248 PERL_QUAD_MAX
249 PERL_QUAD_MIN
44284200 250 PERL_REVISION
adfe19db
MHM
251 PERL_SCAN_ALLOW_UNDERSCORES
252 PERL_SCAN_DISALLOW_PREFIX
253 PERL_SCAN_GREATER_THAN_UV_MAX
254 PERL_SCAN_SILENT_ILLDIGIT
255 PERL_SHORT_MAX
256 PERL_SHORT_MIN
44284200 257 PERL_SUBVERSION
adfe19db
MHM
258 PERL_UCHAR_MAX
259 PERL_UCHAR_MIN
260 PERL_UINT_MAX
261 PERL_UINT_MIN
262 PERL_ULONG_MAX
263 PERL_ULONG_MIN
44284200 264 PERL_UNUSED_DECL
adfe19db
MHM
265 PERL_UQUAD_MAX
266 PERL_UQUAD_MIN
267 PERL_USHORT_MAX
268 PERL_USHORT_MIN
44284200 269 PERL_VERSION
44284200
JH
270 PL_compiling
271 PL_copline
272 PL_curcop
273 PL_curstash
96ad942f
MHM
274 PL_DBsingle
275 PL_DBsub
276 PL_debstash
44284200 277 PL_defgv
96ad942f 278 PL_diehook
44284200 279 PL_dirty
adfe19db 280 PL_dowarn
96ad942f 281 PL_errgv
adfe19db 282 PL_hexdigit
44284200
JH
283 PL_hints
284 PL_na
96ad942f
MHM
285 PL_no_modify
286 PL_perl_destruct_level
44284200 287 PL_perldb
96ad942f 288 PL_ppaddr
adfe19db 289 PL_rsfp
44284200 290 PL_rsfp_filters
adfe19db 291 PL_stack_base
96ad942f 292 PL_stack_sp
44284200 293 PL_stdingv
9e19d553 294 PL_Sv
96ad942f 295 PL_sv_arenaroot
44284200
JH
296 PL_sv_no
297 PL_sv_undef
298 PL_sv_yes
96ad942f
MHM
299 PL_tainted
300 PL_tainting
44284200
JH
301 pMY_CXT
302 pMY_CXT_
adfe19db 303 Poison
44284200
JH
304 pTHX
305 pTHX_
adfe19db
MHM
306 PTR2IV
307 PTR2NV
308 PTR2ul
309 PTR2UV
310 PTRV
311 PUSHmortal
96ad942f 312 PUSHu
9e19d553 313 SAVE_DEFSV
a745474a 314 START_EXTERN_C
9e19d553 315 START_MY_CXT
a745474a
MHM
316 STMT_END
317 STMT_START
adfe19db
MHM
318 sv_2pv_nolen
319 sv_2pvbyte
320 sv_2uv
321 sv_catpv_mg
96ad942f
MHM
322 sv_catpvf_mg
323 sv_catpvf_mg_nocontext
adfe19db
MHM
324 sv_catpvn_mg
325 sv_catpvn_nomg
326 sv_catsv_mg
327 sv_catsv_nomg
328 sv_pvn
329 sv_pvn_force
330 sv_pvn_nomg
331 sv_setiv_mg
332 sv_setnv_mg
333 sv_setpv_mg
96ad942f
MHM
334 sv_setpvf_mg
335 sv_setpvf_mg_nocontext
adfe19db
MHM
336 sv_setpvn_mg
337 sv_setsv_mg
338 sv_setsv_nomg
339 sv_setuv
340 sv_setuv_mg
341 sv_usepvn_mg
342 sv_uv
96ad942f
MHM
343 sv_vcatpvf
344 sv_vcatpvf_mg
345 sv_vsetpvf
346 sv_vsetpvf_mg
adfe19db
MHM
347 SvGETMAGIC
348 SvIV_nomg
349 SvPV_force_nomg
350 SvPV_nolen
351 SvPV_nomg
352 SvPVbyte
353 SvUV
354 SvUV_nomg
355 SvUVX
356 SvUVx
357 SvUVXx
358 UNDERBAR
9e19d553
JH
359 UVof
360 UVSIZE
adfe19db 361 UVTYPE
9e19d553 362 UVuf
9e19d553 363 UVXf
adfe19db 364 UVxf
96ad942f 365 vnewSVpvf
9132e1a3
MHM
366 XCPT_CATCH
367 XCPT_RETHROW
368 XCPT_TRY_END
369 XCPT_TRY_START
adfe19db 370 XPUSHmortal
96ad942f 371 XPUSHu
adfe19db
MHM
372 XSRETURN_UV
373 XST_mUV
374 ZeroD
375
376=head2 Perl API not supported by ppport.h
377
378There is still a big part of the API not supported by F<ppport.h>.
379Either because it doesn't make sense to back-port that part of the API,
380or simply because it hasn't been implemented yet. Patches welcome!
381
382Here's a list of the currently unsupported API, and also the version of
383Perl below which it is unsupported:
384
385=over 4
386
387=item perl 5.9.2
388
389 SvPVbyte_force
390 find_rundefsvoffset
9132e1a3
MHM
391 gv_fetchpvn_flags
392 gv_fetchsv
393 op_refcnt_lock
394 op_refcnt_unlock
395 savesvpv
adfe19db
MHM
396 vnormal
397
398=item perl 5.9.1
399
400 hv_assert
401 hv_clear_placeholders
402 hv_scalar
403 scan_version
404 sv_2iv_flags
405 sv_2uv_flags
406
407=item perl 5.9.0
408
409 new_version
410 save_set_svflags
411 upg_version
412 vcmp
413 vnumify
414 vstringify
415
416=item perl 5.8.3
417
418 SvIsCOW
419 SvIsCOW_shared_hash
420
421=item perl 5.8.1
422
423 SvVOK
424 doing_taint
425 is_utf8_string_loc
426 packlist
427 save_bool
428 savestack_grow_cnt
429 scan_vstring
430 sv_cat_decode
431 sv_compile_2op
432 sv_setpviv
433 sv_setpviv_mg
434 unpackstring
435
436=item perl 5.8.0
437
438 hv_iternext_flags
439 hv_store_flags
440 is_utf8_idcont
441 nothreadhook
442
443=item perl 5.7.3
444
445 PerlIO_clearerr
446 PerlIO_close
447 PerlIO_eof
448 PerlIO_error
449 PerlIO_fileno
450 PerlIO_fill
451 PerlIO_flush
452 PerlIO_get_base
453 PerlIO_get_bufsiz
454 PerlIO_get_cnt
455 PerlIO_get_ptr
456 PerlIO_read
457 PerlIO_seek
458 PerlIO_set_cnt
459 PerlIO_set_ptrcnt
460 PerlIO_setlinebuf
461 PerlIO_stderr
462 PerlIO_stdin
463 PerlIO_stdout
464 PerlIO_tell
465 PerlIO_unread
466 PerlIO_write
467 SvLOCK
468 SvSHARE
469 SvUNLOCK
470 atfork_lock
471 atfork_unlock
472 custom_op_desc
473 custom_op_name
474 deb
475 debstack
476 debstackptrs
477 gv_fetchmeth_autoload
478 ibcmp_utf8
479 my_fork
480 my_socketpair
481 pack_cat
482 perl_destruct
483 pv_uni_display
484 regclass_swash
485 save_shared_pvref
486 savesharedpv
487 sortsv
488 sv_copypv
489 sv_magicext
490 sv_nolocking
491 sv_nosharing
492 sv_nounlocking
493 sv_recode_to_utf8
494 sv_uni_display
495 to_uni_fold
496 to_uni_lower
497 to_uni_title
498 to_uni_upper
499 to_utf8_case
500 to_utf8_fold
501 to_utf8_lower
502 to_utf8_title
503 to_utf8_upper
504 unpack_str
505 uvchr_to_utf8_flags
506 uvuni_to_utf8_flags
507 vdeb
508
509=item perl 5.7.2
510
511 calloc
512 getcwd_sv
513 init_tm
514 malloc
515 mfree
516 mini_mktime
517 my_atof2
518 my_strftime
519 op_null
520 realloc
521 sv_2pv_flags
522 sv_catpvn_flags
523 sv_catsv_flags
524 sv_pvn_force_flags
525 sv_setsv_flags
526 sv_utf8_upgrade_flags
527 swash_fetch
528
529=item perl 5.7.1
530
531 POPpbytex
532 SvUOK
533 bytes_from_utf8
534 csighandler
535 despatch_signals
536 do_openn
537 gv_handler
538 is_lvalue_sub
539 my_popen_list
540 newSVpvn_share
541 save_mortalizesv
542 save_padsv
543 scan_num
544 sv_force_normal_flags
545 sv_setref_uv
546 sv_unref_flags
547 sv_utf8_upgrade
548 utf8_length
549 utf8_to_uvchr
550 utf8_to_uvuni
551 utf8n_to_uvchr
552 utf8n_to_uvuni
553 uvchr_to_utf8
554 uvuni_to_utf8
555
556=item perl 5.6.1
557
558 apply_attrs_string
559 bytes_to_utf8
560 gv_efullname4
561 gv_fullname4
562 is_utf8_string
563 save_generic_pvref
564 utf16_to_utf8
565 utf16_to_utf8_reversed
566 utf8_to_bytes
567
568=item perl 5.6.0
569
570 SvIOK_UV
571 SvIOK_notUV
572 SvIOK_only_UV
573 SvPOK_only_UTF8
574 SvPVbyte_nolen
575 SvPVbytex
576 SvPVbytex_force
577 SvPVutf8
578 SvPVutf8_force
579 SvPVutf8_nolen
580 SvPVutf8x
581 SvPVutf8x_force
582 SvUTF8
583 SvUTF8_off
584 SvUTF8_on
585 av_delete
586 av_exists
587 call_atexit
588 cast_i32
589 cast_iv
590 cast_ulong
591 cast_uv
592 do_gv_dump
593 do_gvgv_dump
594 do_hv_dump
595 do_magic_dump
596 do_op_dump
597 do_open9
598 do_pmop_dump
599 do_sv_dump
600 dump_all
601 dump_eval
602 dump_form
603 dump_indent
604 dump_packsubs
605 dump_sub
606 dump_vindent
607 get_context
608 get_ppaddr
609 gv_dump
610 init_i18nl10n
611 init_i18nl14n
612 is_uni_alnum
613 is_uni_alnum_lc
614 is_uni_alnumc
615 is_uni_alnumc_lc
616 is_uni_alpha
617 is_uni_alpha_lc
618 is_uni_ascii
619 is_uni_ascii_lc
620 is_uni_cntrl
621 is_uni_cntrl_lc
622 is_uni_digit
623 is_uni_digit_lc
624 is_uni_graph
625 is_uni_graph_lc
626 is_uni_idfirst
627 is_uni_idfirst_lc
628 is_uni_lower
629 is_uni_lower_lc
630 is_uni_print
631 is_uni_print_lc
632 is_uni_punct
633 is_uni_punct_lc
634 is_uni_space
635 is_uni_space_lc
636 is_uni_upper
637 is_uni_upper_lc
638 is_uni_xdigit
639 is_uni_xdigit_lc
640 is_utf8_alnum
641 is_utf8_alnumc
642 is_utf8_alpha
643 is_utf8_ascii
644 is_utf8_char
645 is_utf8_cntrl
646 is_utf8_digit
647 is_utf8_graph
648 is_utf8_idfirst
649 is_utf8_lower
650 is_utf8_mark
651 is_utf8_print
652 is_utf8_punct
653 is_utf8_space
654 is_utf8_upper
655 is_utf8_xdigit
656 load_module
657 magic_dump
658 mess
659 my_atof
660 my_fflush_all
661 newANONATTRSUB
662 newATTRSUB
663 newMYSUB
664 newPADOP
665 newXS
666 newXSproto
667 new_collate
668 new_ctype
669 new_numeric
670 op_dump
671 perl_parse
672 pmop_dump
673 pv_display
674 re_intuit_start
675 re_intuit_string
676 reginitcolors
677 require_pv
678 safesyscalloc
679 safesysfree
680 safesysmalloc
681 safesysrealloc
682 save_I8
683 save_alloc
684 save_destructor
685 save_destructor_x
686 save_re_context
687 save_vptr
688 scan_bin
689 set_context
690 set_numeric_local
691 set_numeric_radix
692 set_numeric_standard
693 str_to_version
694 sv_2pvutf8
695 sv_2pvutf8_nolen
696 sv_force_normal
697 sv_len_utf8
698 sv_pos_b2u
699 sv_pos_u2b
700 sv_pv
701 sv_pvbyte
702 sv_pvbyten
703 sv_pvbyten_force
704 sv_pvutf8
705 sv_pvutf8n
706 sv_pvutf8n_force
707 sv_rvweaken
708 sv_utf8_decode
709 sv_utf8_downgrade
710 sv_utf8_encode
adfe19db
MHM
711 swash_init
712 tmps_grow
713 to_uni_lower_lc
714 to_uni_title_lc
715 to_uni_upper_lc
716 utf8_distance
717 utf8_hop
718 vcroak
719 vform
720 vload_module
721 vmess
adfe19db
MHM
722 vwarn
723 vwarner
724 warner
725
726=item perl 5.005_03
727
728 POPpx
729 get_vtbl
730 save_generic_svref
731
732=item perl 5.005
733
734 PL_modglobal
735 cx_dump
736 debop
737 debprofdump
738 fbm_compile
739 fbm_instr
740 get_op_descs
741 get_op_names
742 init_stacks
743 mg_length
744 mg_size
745 newHVhv
746 new_stackinfo
747 regdump
748 regexec_flags
749 regnext
750 runops_debug
751 runops_standard
752 save_hints
753 save_iv
754 save_threadsv
755 screaminstr
756 sv_iv
757 sv_nv
758 sv_peek
759 sv_true
760
761=item perl 5.004_05
762
763 do_binmode
764 save_aelem
765 save_helem
adfe19db
MHM
766
767=item perl 5.004_04
768
769 newWHILEOP
770
771=item perl 5.004
772
773 GIMME_V
774 G_VOID
775 HEf_SVKEY
776 HeHASH
777 HeKEY
778 HeKLEN
779 HePV
780 HeSVKEY
781 HeSVKEY_force
782 HeSVKEY_set
783 HeVAL
adfe19db
MHM
784 SvSetMagicSV
785 SvSetMagicSV_nosteal
786 SvSetSV_nosteal
787 SvTAINTED
788 SvTAINTED_off
789 SvTAINTED_on
adfe19db
MHM
790 block_gimme
791 call_list
792 cv_const_sv
793 delimcpy
794 do_open
795 form
796 gv_autoload4
797 gv_efullname3
798 gv_fetchmethod_autoload
799 gv_fullname3
800 hv_delayfree_ent
801 hv_delete_ent
802 hv_exists_ent
803 hv_fetch_ent
804 hv_free_ent
805 hv_iterkeysv
806 hv_ksplit
807 hv_store_ent
808 ibcmp_locale
809 my_failure_exit
810 my_memcmp
811 my_pclose
812 my_popen
813 newSVpvf
814 rsignal
815 rsignal_state
816 save_I16
817 save_gp
818 start_subparse
819 sv_catpvf
96ad942f 820 sv_catpvf_mg
adfe19db
MHM
821 sv_cmp_locale
822 sv_derived_from
823 sv_gets
824 sv_setpvf
96ad942f 825 sv_setpvf_mg
adfe19db
MHM
826 sv_taint
827 sv_tainted
828 sv_untaint
96ad942f
MHM
829 sv_vcatpvf
830 sv_vcatpvf_mg
adfe19db 831 sv_vcatpvfn
96ad942f
MHM
832 sv_vsetpvf
833 sv_vsetpvf_mg
adfe19db
MHM
834 sv_vsetpvfn
835 unsharepvn
96ad942f 836 vnewSVpvf
adfe19db
MHM
837
838=back
839
840=head1 BUGS
841
842If you find any bugs, C<Devel::PPPort> doesn't seem to build on your
843system or any of its tests fail, please use the CPAN Request Tracker
844at L<http://rt.cpan.org/> to create a ticket for the module.
845
846=head1 AUTHORS
847
848=over 2
849
850=item *
0a7c7f4f 851
dbda3434 852Version 1.x of Devel::PPPort was written by Kenneth Albanowski.
0a7c7f4f 853
adfe19db
MHM
854=item *
855
dbda3434 856Version 2.x was ported to the Perl core by Paul Marquess.
0a7c7f4f 857
adfe19db
MHM
858=item *
859
860Version 3.x was ported back to CPAN by Marcus Holland-Moritz.
861
862=back
863
864=head1 COPYRIGHT
865
9132e1a3 866Version 3.x, Copyright (C) 2004-2005, Marcus Holland-Moritz.
adfe19db
MHM
867
868Version 2.x, Copyright (C) 2001, Paul Marquess.
869
870Version 1.x, Copyright (C) 1999, Kenneth Albanowski.
871
872This program is free software; you can redistribute it and/or
873modify it under the same terms as Perl itself.
874
0a7c7f4f
JH
875=head1 SEE ALSO
876
adfe19db 877See L<h2xs>, L<ppport.h>.
0a7c7f4f
JH
878
879=cut
880
44284200
JH
881package Devel::PPPort;
882
44284200 883require DynaLoader;
0a7c7f4f 884use strict;
adfe19db 885use vars qw($VERSION @ISA $data);
44284200 886
2dd69576 887$VERSION = do { my @r = '$Snapshot: /Devel-PPPort/3.06 $' =~ /(\d+\.\d+(?:_\d+)?)/; @r ? $r[0] : '9.99' };
44284200 888
adfe19db 889@ISA = qw(DynaLoader);
0a7c7f4f 890
44284200
JH
891bootstrap Devel::PPPort;
892
0a7c7f4f 893{
adfe19db
MHM
894 $data = do { local $/; <DATA> };
895 my $now = localtime;
896 my $pkg = 'Devel::PPPort';
897 $data =~ s/__PERL_VERSION__/$]/g;
898 $data =~ s/__VERSION__/$VERSION/g;
899 $data =~ s/__DATE__/$now/g;
900 $data =~ s/__PKG__/$pkg/g;
901 $data =~ s/^POD\s//gm;
0a7c7f4f
JH
902}
903
904sub WriteFile
905{
adfe19db
MHM
906 my $file = shift || 'ppport.h';
907 my $copy = $data;
908 $copy =~ s/\bppport\.h\b/$file/g;
0a7c7f4f 909
adfe19db
MHM
910 open F, ">$file" or return undef;
911 print F $copy;
912 close F;
0a7c7f4f 913
adfe19db 914 return 1;
0a7c7f4f
JH
915}
916
9171;
918
adfe19db
MHM
919__DATA__
920#if 0
921<<'SKIP';
922#endif
0a7c7f4f 923/*
adfe19db 924----------------------------------------------------------------------
0a7c7f4f 925
adfe19db
MHM
926 ppport.h -- Perl/Pollution/Portability Version __VERSION__
927
928 Automatically created by __PKG__ running under
929 perl __PERL_VERSION__ on __DATE__.
930
931 Do NOT edit this file directly! -- Edit PPPort_pm.PL and the
932 includes in parts/inc/ instead.
0a7c7f4f 933
adfe19db
MHM
934 Use 'perldoc ppport.h' to view the documentation below.
935
936----------------------------------------------------------------------
937
938SKIP
939
940POD =pod
941POD
942POD =head1 NAME
943POD
944POD ppport.h - Perl/Pollution/Portability version __VERSION__
945POD
946POD =head1 SYNOPSIS
947POD
948POD perl ppport.h [options] [files]
949POD
950POD --help show short help
951POD
952POD --patch=file write one patch file with changes
953POD --copy=suffix write changed copies with suffix
954POD --diff=program use diff program and options
955POD
956POD --compat-version=version provide compatibility with Perl version
957POD --cplusplus accept C++ comments
958POD
959POD --quiet don't output anything except fatal errors
960POD --nodiag don't show diagnostics
961POD --nohints don't show hints
962POD --nochanges don't suggest changes
963POD
964POD --list-provided list provided API
965POD --list-unsupported list unsupported API
04fc8b94 966POD --api-info=name show Perl API portability information
adfe19db
MHM
967POD
968POD =head1 COMPATIBILITY
969POD
970POD This version of F<ppport.h> is designed to support operation with Perl
971POD installations back to 5.003, and has been tested up to 5.9.2.
972POD
973POD =head1 OPTIONS
974POD
975POD =head2 --help
976POD
977POD Display a brief usage summary.
978POD
979POD =head2 --patch=I<file>
980POD
981POD If this option is given, a single patch file will be created if
982POD any changes are suggested. This requires a working diff program
983POD to be installed on your system.
984POD
985POD =head2 --copy=I<suffix>
986POD
987POD If this option is given, a copy of each file will be saved with
988POD the given suffix that contains the suggested changes. This does
989POD not require any external programs.
990POD
991POD If neither C<--patch> or C<--copy> are given, the default is to
992POD simply print the diffs for each file. This requires either
993POD C<Text::Diff> or a C<diff> program to be installed.
994POD
995POD =head2 --diff=I<program>
996POD
997POD Manually set the diff program and options to use. The default
998POD is to use C<Text::Diff>, when installed, and output unified
999POD context diffs.
1000POD
1001POD =head2 --compat-version=I<version>
1002POD
1003POD Tell F<ppport.h> to check for compatibility with the given
1004POD Perl version. The default is to check for compatibility with Perl
1005POD version 5.003. You can use this option to reduce the output
1006POD of F<ppport.h> if you intend to be backward compatible only
1007POD up to a certain Perl version.
1008POD
1009POD =head2 --cplusplus
1010POD
1011POD Usually, F<ppport.h> will detect C++ style comments and
1012POD replace them with C style comments for portability reasons.
1013POD Using this option instructs F<ppport.h> to leave C++
1014POD comments untouched.
1015POD
1016POD =head2 --quiet
1017POD
1018POD Be quiet. Don't print anything except fatal errors.
1019POD
1020POD =head2 --nodiag
1021POD
1022POD Don't output any diagnostic messages. Only portability
1023POD alerts will be printed.
1024POD
1025POD =head2 --nohints
1026POD
1027POD Don't output any hints. Hints often contain useful portability
1028POD notes.
1029POD
1030POD =head2 --nochanges
1031POD
1032POD Don't suggest any changes. Only give diagnostic output and hints
1033POD unless these are also deactivated.
1034POD
1035POD =head2 --list-provided
1036POD
1037POD Lists the API elements for which compatibility is provided by
1038POD F<ppport.h>. Also lists if it must be explicitly requested,
1039POD if it has dependencies, and if there are hints for it.
1040POD
1041POD =head2 --list-unsupported
1042POD
1043POD Lists the API elements that are known not to be supported by
1044POD F<ppport.h> and below which version of Perl they probably
1045POD won't be available or work.
1046POD
04fc8b94
MHM
1047POD =head2 --api-info=I<name>
1048POD
1049POD Show portability information for API elements matching I<name>.
9132e1a3
MHM
1050POD If I<name> is surrounded by slashes, it is interpreted as a regular
1051POD expression.
04fc8b94 1052POD
adfe19db
MHM
1053POD =head1 DESCRIPTION
1054POD
1055POD In order for a Perl extension (XS) module to be as portable as possible
1056POD across differing versions of Perl itself, certain steps need to be taken.
1057POD
1058POD =over 4
1059POD
1060POD =item *
1061POD
1062POD Including this header is the first major one. This alone will give you
1063POD access to a large part of the Perl API that hasn't been available in
1064POD earlier Perl releases. Use
1065POD
1066POD perl ppport.h --list-provided
1067POD
1068POD to see which API elements are provided by ppport.h.
1069POD
1070POD =item *
1071POD
1072POD You should avoid using deprecated parts of the API. For example, using
1073POD global Perl variables without the C<PL_> prefix is deprecated. Also,
1074POD some API functions used to have a C<perl_> prefix. Using this form is
1075POD also deprecated. You can safely use the supported API, as F<ppport.h>
1076POD will provide wrappers for older Perl versions.
1077POD
1078POD =item *
1079POD
1080POD If you use one of a few functions that were not present in earlier
1081POD versions of Perl, and that can't be provided using a macro, you have
1082POD to explicitly request support for these functions by adding one or
1083POD more C<#define>s in your source code before the inclusion of F<ppport.h>.
1084POD
1085POD These functions will be marked C<explicit> in the list shown by
1086POD C<--list-provided>.
1087POD
1088POD Depending on whether you module has a single or multiple files that
1089POD use such functions, you want either C<static> or global variants.
1090POD
1091POD For a C<static> function, use:
1092POD
1093POD #define NEED_function
1094POD
1095POD For a global function, use:
1096POD
1097POD #define NEED_function_GLOBAL
1098POD
1099POD Note that you mustn't have more than one global request for one
1100POD function in your project.
1101POD
96ad942f
MHM
1102POD Function Static Request Global Request
1103POD -----------------------------------------------------------------------------------------
1104POD eval_pv() NEED_eval_pv NEED_eval_pv_GLOBAL
1105POD grok_bin() NEED_grok_bin NEED_grok_bin_GLOBAL
1106POD grok_hex() NEED_grok_hex NEED_grok_hex_GLOBAL
1107POD grok_number() NEED_grok_number NEED_grok_number_GLOBAL
1108POD grok_numeric_radix() NEED_grok_numeric_radix NEED_grok_numeric_radix_GLOBAL
1109POD grok_oct() NEED_grok_oct NEED_grok_oct_GLOBAL
1110POD newCONSTSUB() NEED_newCONSTSUB NEED_newCONSTSUB_GLOBAL
1111POD newRV_noinc() NEED_newRV_noinc NEED_newRV_noinc_GLOBAL
1112POD sv_2pv_nolen() NEED_sv_2pv_nolen NEED_sv_2pv_nolen_GLOBAL
1113POD sv_2pvbyte() NEED_sv_2pvbyte NEED_sv_2pvbyte_GLOBAL
1114POD sv_catpvf_mg() NEED_sv_catpvf_mg NEED_sv_catpvf_mg_GLOBAL
1115POD sv_catpvf_mg_nocontext() NEED_sv_catpvf_mg_nocontext NEED_sv_catpvf_mg_nocontext_GLOBAL
1116POD sv_setpvf_mg() NEED_sv_setpvf_mg NEED_sv_setpvf_mg_GLOBAL
1117POD sv_setpvf_mg_nocontext() NEED_sv_setpvf_mg_nocontext NEED_sv_setpvf_mg_nocontext_GLOBAL
1118POD vnewSVpvf() NEED_vnewSVpvf NEED_vnewSVpvf_GLOBAL
adfe19db
MHM
1119POD
1120POD To avoid namespace conflicts, you can change the namespace of the
1121POD explicitly exported functions using the C<DPPP_NAMESPACE> macro.
1122POD Just C<#define> the macro before including C<ppport.h>:
1123POD
1124POD #define DPPP_NAMESPACE MyOwnNamespace_
1125POD #include "ppport.h"
1126POD
1127POD The default namespace is C<DPPP_>.
1128POD
1129POD =back
1130POD
1131POD The good thing is that most of the above can be checked by running
1132POD F<ppport.h> on your source code. See the next section for
1133POD details.
1134POD
1135POD =head1 EXAMPLES
1136POD
1137POD To verify whether F<ppport.h> is needed for your module, whether you
1138POD should make any changes to your code, and whether any special defines
1139POD should be used, F<ppport.h> can be run as a Perl script to check your
1140POD source code. Simply say:
1141POD
1142POD perl ppport.h
1143POD
1144POD The result will usually be a list of patches suggesting changes
1145POD that should at least be acceptable, if not necessarily the most
1146POD efficient solution, or a fix for all possible problems.
1147POD
1148POD If you know that your XS module uses features only available in
1149POD newer Perl releases, if you're aware that it uses C++ comments,
1150POD and if you want all suggestions as a single patch file, you could
1151POD use something like this:
1152POD
1153POD perl ppport.h --compat-version=5.6.0 --cplusplus --patch=test.diff
1154POD
1155POD If you only want your code to be scanned without any suggestions
1156POD for changes, use:
1157POD
1158POD perl ppport.h --nochanges
1159POD
1160POD You can specify a different C<diff> program or options, using
1161POD the C<--diff> option:
1162POD
1163POD perl ppport.h --diff='diff -C 10'
1164POD
1165POD This would output context diffs with 10 lines of context.
1166POD
9132e1a3
MHM
1167POD To display portability information for the C<newSVpvn> function,
1168POD use:
1169POD
1170POD perl ppport.h --api-info=newSVpvn
1171POD
1172POD Since the argument to C<--api-info> can be a regular expression,
1173POD you can use
1174POD
1175POD perl ppport.h --api-info=/_nomg$/
1176POD
1177POD to display portability information for all C<_nomg> functions or
1178POD
1179POD perl ppport.h --api-info=/./
1180POD
1181POD to display information for all known API elements.
1182POD
adfe19db
MHM
1183POD =head1 BUGS
1184POD
1185POD If this version of F<ppport.h> is causing failure during
1186POD the compilation of this module, please check if newer versions
1187POD of either this module or C<Devel::PPPort> are available on CPAN
1188POD before sending a bug report.
1189POD
1190POD If F<ppport.h> was generated using the latest version of
1191POD C<Devel::PPPort> and is causing failure of this module, please
1192POD file a bug report using the CPAN Request Tracker at L<http://rt.cpan.org/>.
1193POD
1194POD Please include the following information:
1195POD
1196POD =over 4
1197POD
1198POD =item 1.
1199POD
1200POD The complete output from running "perl -V"
1201POD
1202POD =item 2.
1203POD
1204POD This file.
1205POD
1206POD =item 3.
1207POD
1208POD The name and version of the module you were trying to build.
1209POD
1210POD =item 4.
1211POD
1212POD A full log of the build that failed.
1213POD
1214POD =item 5.
1215POD
1216POD Any other information that you think could be relevant.
1217POD
1218POD =back
1219POD
1220POD For the latest version of this code, please get the C<Devel::PPPort>
1221POD module from CPAN.
1222POD
1223POD =head1 COPYRIGHT
1224POD
9132e1a3 1225POD Version 3.x, Copyright (c) 2004-2005, Marcus Holland-Moritz.
adfe19db
MHM
1226POD
1227POD Version 2.x, Copyright (C) 2001, Paul Marquess.
1228POD
1229POD Version 1.x, Copyright (C) 1999, Kenneth Albanowski.
1230POD
1231POD This program is free software; you can redistribute it and/or
1232POD modify it under the same terms as Perl itself.
1233POD
1234POD =head1 SEE ALSO
1235POD
1236POD See L<Devel::PPPort>.
0a7c7f4f 1237
adfe19db 1238=cut
0a7c7f4f 1239
adfe19db 1240use strict;
0a7c7f4f 1241
adfe19db
MHM
1242my %opt = (
1243 quiet => 0,
1244 diag => 1,
1245 hints => 1,
1246 changes => 1,
1247 cplusplus => 0,
1248);
1249
1250my($ppport) = $0 =~ /([\w.]+)$/;
1251my $LF = '(?:\r\n|[\r\n])'; # line feed
1252my $HS = "[ \t]"; # horizontal whitespace
1253
1254eval {
1255 require Getopt::Long;
1256 Getopt::Long::GetOptions(\%opt, qw(
1257 help quiet diag! hints! changes! cplusplus
1258 patch=s copy=s diff=s compat-version=s
04fc8b94 1259 list-provided list-unsupported api-info=s
adfe19db
MHM
1260 )) or usage();
1261};
1262
1263if ($@ and grep /^-/, @ARGV) {
1264 usage() if "@ARGV" =~ /^--?h(?:elp)?$/;
1265 die "Getopt::Long not found. Please don't use any options.\n";
0a7c7f4f 1266}
0a7c7f4f 1267
adfe19db 1268usage() if $opt{help};
0a7c7f4f 1269
adfe19db
MHM
1270if (exists $opt{'compat-version'}) {
1271 my($r,$v,$s) = eval { parse_version($opt{'compat-version'}) };
1272 if ($@) {
1273 die "Invalid version number format: '$opt{'compat-version'}'\n";
1274 }
1275 die "Only Perl 5 is supported\n" if $r != 5;
1276 die "Invalid version number: $opt{'compat-version'}\n" if $v >= 1000 || $v >= 1000;
1277 $opt{'compat-version'} = sprintf "%d.%03d%03d", $r, $v, $s;
1278}
1279else {
1280 $opt{'compat-version'} = 5;
0a7c7f4f 1281}
44284200 1282
adfe19db
MHM
1283# Never use C comments in this file!!!!!
1284my $ccs = '/'.'*';
1285my $cce = '*'.'/';
1286my $rccs = quotemeta $ccs;
1287my $rcce = quotemeta $cce;
0a7c7f4f 1288
adfe19db 1289my @files;
0a7c7f4f 1290
adfe19db
MHM
1291if (@ARGV) {
1292 @files = map { glob $_ } @ARGV;
1293}
1294else {
1295 eval {
1296 require File::Find;
1297 File::Find::find(sub {
1298 $File::Find::name =~ /\.(xs|c|h|cc)$/i
1299 and push @files, $File::Find::name;
1300 }, '.');
1301 };
1302 if ($@) {
1303 @files = map { glob $_ } qw(*.xs *.c *.h *.cc);
1304 }
1305 my %filter = map { /(.*)\.xs$/ ? ("$1.c" => 1) : () } @files;
1306 @files = grep { !/\b\Q$ppport\E$/i && !exists $filter{$_} } @files;
1307}
44284200 1308
adfe19db
MHM
1309unless (@files) {
1310 die "No input files given!\n";
1311}
0a7c7f4f 1312
adfe19db
MHM
1313my %API = map { /^(\w+)\|([^|]*)\|([^|]*)\|(\w*)$/
1314 ? ( $1 => {
1315 ($2 ? ( base => $2 ) : ()),
1316 ($3 ? ( todo => $3 ) : ()),
1317 (index($4, 'v') >= 0 ? ( varargs => 1 ) : ()),
1318 (index($4, 'p') >= 0 ? ( provided => 1 ) : ()),
1319 (index($4, 'n') >= 0 ? ( nothxarg => 1 ) : ()),
1320 } )
1321 : die "invalid spec: $_" } qw(
1322AvFILLp|5.004050||p
1323AvFILL|||
1324CLASS|||n
1325CX_CURPAD_SAVE|||
1326CX_CURPAD_SV|||
1327CopFILEAV|5.006000||p
1328CopFILEGV_set|5.006000||p
1329CopFILEGV|5.006000||p
1330CopFILESV|5.006000||p
1331CopFILE_set|5.006000||p
1332CopFILE|5.006000||p
1333CopSTASHPV_set|5.006000||p
1334CopSTASHPV|5.006000||p
1335CopSTASH_eq|5.006000||p
1336CopSTASH_set|5.006000||p
1337CopSTASH|5.006000||p
1338CopyD|5.009002||p
1339Copy|||
1340CvPADLIST|||
1341CvSTASH|||
1342CvWEAKOUTSIDE|||
1343DEFSV|5.004050||p
a745474a 1344END_EXTERN_C|5.005000||p
adfe19db
MHM
1345ENTER|||
1346ERRSV|5.004050||p
1347EXTEND|||
a745474a 1348EXTERN_C|5.005000||p
adfe19db
MHM
1349FREETMPS|||
1350GIMME_V||5.004000|n
1351GIMME|||n
1352GROK_NUMERIC_RADIX|5.007002||p
1353G_ARRAY|||
1354G_DISCARD|||
1355G_EVAL|||
1356G_NOARGS|||
1357G_SCALAR|||
1358G_VOID||5.004000|
1359GetVars|||
1360GvSV|||
1361Gv_AMupdate|||
1362HEf_SVKEY||5.004000|
1363HeHASH||5.004000|
1364HeKEY||5.004000|
1365HeKLEN||5.004000|
1366HePV||5.004000|
1367HeSVKEY_force||5.004000|
1368HeSVKEY_set||5.004000|
1369HeSVKEY||5.004000|
1370HeVAL||5.004000|
1371HvNAME|||
1372INT2PTR|5.006000||p
1373IN_LOCALE_COMPILETIME|5.007002||p
1374IN_LOCALE_RUNTIME|5.007002||p
1375IN_LOCALE|5.007002||p
1376IN_PERL_COMPILETIME|5.008001||p
1377IS_NUMBER_GREATER_THAN_UV_MAX|5.007002||p
1378IS_NUMBER_INFINITY|5.007002||p
1379IS_NUMBER_IN_UV|5.007002||p
1380IS_NUMBER_NAN|5.007003||p
1381IS_NUMBER_NEG|5.007002||p
1382IS_NUMBER_NOT_INT|5.007002||p
1383IVSIZE|5.006000||p
1384IVTYPE|5.006000||p
1385IVdf|5.006000||p
1386LEAVE|||
1387LVRET|||
1388MARK|||
a745474a 1389MY_CXT_CLONE|5.009002||p
adfe19db
MHM
1390MY_CXT_INIT|5.007003||p
1391MY_CXT|5.007003||p
1392MoveD|5.009002||p
1393Move|||
1394NEWSV|||
1395NOOP|5.005000||p
1396NUM2PTR|5.006000||p
1397NVTYPE|5.006000||p
1398NVef|5.006001||p
1399NVff|5.006001||p
1400NVgf|5.006001||p
1401Newc|||
1402Newz|||
1403New|||
1404Nullav|||
1405Nullch|||
1406Nullcv|||
1407Nullhv|||
1408Nullsv|||
1409ORIGMARK|||
1410PAD_BASE_SV|||
1411PAD_CLONE_VARS|||
1412PAD_COMPNAME_FLAGS|||
1413PAD_COMPNAME_GEN|||
1414PAD_COMPNAME_OURSTASH|||
1415PAD_COMPNAME_PV|||
1416PAD_COMPNAME_TYPE|||
1417PAD_RESTORE_LOCAL|||
1418PAD_SAVE_LOCAL|||
1419PAD_SAVE_SETNULLPAD|||
1420PAD_SETSV|||
1421PAD_SET_CUR_NOSAVE|||
1422PAD_SET_CUR|||
1423PAD_SVl|||
1424PAD_SV|||
1425PERL_BCDVERSION|5.009002||p
a745474a 1426PERL_GCC_BRACE_GROUPS_FORBIDDEN|5.008001||p
adfe19db
MHM
1427PERL_INT_MAX|5.004000||p
1428PERL_INT_MIN|5.004000||p
1429PERL_LONG_MAX|5.004000||p
1430PERL_LONG_MIN|5.004000||p
1431PERL_MAGIC_arylen|5.007002||p
1432PERL_MAGIC_backref|5.007002||p
1433PERL_MAGIC_bm|5.007002||p
1434PERL_MAGIC_collxfrm|5.007002||p
1435PERL_MAGIC_dbfile|5.007002||p
1436PERL_MAGIC_dbline|5.007002||p
1437PERL_MAGIC_defelem|5.007002||p
1438PERL_MAGIC_envelem|5.007002||p
1439PERL_MAGIC_env|5.007002||p
1440PERL_MAGIC_ext|5.007002||p
1441PERL_MAGIC_fm|5.007002||p
1442PERL_MAGIC_glob|5.007002||p
1443PERL_MAGIC_isaelem|5.007002||p
1444PERL_MAGIC_isa|5.007002||p
1445PERL_MAGIC_mutex|5.007002||p
1446PERL_MAGIC_nkeys|5.007002||p
1447PERL_MAGIC_overload_elem|5.007002||p
1448PERL_MAGIC_overload_table|5.007002||p
1449PERL_MAGIC_overload|5.007002||p
1450PERL_MAGIC_pos|5.007002||p
1451PERL_MAGIC_qr|5.007002||p
1452PERL_MAGIC_regdata|5.007002||p
1453PERL_MAGIC_regdatum|5.007002||p
1454PERL_MAGIC_regex_global|5.007002||p
1455PERL_MAGIC_shared_scalar|5.007003||p
1456PERL_MAGIC_shared|5.007003||p
1457PERL_MAGIC_sigelem|5.007002||p
1458PERL_MAGIC_sig|5.007002||p
1459PERL_MAGIC_substr|5.007002||p
1460PERL_MAGIC_sv|5.007002||p
1461PERL_MAGIC_taint|5.007002||p
1462PERL_MAGIC_tiedelem|5.007002||p
1463PERL_MAGIC_tiedscalar|5.007002||p
1464PERL_MAGIC_tied|5.007002||p
1465PERL_MAGIC_utf8|5.008001||p
1466PERL_MAGIC_uvar_elem|5.007003||p
1467PERL_MAGIC_uvar|5.007002||p
1468PERL_MAGIC_vec|5.007002||p
1469PERL_MAGIC_vstring|5.008001||p
1470PERL_QUAD_MAX|5.004000||p
1471PERL_QUAD_MIN|5.004000||p
1472PERL_REVISION|5.006000||p
1473PERL_SCAN_ALLOW_UNDERSCORES|5.007003||p
1474PERL_SCAN_DISALLOW_PREFIX|5.007003||p
1475PERL_SCAN_GREATER_THAN_UV_MAX|5.007003||p
1476PERL_SCAN_SILENT_ILLDIGIT|5.008001||p
1477PERL_SHORT_MAX|5.004000||p
1478PERL_SHORT_MIN|5.004000||p
1479PERL_SUBVERSION|5.006000||p
1480PERL_UCHAR_MAX|5.004000||p
1481PERL_UCHAR_MIN|5.004000||p
1482PERL_UINT_MAX|5.004000||p
1483PERL_UINT_MIN|5.004000||p
1484PERL_ULONG_MAX|5.004000||p
1485PERL_ULONG_MIN|5.004000||p
1486PERL_UNUSED_DECL|5.007002||p
1487PERL_UQUAD_MAX|5.004000||p
1488PERL_UQUAD_MIN|5.004000||p
1489PERL_USHORT_MAX|5.004000||p
1490PERL_USHORT_MIN|5.004000||p
1491PERL_VERSION|5.006000||p
96ad942f
MHM
1492PL_DBsingle|||pn
1493PL_DBsub|||pn
adfe19db
MHM
1494PL_DBtrace|||n
1495PL_Sv|5.005000||p
1496PL_compiling|5.004050||p
1497PL_copline|5.005000||p
1498PL_curcop|5.004050||p
1499PL_curstash|5.004050||p
a745474a 1500PL_debstash|5.004050||p
adfe19db 1501PL_defgv|5.004050||p
a745474a 1502PL_diehook|5.004050||p
adfe19db
MHM
1503PL_dirty|5.004050||p
1504PL_dowarn|||pn
a745474a 1505PL_errgv|5.004050||p
adfe19db
MHM
1506PL_hexdigit|5.005000||p
1507PL_hints|5.005000||p
1508PL_last_in_gv|||n
1509PL_modglobal||5.005000|n
1510PL_na|5.004050||pn
a745474a 1511PL_no_modify|5.006000||p
adfe19db 1512PL_ofs_sv|||n
a745474a 1513PL_perl_destruct_level|5.004050||p
adfe19db 1514PL_perldb|5.004050||p
a745474a 1515PL_ppaddr|5.006000||p
adfe19db
MHM
1516PL_rsfp_filters|5.004050||p
1517PL_rsfp|5.004050||p
1518PL_rs|||n
a745474a
MHM
1519PL_stack_base|5.004050||p
1520PL_stack_sp|5.004050||p
adfe19db 1521PL_stdingv|5.004050||p
a745474a 1522PL_sv_arenaroot|5.004050||p
adfe19db
MHM
1523PL_sv_no|5.004050||pn
1524PL_sv_undef|5.004050||pn
1525PL_sv_yes|5.004050||pn
a745474a
MHM
1526PL_tainted|5.004050||p
1527PL_tainting|5.004050||p
adfe19db
MHM
1528POPi|||n
1529POPl|||n
1530POPn|||n
1531POPpbytex||5.007001|n
1532POPpx||5.005030|n
1533POPp|||n
1534POPs|||n
1535PTR2IV|5.006000||p
1536PTR2NV|5.006000||p
1537PTR2UV|5.006000||p
1538PTR2ul|5.007001||p
1539PTRV|5.006000||p
1540PUSHMARK|||
1541PUSHi|||
1542PUSHmortal|5.009002||p
1543PUSHn|||
1544PUSHp|||
1545PUSHs|||
96ad942f 1546PUSHu|5.004000||p
adfe19db
MHM
1547PUTBACK|||
1548PerlIO_clearerr||5.007003|
1549PerlIO_close||5.007003|
1550PerlIO_eof||5.007003|
1551PerlIO_error||5.007003|
1552PerlIO_fileno||5.007003|
1553PerlIO_fill||5.007003|
1554PerlIO_flush||5.007003|
1555PerlIO_get_base||5.007003|
1556PerlIO_get_bufsiz||5.007003|
1557PerlIO_get_cnt||5.007003|
1558PerlIO_get_ptr||5.007003|
1559PerlIO_read||5.007003|
1560PerlIO_seek||5.007003|
1561PerlIO_set_cnt||5.007003|
1562PerlIO_set_ptrcnt||5.007003|
1563PerlIO_setlinebuf||5.007003|
1564PerlIO_stderr||5.007003|
1565PerlIO_stdin||5.007003|
1566PerlIO_stdout||5.007003|
1567PerlIO_tell||5.007003|
1568PerlIO_unread||5.007003|
1569PerlIO_write||5.007003|
1570Poison|5.008000||p
1571RETVAL|||n
1572Renewc|||
1573Renew|||
1574SAVECLEARSV|||
1575SAVECOMPPAD|||
1576SAVEPADSV|||
1577SAVETMPS|||
1578SAVE_DEFSV|5.004050||p
1579SPAGAIN|||
1580SP|||
a745474a 1581START_EXTERN_C|5.005000||p
adfe19db 1582START_MY_CXT|5.007003||p
a745474a
MHM
1583STMT_END|||p
1584STMT_START|||p
adfe19db
MHM
1585ST|||
1586SVt_IV|||
1587SVt_NV|||
1588SVt_PVAV|||
1589SVt_PVCV|||
1590SVt_PVHV|||
1591SVt_PVMG|||
1592SVt_PV|||
1593Safefree|||
1594Slab_Alloc|||
1595Slab_Free|||
1596StructCopy|||
1597SvCUR_set|||
1598SvCUR|||
1599SvEND|||
1600SvGETMAGIC|5.004050||p
1601SvGROW|||
1602SvIOK_UV||5.006000|
1603SvIOK_notUV||5.006000|
1604SvIOK_off|||
1605SvIOK_only_UV||5.006000|
1606SvIOK_only|||
1607SvIOK_on|||
1608SvIOKp|||
1609SvIOK|||
1610SvIVX|||
1611SvIV_nomg|5.009001||p
1612SvIVx|||
1613SvIV|||
1614SvIsCOW_shared_hash||5.008003|
1615SvIsCOW||5.008003|
1616SvLEN|||
1617SvLOCK||5.007003|
1618SvNIOK_off|||
1619SvNIOKp|||
1620SvNIOK|||
1621SvNOK_off|||
1622SvNOK_only|||
1623SvNOK_on|||
1624SvNOKp|||
1625SvNOK|||
1626SvNVX|||
1627SvNVx|||
1628SvNV|||
1629SvOK|||
1630SvOOK|||
1631SvPOK_off|||
1632SvPOK_only_UTF8||5.006000|
1633SvPOK_only|||
1634SvPOK_on|||
1635SvPOKp|||
1636SvPOK|||
1637SvPVX|||
1638SvPV_force_nomg|5.007002||p
1639SvPV_force|||
1640SvPV_nolen|5.006000||p
1641SvPV_nomg|5.007002||p
1642SvPVbyte_force||5.009002|
1643SvPVbyte_nolen||5.006000|
1644SvPVbytex_force||5.006000|
1645SvPVbytex||5.006000|
1646SvPVbyte|5.006000||p
1647SvPVutf8_force||5.006000|
1648SvPVutf8_nolen||5.006000|
1649SvPVutf8x_force||5.006000|
1650SvPVutf8x||5.006000|
1651SvPVutf8||5.006000|
1652SvPVx|||
1653SvPV|||
1654SvREFCNT_dec|||
1655SvREFCNT_inc|||
1656SvREFCNT|||
1657SvROK_off|||
1658SvROK_on|||
1659SvROK|||
1660SvRV|||
1661SvSETMAGIC|||
1662SvSHARE||5.007003|
1663SvSTASH|||
1664SvSetMagicSV_nosteal||5.004000|
1665SvSetMagicSV||5.004000|
1666SvSetSV_nosteal||5.004000|
1667SvSetSV|||
1668SvTAINTED_off||5.004000|
1669SvTAINTED_on||5.004000|
1670SvTAINTED||5.004000|
1671SvTAINT|||
1672SvTRUE|||
1673SvTYPE|||
1674SvUNLOCK||5.007003|
1675SvUOK||5.007001|
1676SvUPGRADE|||
1677SvUTF8_off||5.006000|
1678SvUTF8_on||5.006000|
1679SvUTF8||5.006000|
1680SvUVXx|5.004000||p
1681SvUVX|5.004000||p
1682SvUV_nomg|5.009001||p
1683SvUVx|5.004000||p
1684SvUV|5.004000||p
1685SvVOK||5.008001|
1686THIS|||n
1687UNDERBAR|5.009002||p
1688UVSIZE|5.006000||p
1689UVTYPE|5.006000||p
1690UVXf|5.007001||p
1691UVof|5.006000||p
1692UVuf|5.006000||p
1693UVxf|5.006000||p
9132e1a3
MHM
1694XCPT_CATCH|5.009002||p
1695XCPT_RETHROW|5.009002||p
1696XCPT_TRY_END|5.009002||p
1697XCPT_TRY_START|5.009002||p
adfe19db
MHM
1698XPUSHi|||
1699XPUSHmortal|5.009002||p
1700XPUSHn|||
1701XPUSHp|||
1702XPUSHs|||
96ad942f 1703XPUSHu|5.004000||p
adfe19db
MHM
1704XSRETURN_EMPTY|||
1705XSRETURN_IV|||
1706XSRETURN_NO|||
1707XSRETURN_NV|||
1708XSRETURN_PV|||
1709XSRETURN_UNDEF|||
1710XSRETURN_UV|5.008001||p
1711XSRETURN_YES|||
1712XSRETURN|||
1713XST_mIV|||
1714XST_mNO|||
1715XST_mNV|||
1716XST_mPV|||
1717XST_mUNDEF|||
1718XST_mUV|5.008001||p
1719XST_mYES|||
1720XS_VERSION_BOOTCHECK|||
1721XS_VERSION|||
1722XS|||
1723ZeroD|5.009002||p
1724Zero|||
1725_aMY_CXT|5.007003||p
1726_pMY_CXT|5.007003||p
1727aMY_CXT_|5.007003||p
1728aMY_CXT|5.007003||p
1729aTHX_|5.006000||p
1730aTHX|5.006000||p
1731add_data|||
1732allocmy|||
1733amagic_call|||
1734any_dup|||
1735ao|||
1736append_elem|||
1737append_list|||
1738apply_attrs_my|||
1739apply_attrs_string||5.006001|
1740apply_attrs|||
1741apply|||
1742asIV|||
1743asUV|||
1744atfork_lock||5.007003|n
1745atfork_unlock||5.007003|n
1746av_clear|||
1747av_delete||5.006000|
1748av_exists||5.006000|
1749av_extend|||
1750av_fake|||
1751av_fetch|||
1752av_fill|||
1753av_len|||
1754av_make|||
1755av_pop|||
1756av_push|||
1757av_reify|||
1758av_shift|||
1759av_store|||
1760av_undef|||
1761av_unshift|||
1762ax|||n
1763bad_type|||
1764bind_match|||
1765block_end|||
1766block_gimme||5.004000|
1767block_start|||
1768boolSV|5.004000||p
1769boot_core_PerlIO|||
1770boot_core_UNIVERSAL|||
1771boot_core_xsutils|||
1772bytes_from_utf8||5.007001|
1773bytes_to_utf8||5.006001|
1774cache_re|||
1775call_argv|5.006000||p
1776call_atexit||5.006000|
1777call_body|||
1778call_list_body|||
1779call_list||5.004000|
1780call_method|5.006000||p
1781call_pv|5.006000||p
1782call_sv|5.006000||p
1783calloc||5.007002|n
1784cando|||
1785cast_i32||5.006000|
1786cast_iv||5.006000|
1787cast_ulong||5.006000|
1788cast_uv||5.006000|
1789check_uni|||
1790checkcomma|||
1791checkposixcc|||
1792cl_and|||
1793cl_anything|||
1794cl_init_zero|||
1795cl_init|||
1796cl_is_anything|||
1797cl_or|||
1798closest_cop|||
1799convert|||
1800cop_free|||
1801cr_textfilter|||
1802croak_nocontext|||vn
1803croak|||v
1804csighandler||5.007001|n
1805custom_op_desc||5.007003|
1806custom_op_name||5.007003|
1807cv_ckproto|||
1808cv_clone|||
1809cv_const_sv||5.004000|
1810cv_dump|||
1811cv_undef|||
1812cx_dump||5.005000|
1813cx_dup|||
1814cxinc|||
1815dAX|5.007002||p
1816dITEMS|5.007002||p
1817dMARK|||
1818dMY_CXT_SV|5.007003||p
1819dMY_CXT|5.007003||p
1820dNOOP|5.006000||p
1821dORIGMARK|||
1822dSP|||
1823dTHR|5.004050||p
1824dTHXa|5.006000||p
1825dTHXoa|5.006000||p
1826dTHX|5.006000||p
1827dUNDERBAR|5.009002||p
9132e1a3 1828dXCPT|5.009002||p
adfe19db
MHM
1829dXSARGS|||
1830dXSI32|||
9132e1a3 1831dXSTARG|5.006000||p
adfe19db
MHM
1832deb_curcv|||
1833deb_nocontext|||vn
1834deb_stack_all|||
1835deb_stack_n|||
1836debop||5.005000|
1837debprofdump||5.005000|
1838debprof|||
1839debstackptrs||5.007003|
1840debstack||5.007003|
1841deb||5.007003|v
adfe19db
MHM
1842del_he|||
1843del_sv|||
1844del_xiv|||
1845del_xnv|||
1846del_xpvav|||
1847del_xpvbm|||
1848del_xpvcv|||
1849del_xpvhv|||
1850del_xpviv|||
1851del_xpvlv|||
1852del_xpvmg|||
1853del_xpvnv|||
1854del_xpv|||
1855del_xrv|||
1856delimcpy||5.004000|
1857depcom|||
1858deprecate_old|||
1859deprecate|||
1860despatch_signals||5.007001|
1861die_nocontext|||vn
1862die_where|||
1863die|||v
1864dirp_dup|||
1865div128|||
1866djSP|||
1867do_aexec5|||
1868do_aexec|||
1869do_aspawn|||
1870do_binmode||5.004050|
1871do_chomp|||
1872do_chop|||
1873do_close|||
1874do_dump_pad|||
1875do_eof|||
1876do_exec3|||
1877do_execfree|||
1878do_exec|||
1879do_gv_dump||5.006000|
1880do_gvgv_dump||5.006000|
1881do_hv_dump||5.006000|
1882do_ipcctl|||
1883do_ipcget|||
1884do_join|||
1885do_kv|||
1886do_magic_dump||5.006000|
1887do_msgrcv|||
1888do_msgsnd|||
1889do_oddball|||
1890do_op_dump||5.006000|
1891do_open9||5.006000|
1892do_openn||5.007001|
1893do_open||5.004000|
1894do_pipe|||
1895do_pmop_dump||5.006000|
1896do_print|||
1897do_readline|||
1898do_seek|||
1899do_semop|||
1900do_shmio|||
1901do_spawn_nowait|||
1902do_spawn|||
1903do_sprintf|||
1904do_sv_dump||5.006000|
1905do_sysseek|||
1906do_tell|||
1907do_trans_complex_utf8|||
1908do_trans_complex|||
1909do_trans_count_utf8|||
1910do_trans_count|||
1911do_trans_simple_utf8|||
1912do_trans_simple|||
1913do_trans|||
1914do_vecget|||
1915do_vecset|||
1916do_vop|||
1917docatch_body|||
1918docatch|||
1919doencodes|||
1920doeval|||
1921dofile|||
1922dofindlabel|||
1923doform|||
1924doing_taint||5.008001|n
1925dooneliner|||
1926doopen_pm|||
1927doparseform|||
1928dopoptoeval|||
1929dopoptolabel|||
1930dopoptoloop|||
1931dopoptosub_at|||
1932dopoptosub|||
1933dounwind|||
1934dowantarray|||
1935dump_all||5.006000|
1936dump_eval||5.006000|
1937dump_fds|||
1938dump_form||5.006000|
1939dump_indent||5.006000|v
1940dump_mstats|||
1941dump_packsubs||5.006000|
1942dump_sub||5.006000|
1943dump_vindent||5.006000|
1944dumpuntil|||
1945dup_attrlist|||
1946emulate_eaccess|||
1947eval_pv|5.006000||p
1948eval_sv|5.006000||p
1949expect_number|||
1950fbm_compile||5.005000|
1951fbm_instr||5.005000|
1952fd_on_nosuid_fs|||
1953filter_add|||
1954filter_del|||
1955filter_gets|||
1956filter_read|||
1957find_beginning|||
1958find_byclass|||
1959find_in_my_stash|||
1960find_runcv|||
1961find_rundefsvoffset||5.009002|
1962find_script|||
1963find_uninit_var|||
1964fold_constants|||
1965forbid_setid|||
1966force_ident|||
1967force_list|||
1968force_next|||
1969force_version|||
1970force_word|||
1971form_nocontext|||vn
1972form||5.004000|v
1973fp_dup|||
1974fprintf_nocontext|||vn
1975free_tied_hv_pool|||
1976free_tmps|||
1977gen_constant_list|||
1978get_av|5.006000||p
1979get_context||5.006000|n
1980get_cv|5.006000||p
1981get_db_sub|||
1982get_debug_opts|||
1983get_hash_seed|||
1984get_hv|5.006000||p
1985get_mstats|||
1986get_no_modify|||
1987get_num|||
1988get_op_descs||5.005000|
1989get_op_names||5.005000|
1990get_opargs|||
1991get_ppaddr||5.006000|
1992get_sv|5.006000||p
1993get_vtbl||5.005030|
1994getcwd_sv||5.007002|
1995getenv_len|||
1996gp_dup|||
1997gp_free|||
1998gp_ref|||
1999grok_bin|5.007003||p
2000grok_hex|5.007003||p
2001grok_number|5.007002||p
2002grok_numeric_radix|5.007002||p
2003grok_oct|5.007003||p
2004group_end|||
2005gv_AVadd|||
2006gv_HVadd|||
2007gv_IOadd|||
2008gv_autoload4||5.004000|
2009gv_check|||
2010gv_dump||5.006000|
2011gv_efullname3||5.004000|
2012gv_efullname4||5.006001|
2013gv_efullname|||
2014gv_ename|||
2015gv_fetchfile|||
2016gv_fetchmeth_autoload||5.007003|
2017gv_fetchmethod_autoload||5.004000|
2018gv_fetchmethod|||
2019gv_fetchmeth|||
9132e1a3 2020gv_fetchpvn_flags||5.009002|
adfe19db 2021gv_fetchpv|||
9132e1a3 2022gv_fetchsv||5.009002|
adfe19db
MHM
2023gv_fullname3||5.004000|
2024gv_fullname4||5.006001|
2025gv_fullname|||
2026gv_handler||5.007001|
2027gv_init_sv|||
2028gv_init|||
2029gv_share|||
2030gv_stashpvn|5.006000||p
2031gv_stashpv|||
2032gv_stashsv|||
2033he_dup|||
2034hfreeentries|||
2035hsplit|||
2036hv_assert||5.009001|
2037hv_clear_placeholders||5.009001|
2038hv_clear|||
2039hv_delayfree_ent||5.004000|
2040hv_delete_common|||
2041hv_delete_ent||5.004000|
2042hv_delete|||
2043hv_exists_ent||5.004000|
2044hv_exists|||
2045hv_fetch_common|||
2046hv_fetch_ent||5.004000|
2047hv_fetch|||
2048hv_free_ent||5.004000|
2049hv_iterinit|||
2050hv_iterkeysv||5.004000|
2051hv_iterkey|||
2052hv_iternext_flags||5.008000|
2053hv_iternextsv|||
2054hv_iternext|||
2055hv_iterval|||
2056hv_ksplit||5.004000|
2057hv_magic_check|||
2058hv_magic|||
2059hv_notallowed|||
2060hv_scalar||5.009001|
2061hv_store_ent||5.004000|
2062hv_store_flags||5.008000|
2063hv_store|||
2064hv_undef|||
2065ibcmp_locale||5.004000|
2066ibcmp_utf8||5.007003|
2067ibcmp|||
2068incl_perldb|||
2069incline|||
2070incpush|||
2071ingroup|||
2072init_argv_symbols|||
2073init_debugger|||
2074init_i18nl10n||5.006000|
2075init_i18nl14n||5.006000|
2076init_ids|||
2077init_interp|||
2078init_lexer|||
2079init_main_stash|||
2080init_perllib|||
2081init_postdump_symbols|||
2082init_predump_symbols|||
2083init_stacks||5.005000|
2084init_tm||5.007002|
2085instr|||
2086intro_my|||
2087intuit_method|||
2088intuit_more|||
2089invert|||
2090io_close|||
2091isALNUM|||
2092isALPHA|||
2093isDIGIT|||
2094isLOWER|||
2095isSPACE|||
2096isUPPER|||
2097is_an_int|||
9132e1a3 2098is_gv_magical_sv|||
adfe19db
MHM
2099is_gv_magical|||
2100is_handle_constructor|||
2101is_lvalue_sub||5.007001|
2102is_uni_alnum_lc||5.006000|
2103is_uni_alnumc_lc||5.006000|
2104is_uni_alnumc||5.006000|
2105is_uni_alnum||5.006000|
2106is_uni_alpha_lc||5.006000|
2107is_uni_alpha||5.006000|
2108is_uni_ascii_lc||5.006000|
2109is_uni_ascii||5.006000|
2110is_uni_cntrl_lc||5.006000|
2111is_uni_cntrl||5.006000|
2112is_uni_digit_lc||5.006000|
2113is_uni_digit||5.006000|
2114is_uni_graph_lc||5.006000|
2115is_uni_graph||5.006000|
2116is_uni_idfirst_lc||5.006000|
2117is_uni_idfirst||5.006000|
2118is_uni_lower_lc||5.006000|
2119is_uni_lower||5.006000|
2120is_uni_print_lc||5.006000|
2121is_uni_print||5.006000|
2122is_uni_punct_lc||5.006000|
2123is_uni_punct||5.006000|
2124is_uni_space_lc||5.006000|
2125is_uni_space||5.006000|
2126is_uni_upper_lc||5.006000|
2127is_uni_upper||5.006000|
2128is_uni_xdigit_lc||5.006000|
2129is_uni_xdigit||5.006000|
2130is_utf8_alnumc||5.006000|
2131is_utf8_alnum||5.006000|
2132is_utf8_alpha||5.006000|
2133is_utf8_ascii||5.006000|
2134is_utf8_char||5.006000|
2135is_utf8_cntrl||5.006000|
2136is_utf8_digit||5.006000|
2137is_utf8_graph||5.006000|
2138is_utf8_idcont||5.008000|
2139is_utf8_idfirst||5.006000|
2140is_utf8_lower||5.006000|
2141is_utf8_mark||5.006000|
2142is_utf8_print||5.006000|
2143is_utf8_punct||5.006000|
2144is_utf8_space||5.006000|
2145is_utf8_string_loc||5.008001|
2146is_utf8_string||5.006001|
2147is_utf8_upper||5.006000|
2148is_utf8_xdigit||5.006000|
2149isa_lookup|||
2150items|||n
2151ix|||n
2152jmaybe|||
2153keyword|||
2154leave_scope|||
2155lex_end|||
2156lex_start|||
2157linklist|||
2158list_assignment|||
2159listkids|||
2160list|||
2161load_module_nocontext|||vn
2162load_module||5.006000|v
2163localize|||
2164looks_like_number|||
2165lop|||
2166mPUSHi|5.009002||p
2167mPUSHn|5.009002||p
2168mPUSHp|5.009002||p
2169mPUSHu|5.009002||p
2170mXPUSHi|5.009002||p
2171mXPUSHn|5.009002||p
2172mXPUSHp|5.009002||p
2173mXPUSHu|5.009002||p
2174magic_clear_all_env|||
2175magic_clearenv|||
2176magic_clearpack|||
2177magic_clearsig|||
2178magic_dump||5.006000|
2179magic_existspack|||
2180magic_freeovrld|||
2181magic_freeregexp|||
2182magic_getarylen|||
2183magic_getdefelem|||
2184magic_getglob|||
2185magic_getnkeys|||
2186magic_getpack|||
2187magic_getpos|||
2188magic_getsig|||
2189magic_getsubstr|||
2190magic_gettaint|||
2191magic_getuvar|||
2192magic_getvec|||
2193magic_get|||
2194magic_killbackrefs|||
2195magic_len|||
2196magic_methcall|||
2197magic_methpack|||
2198magic_nextpack|||
2199magic_regdata_cnt|||
2200magic_regdatum_get|||
2201magic_regdatum_set|||
2202magic_scalarpack|||
2203magic_set_all_env|||
2204magic_setamagic|||
2205magic_setarylen|||
2206magic_setbm|||
2207magic_setcollxfrm|||
2208magic_setdbline|||
2209magic_setdefelem|||
2210magic_setenv|||
2211magic_setfm|||
2212magic_setglob|||
2213magic_setisa|||
2214magic_setmglob|||
2215magic_setnkeys|||
2216magic_setpack|||
2217magic_setpos|||
2218magic_setregexp|||
2219magic_setsig|||
2220magic_setsubstr|||
2221magic_settaint|||
2222magic_setutf8|||
2223magic_setuvar|||
2224magic_setvec|||
2225magic_set|||
2226magic_sizepack|||
2227magic_wipepack|||
2228magicname|||
2229malloced_size|||n
2230malloc||5.007002|n
2231markstack_grow|||
2232measure_struct|||
2233memEQ|5.004000||p
2234memNE|5.004000||p
2235mem_collxfrm|||
2236mess_alloc|||
2237mess_nocontext|||vn
2238mess||5.006000|v
2239method_common|||
2240mfree||5.007002|n
2241mg_clear|||
2242mg_copy|||
2243mg_dup|||
2244mg_find|||
2245mg_free|||
2246mg_get|||
2247mg_length||5.005000|
2248mg_magical|||
2249mg_set|||
2250mg_size||5.005000|
2251mini_mktime||5.007002|
2252missingterm|||
2253mode_from_discipline|||
2254modkids|||
2255mod|||
2256more_he|||
2257more_sv|||
2258more_xiv|||
2259more_xnv|||
2260more_xpvav|||
2261more_xpvbm|||
2262more_xpvcv|||
2263more_xpvhv|||
2264more_xpviv|||
2265more_xpvlv|||
2266more_xpvmg|||
2267more_xpvnv|||
2268more_xpv|||
2269more_xrv|||
2270moreswitches|||
2271mul128|||
2272mulexp10|||n
2273my_atof2||5.007002|
2274my_atof||5.006000|
2275my_attrs|||
2276my_bcopy|||n
2277my_betoh16|||n
2278my_betoh32|||n
2279my_betoh64|||n
2280my_betohi|||n
2281my_betohl|||n
2282my_betohs|||n
2283my_bzero|||n
2284my_chsize|||
2285my_exit_jump|||
2286my_exit|||
2287my_failure_exit||5.004000|
2288my_fflush_all||5.006000|
2289my_fork||5.007003|n
2290my_htobe16|||n
2291my_htobe32|||n
2292my_htobe64|||n
2293my_htobei|||n
2294my_htobel|||n
2295my_htobes|||n
2296my_htole16|||n
2297my_htole32|||n
2298my_htole64|||n
2299my_htolei|||n
2300my_htolel|||n
2301my_htoles|||n
2302my_htonl|||
2303my_kid|||
2304my_letoh16|||n
2305my_letoh32|||n
2306my_letoh64|||n
2307my_letohi|||n
2308my_letohl|||n
2309my_letohs|||n
2310my_lstat|||
2311my_memcmp||5.004000|n
2312my_memset|||n
2313my_ntohl|||
2314my_pclose||5.004000|
2315my_popen_list||5.007001|
2316my_popen||5.004000|
2317my_setenv|||
2318my_socketpair||5.007003|n
2319my_stat|||
2320my_strftime||5.007002|
2321my_swabn|||n
2322my_swap|||
2323my_unexec|||
2324my|||
2325newANONATTRSUB||5.006000|
2326newANONHASH|||
2327newANONLIST|||
2328newANONSUB|||
2329newASSIGNOP|||
2330newATTRSUB||5.006000|
2331newAVREF|||
2332newAV|||
2333newBINOP|||
2334newCONDOP|||
2335newCONSTSUB|5.006000||p
2336newCVREF|||
2337newDEFSVOP|||
2338newFORM|||
2339newFOROP|||
2340newGVOP|||
2341newGVREF|||
2342newGVgen|||
2343newHVREF|||
2344newHVhv||5.005000|
2345newHV|||
2346newIO|||
2347newLISTOP|||
2348newLOGOP|||
2349newLOOPEX|||
2350newLOOPOP|||
2351newMYSUB||5.006000|
2352newNULLLIST|||
2353newOP|||
2354newPADOP||5.006000|
2355newPMOP|||
2356newPROG|||
2357newPVOP|||
2358newRANGE|||
2359newRV_inc|5.004000||p
2360newRV_noinc|5.006000||p
2361newRV|||
2362newSLICEOP|||
2363newSTATEOP|||
2364newSUB|||
2365newSVOP|||
2366newSVREF|||
2367newSViv|||
2368newSVnv|||
2369newSVpvf_nocontext|||vn
2370newSVpvf||5.004000|v
2371newSVpvn_share||5.007001|
2372newSVpvn|5.006000||p
2373newSVpv|||
2374newSVrv|||
2375newSVsv|||
2376newSVuv|5.006000||p
2377newSV|||
2378newUNOP|||
2379newWHILEOP||5.004040|
2380newXSproto||5.006000|
2381newXS||5.006000|
2382new_collate||5.006000|
2383new_constant|||
2384new_ctype||5.006000|
2385new_he|||
2386new_logop|||
2387new_numeric||5.006000|
2388new_stackinfo||5.005000|
2389new_version||5.009000|
2390new_xiv|||
2391new_xnv|||
2392new_xpvav|||
2393new_xpvbm|||
2394new_xpvcv|||
2395new_xpvhv|||
2396new_xpviv|||
2397new_xpvlv|||
2398new_xpvmg|||
2399new_xpvnv|||
2400new_xpv|||
2401new_xrv|||
2402next_symbol|||
2403nextargv|||
2404nextchar|||
2405ninstr|||
2406no_bareword_allowed|||
2407no_fh_allowed|||
2408no_op|||
2409not_a_number|||
2410nothreadhook||5.008000|
2411nuke_stacks|||
2412num_overflow|||n
2413oopsAV|||
2414oopsCV|||
2415oopsHV|||
2416op_clear|||
2417op_const_sv|||
2418op_dump||5.006000|
2419op_free|||
2420op_null||5.007002|
9132e1a3
MHM
2421op_refcnt_lock||5.009002|
2422op_refcnt_unlock||5.009002|
adfe19db
MHM
2423open_script|||
2424pMY_CXT_|5.007003||p
2425pMY_CXT|5.007003||p
2426pTHX_|5.006000||p
2427pTHX|5.006000||p
2428pack_cat||5.007003|
2429pack_rec|||
2430package|||
2431packlist||5.008001|
2432pad_add_anon|||
2433pad_add_name|||
2434pad_alloc|||
2435pad_block_start|||
2436pad_check_dup|||
2437pad_findlex|||
2438pad_findmy|||
2439pad_fixup_inner_anons|||
2440pad_free|||
2441pad_leavemy|||
2442pad_new|||
2443pad_push|||
2444pad_reset|||
2445pad_setsv|||
2446pad_sv|||
2447pad_swipe|||
2448pad_tidy|||
2449pad_undef|||
2450parse_body|||
2451parse_unicode_opts|||
2452path_is_absolute|||
2453peep|||
2454pending_ident|||
2455perl_alloc_using|||n
2456perl_alloc|||n
2457perl_clone_using|||n
2458perl_clone|||n
2459perl_construct|||n
2460perl_destruct||5.007003|n
2461perl_free|||n
2462perl_parse||5.006000|n
2463perl_run|||n
2464pidgone|||
2465pmflag|||
2466pmop_dump||5.006000|
2467pmruntime|||
2468pmtrans|||
2469pop_scope|||
2470pregcomp|||
2471pregexec|||
2472pregfree|||
2473prepend_elem|||
2474printf_nocontext|||vn
2475ptr_table_clear|||
2476ptr_table_fetch|||
2477ptr_table_free|||
2478ptr_table_new|||
2479ptr_table_split|||
2480ptr_table_store|||
2481push_scope|||
2482put_byte|||
2483pv_display||5.006000|
2484pv_uni_display||5.007003|
2485qerror|||
2486re_croak2|||
2487re_dup|||
2488re_intuit_start||5.006000|
2489re_intuit_string||5.006000|
2490realloc||5.007002|n
2491reentrant_free|||
2492reentrant_init|||
2493reentrant_retry|||vn
2494reentrant_size|||
2495refkids|||
2496refto|||
2497ref|||
2498reg_node|||
2499reganode|||
2500regatom|||
2501regbranch|||
2502regclass_swash||5.007003|
2503regclass|||
2504regcp_set_to|||
2505regcppop|||
2506regcppush|||
2507regcurly|||
2508regdump||5.005000|
2509regexec_flags||5.005000|
2510reghop3|||
2511reghopmaybe3|||
2512reghopmaybe|||
2513reghop|||
2514reginclass|||
2515reginitcolors||5.006000|
2516reginsert|||
2517regmatch|||
2518regnext||5.005000|
2519regoptail|||
2520regpiece|||
2521regpposixcc|||
2522regprop|||
2523regrepeat_hard|||
2524regrepeat|||
2525regtail|||
2526regtry|||
2527reguni|||
2528regwhite|||
2529reg|||
2530repeatcpy|||
2531report_evil_fh|||
2532report_uninit|||
2533require_errno|||
2534require_pv||5.006000|
2535rninstr|||
2536rsignal_restore|||
2537rsignal_save|||
2538rsignal_state||5.004000|
2539rsignal||5.004000|
2540run_body|||
2541runops_debug||5.005000|
2542runops_standard||5.005000|
2543rxres_free|||
2544rxres_restore|||
2545rxres_save|||
2546safesyscalloc||5.006000|n
2547safesysfree||5.006000|n
2548safesysmalloc||5.006000|n
2549safesysrealloc||5.006000|n
2550same_dirent|||
2551save_I16||5.004000|
2552save_I32|||
2553save_I8||5.006000|
2554save_aelem||5.004050|
2555save_alloc||5.006000|
2556save_aptr|||
2557save_ary|||
2558save_bool||5.008001|
2559save_clearsv|||
2560save_delete|||
2561save_destructor_x||5.006000|
2562save_destructor||5.006000|
2563save_freeop|||
2564save_freepv|||
2565save_freesv|||
2566save_generic_pvref||5.006001|
2567save_generic_svref||5.005030|
2568save_gp||5.004000|
2569save_hash|||
2570save_hek_flags|||
2571save_helem||5.004050|
2572save_hints||5.005000|
2573save_hptr|||
2574save_int|||
2575save_item|||
2576save_iv||5.005000|
2577save_lines|||
2578save_list|||
2579save_long|||
2580save_magic|||
2581save_mortalizesv||5.007001|
2582save_nogv|||
2583save_op|||
2584save_padsv||5.007001|
2585save_pptr|||
2586save_re_context||5.006000|
2587save_scalar_at|||
2588save_scalar|||
2589save_set_svflags||5.009000|
2590save_shared_pvref||5.007003|
2591save_sptr|||
2592save_svref|||
2593save_threadsv||5.005000|
2594save_vptr||5.006000|
2595savepvn|||
2596savepv|||
2597savesharedpv||5.007003|
2598savestack_grow_cnt||5.008001|
2599savestack_grow|||
9132e1a3 2600savesvpv||5.009002|
adfe19db
MHM
2601sawparens|||
2602scalar_mod_type|||
2603scalarboolean|||
2604scalarkids|||
2605scalarseq|||
2606scalarvoid|||
2607scalar|||
2608scan_bin||5.006000|
2609scan_commit|||
2610scan_const|||
2611scan_formline|||
2612scan_heredoc|||
2613scan_hex|||
2614scan_ident|||
2615scan_inputsymbol|||
2616scan_num||5.007001|
2617scan_oct|||
2618scan_pat|||
2619scan_str|||
2620scan_subst|||
2621scan_trans|||
2622scan_version||5.009001|
2623scan_vstring||5.008001|
2624scan_word|||
2625scope|||
2626screaminstr||5.005000|
2627seed|||
2628set_context||5.006000|n
2629set_csh|||
2630set_numeric_local||5.006000|
2631set_numeric_radix||5.006000|
2632set_numeric_standard||5.006000|
2633setdefout|||
2634setenv_getix|||
2635share_hek_flags|||
2636share_hek|||
2637si_dup|||
2638sighandler|||n
2639simplify_sort|||
2640skipspace|||
2641sortsv||5.007003|
2642ss_dup|||
2643stack_grow|||
2644start_glob|||
2645start_subparse||5.004000|
2646stdize_locale|||
2647strEQ|||
2648strGE|||
2649strGT|||
2650strLE|||
2651strLT|||
2652strNE|||
2653str_to_version||5.006000|
2654strnEQ|||
2655strnNE|||
2656study_chunk|||
2657sub_crush_depth|||
2658sublex_done|||
2659sublex_push|||
2660sublex_start|||
2661sv_2bool|||
2662sv_2cv|||
2663sv_2io|||
2664sv_2iuv_non_preserve|||
2665sv_2iv_flags||5.009001|
2666sv_2iv|||
2667sv_2mortal|||
2668sv_2nv|||
2669sv_2pv_flags||5.007002|
2670sv_2pv_nolen|5.006000||p
2671sv_2pvbyte_nolen|||
2672sv_2pvbyte|5.006000||p
2673sv_2pvutf8_nolen||5.006000|
2674sv_2pvutf8||5.006000|
2675sv_2pv|||
2676sv_2uv_flags||5.009001|
2677sv_2uv|5.004000||p
2678sv_add_arena|||
2679sv_add_backref|||
2680sv_backoff|||
2681sv_bless|||
2682sv_cat_decode||5.008001|
2683sv_catpv_mg|5.006000||p
96ad942f
MHM
2684sv_catpvf_mg_nocontext|||pvn
2685sv_catpvf_mg|5.006000|5.004000|pv
adfe19db
MHM
2686sv_catpvf_nocontext|||vn
2687sv_catpvf||5.004000|v
2688sv_catpvn_flags||5.007002|
2689sv_catpvn_mg|5.006000||p
2690sv_catpvn_nomg|5.007002||p
2691sv_catpvn|||
2692sv_catpv|||
2693sv_catsv_flags||5.007002|
2694sv_catsv_mg|5.006000||p
2695sv_catsv_nomg|5.007002||p
2696sv_catsv|||
2697sv_chop|||
2698sv_clean_all|||
2699sv_clean_objs|||
2700sv_clear|||
2701sv_cmp_locale||5.004000|
2702sv_cmp|||
2703sv_collxfrm|||
2704sv_compile_2op||5.008001|
2705sv_copypv||5.007003|
2706sv_dec|||
2707sv_del_backref|||
2708sv_derived_from||5.004000|
2709sv_dump|||
2710sv_dup|||
2711sv_eq|||
2712sv_force_normal_flags||5.007001|
2713sv_force_normal||5.006000|
2714sv_free2|||
2715sv_free_arenas|||
2716sv_free|||
2717sv_gets||5.004000|
2718sv_grow|||
2719sv_inc|||
2720sv_insert|||
2721sv_isa|||
2722sv_isobject|||
2723sv_iv||5.005000|
2724sv_len_utf8||5.006000|
2725sv_len|||
2726sv_magicext||5.007003|
2727sv_magic|||
2728sv_mortalcopy|||
2729sv_newmortal|||
2730sv_newref|||
2731sv_nolocking||5.007003|
2732sv_nosharing||5.007003|
2733sv_nounlocking||5.007003|
2734sv_nv||5.005000|
2735sv_peek||5.005000|
2736sv_pos_b2u||5.006000|
2737sv_pos_u2b||5.006000|
2738sv_pvbyten_force||5.006000|
2739sv_pvbyten||5.006000|
2740sv_pvbyte||5.006000|
2741sv_pvn_force_flags||5.007002|
2742sv_pvn_force|||p
2743sv_pvn_nomg|5.007003||p
2744sv_pvn|5.006000||p
2745sv_pvutf8n_force||5.006000|
2746sv_pvutf8n||5.006000|
2747sv_pvutf8||5.006000|
2748sv_pv||5.006000|
2749sv_recode_to_utf8||5.007003|
2750sv_reftype|||
2751sv_release_COW|||
2752sv_release_IVX|||
2753sv_replace|||
2754sv_report_used|||
2755sv_reset|||
2756sv_rvweaken||5.006000|
2757sv_setiv_mg|5.006000||p
2758sv_setiv|||
2759sv_setnv_mg|5.006000||p
2760sv_setnv|||
2761sv_setpv_mg|5.006000||p
96ad942f
MHM
2762sv_setpvf_mg_nocontext|||pvn
2763sv_setpvf_mg|5.006000|5.004000|pv
adfe19db
MHM
2764sv_setpvf_nocontext|||vn
2765sv_setpvf||5.004000|v
2766sv_setpviv_mg||5.008001|
2767sv_setpviv||5.008001|
2768sv_setpvn_mg|5.006000||p
2769sv_setpvn|||
2770sv_setpv|||
2771sv_setref_iv|||
2772sv_setref_nv|||
2773sv_setref_pvn|||
2774sv_setref_pv|||
2775sv_setref_uv||5.007001|
2776sv_setsv_cow|||
2777sv_setsv_flags||5.007002|
2778sv_setsv_mg|5.006000||p
2779sv_setsv_nomg|5.007002||p
2780sv_setsv|||
2781sv_setuv_mg|5.006000||p
2782sv_setuv|5.006000||p
2783sv_tainted||5.004000|
2784sv_taint||5.004000|
2785sv_true||5.005000|
2786sv_unglob|||
2787sv_uni_display||5.007003|
2788sv_unmagic|||
2789sv_unref_flags||5.007001|
2790sv_unref|||
2791sv_untaint||5.004000|
2792sv_upgrade|||
2793sv_usepvn_mg|5.006000||p
2794sv_usepvn|||
2795sv_utf8_decode||5.006000|
2796sv_utf8_downgrade||5.006000|
2797sv_utf8_encode||5.006000|
2798sv_utf8_upgrade_flags||5.007002|
2799sv_utf8_upgrade||5.007001|
2800sv_uv|5.006000||p
96ad942f 2801sv_vcatpvf_mg|5.006000|5.004000|p
adfe19db 2802sv_vcatpvfn||5.004000|
96ad942f
MHM
2803sv_vcatpvf|5.006000|5.004000|p
2804sv_vsetpvf_mg|5.006000|5.004000|p
adfe19db 2805sv_vsetpvfn||5.004000|
96ad942f 2806sv_vsetpvf|5.006000|5.004000|p
adfe19db
MHM
2807svtype|||
2808swallow_bom|||
2809swash_fetch||5.007002|
2810swash_init||5.006000|
2811sys_intern_clear|||
2812sys_intern_dup|||
2813sys_intern_init|||
2814taint_env|||
2815taint_proper|||
2816tmps_grow||5.006000|
2817toLOWER|||
2818toUPPER|||
2819to_byte_substr|||
2820to_uni_fold||5.007003|
2821to_uni_lower_lc||5.006000|
2822to_uni_lower||5.007003|
2823to_uni_title_lc||5.006000|
2824to_uni_title||5.007003|
2825to_uni_upper_lc||5.006000|
2826to_uni_upper||5.007003|
2827to_utf8_case||5.007003|
2828to_utf8_fold||5.007003|
2829to_utf8_lower||5.007003|
2830to_utf8_substr|||
2831to_utf8_title||5.007003|
2832to_utf8_upper||5.007003|
2833tokeq|||
2834tokereport|||
2835too_few_arguments|||
2836too_many_arguments|||
2837unlnk|||
2838unpack_rec|||
2839unpack_str||5.007003|
2840unpackstring||5.008001|
2841unshare_hek_or_pvn|||
2842unshare_hek|||
2843unsharepvn||5.004000|
2844upg_version||5.009000|
2845usage|||
2846utf16_textfilter|||
2847utf16_to_utf8_reversed||5.006001|
2848utf16_to_utf8||5.006001|
2849utf16rev_textfilter|||
2850utf8_distance||5.006000|
2851utf8_hop||5.006000|
2852utf8_length||5.007001|
2853utf8_mg_pos_init|||
2854utf8_mg_pos|||
2855utf8_to_bytes||5.006001|
2856utf8_to_uvchr||5.007001|
2857utf8_to_uvuni||5.007001|
2858utf8n_to_uvchr||5.007001|
2859utf8n_to_uvuni||5.007001|
2860utilize|||
2861uvchr_to_utf8_flags||5.007003|
2862uvchr_to_utf8||5.007001|
2863uvuni_to_utf8_flags||5.007003|
2864uvuni_to_utf8||5.007001|
2865validate_suid|||
adfe19db
MHM
2866vcmp||5.009000|
2867vcroak||5.006000|
2868vdeb||5.007003|
adfe19db 2869vdie|||
adfe19db
MHM
2870vform||5.006000|
2871visit|||
2872vivify_defelem|||
2873vivify_ref|||
2874vload_module||5.006000|
2875vmess||5.006000|
96ad942f 2876vnewSVpvf|5.006000|5.004000|p
adfe19db
MHM
2877vnormal||5.009002|
2878vnumify||5.009000|
adfe19db
MHM
2879vstringify||5.009000|
2880vwarner||5.006000|
2881vwarn||5.006000|
2882wait4pid|||
2883warn_nocontext|||vn
2884warner_nocontext|||vn
2885warner||5.006000|v
2886warn|||v
2887watch|||
2888whichsig|||
2889write_to_stderr|||
2890yyerror|||
2891yylex|||
2892yyparse|||
2893yywarn|||
2894);
2895
2896if (exists $opt{'list-unsupported'}) {
2897 my $f;
2898 for $f (sort { lc $a cmp lc $b } keys %API) {
2899 next unless $API{$f}{todo};
2900 print "$f ", '.'x(40-length($f)), " ", format_version($API{$f}{todo}), "\n";
2901 }
2902 exit 0;
2903}
0a7c7f4f 2904
adfe19db 2905# Scan for possible replacement candidates
5a0bf5be 2906
adfe19db
MHM
2907my(%replace, %need, %hints, %depends);
2908my $replace = 0;
2909my $hint = '';
5a0bf5be 2910
adfe19db
MHM
2911while (<DATA>) {
2912 if ($hint) {
2913 if (m{^\s*\*\s(.*?)\s*$}) {
2914 $hints{$hint} ||= ''; # suppress warning with older perls
2915 $hints{$hint} .= "$1\n";
2916 }
2917 else {
2918 $hint = '';
2919 }
2920 }
2921 $hint = $1 if m{^\s*$rccs\sHint:\s+(\w+)\s*$};
5a0bf5be 2922
adfe19db
MHM
2923 $replace = $1 if m{^\s*$rccs\s+Replace:\s+(\d+)\s+$rcce\s*$};
2924 $replace{$2} = $1 if $replace and m{^\s*#\s*define\s+(\w+)(?:\([^)]*\))?\s+(\w+)};
2925 $replace{$2} = $1 if m{^\s*#\s*define\s+(\w+)(?:\([^)]*\))?\s+(\w+).*$rccs\s+Replace\s+$rcce};
2926 $replace{$1} = $2 if m{^\s*$rccs\s+Replace (\w+) with (\w+)\s+$rcce\s*$};
5a0bf5be 2927
adfe19db
MHM
2928 if (m{^\s*$rccs\s+(\w+)\s+depends\s+on\s+(\w+(\s*,\s*\w+)*)\s+$rcce\s*$}) {
2929 push @{$depends{$1}}, map { s/\s+//g; $_ } split /,/, $2;
2930 }
0a7c7f4f 2931
adfe19db
MHM
2932 $need{$1} = 1 if m{^#if\s+defined\(NEED_(\w+)(?:_GLOBAL)?\)};
2933}
50b814c3 2934
04fc8b94
MHM
2935if (exists $opt{'api-info'}) {
2936 my $f;
2937 my $count = 0;
9132e1a3 2938 my $match = $opt{'api-info'} =~ m!^/(.*)/$! ? $1 : "^\Q$opt{'api-info'}\E\$";
04fc8b94 2939 for $f (sort { lc $a cmp lc $b } keys %API) {
9132e1a3 2940 next unless $f =~ /$match/;
04fc8b94
MHM
2941 print "\n=== $f ===\n\n";
2942 my $info = 0;
2943 if ($API{$f}{base} || $API{$f}{todo}) {
2944 my $base = format_version($API{$f}{base} || $API{$f}{todo});
9132e1a3 2945 print "Supported at least starting from perl-$base.\n";
04fc8b94
MHM
2946 $info++;
2947 }
2948 if ($API{$f}{provided}) {
2949 my $todo = $API{$f}{todo} ? format_version($API{$f}{todo}) : "5.003";
9132e1a3 2950 print "Support by $ppport provided back to perl-$todo.\n";
04fc8b94
MHM
2951 print "Support needs to be explicitly requested by NEED_$f.\n" if exists $need{$f};
2952 print "Depends on: ", join(', ', @{$depends{$f}}), ".\n" if exists $depends{$f};
2953 print "$hints{$f}" if exists $hints{$f};
2954 $info++;
2955 }
2956 unless ($info) {
2957 print "No portability information available.\n";
2958 }
2959 $count++;
2960 }
2961 if ($count > 0) {
2962 print "\n";
2963 }
2964 else {
9132e1a3 2965 print "Found no API matching '$opt{'api-info'}'.\n";
04fc8b94
MHM
2966 }
2967 exit 0;
2968}
2969
adfe19db
MHM
2970if (exists $opt{'list-provided'}) {
2971 my $f;
2972 for $f (sort { lc $a cmp lc $b } keys %API) {
2973 next unless $API{$f}{provided};
2974 my @flags;
2975 push @flags, 'explicit' if exists $need{$f};
2976 push @flags, 'depend' if exists $depends{$f};
2977 push @flags, 'hint' if exists $hints{$f};
2978 my $flags = @flags ? ' ['.join(', ', @flags).']' : '';
2979 print "$f$flags\n";
2980 }
2981 exit 0;
2982}
a22cf627 2983
adfe19db
MHM
2984my(%files, %global, %revreplace);
2985%revreplace = reverse %replace;
2986my $filename;
2987my $patch_opened = 0;
0c8c7b4b 2988
adfe19db
MHM
2989for $filename (@files) {
2990 unless (open IN, "<$filename") {
2991 warn "Unable to read from $filename: $!\n";
2992 next;
2993 }
0c8c7b4b 2994
adfe19db
MHM
2995 info("Scanning $filename ...");
2996
2997 my $c = do { local $/; <IN> };
2998 close IN;
2999
3000 my %file = (orig => $c, changes => 0);
3001
3002 # temporarily remove C comments from the code
3003 my @ccom;
3004 $c =~ s{
3005 (
3006 [^"'/]+
3007 |
3008 (?:"[^"\\]*(?:\\.[^"\\]*)*" [^"'/]*)+
3009 |
3010 (?:'[^'\\]*(?:\\.[^'\\]*)*' [^"'/]*)+
3011 )
3012 |
3013 (/ (?:
3014 \*[^*]*\*+(?:[^$ccs][^*]*\*+)* /
3015 |
3016 /[^\r\n]*
3017 ))
3018 }{
3019 defined $2 and push @ccom, $2;
3020 defined $1 ? $1 : "$ccs$#ccom$cce";
3021 }egsx;
3022
3023 $file{ccom} = \@ccom;
3024 $file{code} = $c;
3025 $file{has_inc_ppport} = ($c =~ /#.*include.*\Q$ppport\E/);
3026
3027 my $func;
3028
3029 for $func (keys %API) {
3030 my $match = $func;
3031 $match .= "|$revreplace{$func}" if exists $revreplace{$func};
3032 if ($c =~ /\b(?:Perl_)?($match)\b/) {
3033 $file{uses_replace}{$1}++ if exists $revreplace{$func} && $1 eq $revreplace{$func};
3034 $file{uses_Perl}{$func}++ if $c =~ /\bPerl_$func\b/;
3035 if (exists $API{$func}{provided}) {
3036 if (!exists $API{$func}{base} || $API{$func}{base} > $opt{'compat-version'}) {
3037 $file{uses}{$func}++;
adfe19db
MHM
3038 my @deps = rec_depend($func);
3039 if (@deps) {
3040 $file{uses_deps}{$func} = \@deps;
3041 for (@deps) {
3042 $file{uses}{$_} = 0 unless exists $file{uses}{$_};
adfe19db
MHM
3043 }
3044 }
3045 for ($func, @deps) {
3046 if (exists $need{$_}) {
3047 $file{needs}{$_} = 'static';
adfe19db
MHM
3048 }
3049 }
3050 }
3051 }
3052 if (exists $API{$func}{todo} && $API{$func}{todo} > $opt{'compat-version'}) {
3053 if ($c =~ /\b$func\b/) {
3054 $file{uses_todo}{$func}++;
adfe19db
MHM
3055 }
3056 }
3057 }
3058 }
0c8c7b4b 3059
adfe19db
MHM
3060 while ($c =~ /^$HS*#$HS*define$HS+(NEED_(\w+?)(_GLOBAL)?)\b/mg) {
3061 if (exists $need{$2}) {
3062 $file{defined $3 ? 'needed_global' : 'needed_static'}{$2}++;
adfe19db
MHM
3063 }
3064 else {
3065 warning("Possibly wrong #define $1 in $filename");
3066 }
3067 }
0a7c7f4f 3068
96ad942f
MHM
3069 for (qw(uses needs uses_todo needed_global needed_static)) {
3070 for $func (keys %{$file{$_}}) {
3071 push @{$global{$_}{$func}}, $filename;
3072 }
3073 }
3074
adfe19db
MHM
3075 $files{$filename} = \%file;
3076}
0c8c7b4b 3077
adfe19db
MHM
3078# Globally resolve NEED_'s
3079my $need;
3080for $need (keys %{$global{needs}}) {
3081 if (@{$global{needs}{$need}} > 1) {
3082 my @targets = @{$global{needs}{$need}};
3083 my @t = grep $files{$_}{needed_global}{$need}, @targets;
3084 @targets = @t if @t;
3085 @t = grep /\.xs$/i, @targets;
3086 @targets = @t if @t;
3087 my $target = shift @targets;
3088 $files{$target}{needs}{$need} = 'global';
3089 for (@{$global{needs}{$need}}) {
3090 $files{$_}{needs}{$need} = 'extern' if $_ ne $target;
3091 }
3092 }
3093}
0a7c7f4f 3094
adfe19db
MHM
3095for $filename (@files) {
3096 exists $files{$filename} or next;
0a7c7f4f 3097
adfe19db 3098 info("=== Analyzing $filename ===");
0a7c7f4f 3099
adfe19db
MHM
3100 my %file = %{$files{$filename}};
3101 my $func;
3102 my $c = $file{code};
0a7c7f4f 3103
adfe19db
MHM
3104 for $func (sort keys %{$file{uses_Perl}}) {
3105 if ($API{$func}{varargs}) {
3106 my $changes = ($c =~ s{\b(Perl_$func\s*\(\s*)(?!aTHX_?)(\)|[^\s)]*\))}
3107 { $1 . ($2 eq ')' ? 'aTHX' : 'aTHX_ ') . $2 }ge);
3108 if ($changes) {
3109 warning("Doesn't pass interpreter argument aTHX to Perl_$func");
3110 $file{changes} += $changes;
3111 }
3112 }
3113 else {
3114 warning("Uses Perl_$func instead of $func");
3115 $file{changes} += ($c =~ s{\bPerl_$func(\s*)\((\s*aTHX_?)?\s*}
3116 {$func$1(}g);
3117 }
3118 }
0a7c7f4f 3119
adfe19db
MHM
3120 for $func (sort keys %{$file{uses_replace}}) {
3121 warning("Uses $func instead of $replace{$func}");
3122 $file{changes} += ($c =~ s/\b$func\b/$replace{$func}/g);
3123 }
0a7c7f4f 3124
adfe19db
MHM
3125 for $func (sort keys %{$file{uses}}) {
3126 next unless $file{uses}{$func}; # if it's only a dependency
3127 if (exists $file{uses_deps}{$func}) {
3128 diag("Uses $func, which depends on ", join(', ', @{$file{uses_deps}{$func}}));
3129 }
3130 elsif (exists $replace{$func}) {
3131 warning("Uses $func instead of $replace{$func}");
3132 $file{changes} += ($c =~ s/\b$func\b/$replace{$func}/g);
3133 }
3134 else {
3135 diag("Uses $func");
3136 }
3137 hint($func);
3138 }
0a7c7f4f 3139
adfe19db
MHM
3140 for $func (sort keys %{$file{uses_todo}}) {
3141 warning("Uses $func, which may not be portable below perl ",
3142 format_version($API{$func}{todo}));
3143 }
0a7c7f4f 3144
adfe19db
MHM
3145 for $func (sort keys %{$file{needed_static}}) {
3146 my $message = '';
3147 if (not exists $file{uses}{$func}) {
3148 $message = "No need to define NEED_$func if $func is never used";
3149 }
3150 elsif (exists $file{needs}{$func} && $file{needs}{$func} ne 'static') {
3151 $message = "No need to define NEED_$func when already needed globally";
3152 }
3153 if ($message) {
3154 diag($message);
3155 $file{changes} += ($c =~ s/^$HS*#$HS*define$HS+NEED_$func\b.*$LF//mg);
3156 }
3157 }
0a7c7f4f 3158
adfe19db
MHM
3159 for $func (sort keys %{$file{needed_global}}) {
3160 my $message = '';
3161 if (not exists $global{uses}{$func}) {
3162 $message = "No need to define NEED_${func}_GLOBAL if $func is never used";
3163 }
3164 elsif (exists $file{needs}{$func}) {
3165 if ($file{needs}{$func} eq 'extern') {
3166 $message = "No need to define NEED_${func}_GLOBAL when already needed globally";
3167 }
3168 elsif ($file{needs}{$func} eq 'static') {
3169 $message = "No need to define NEED_${func}_GLOBAL when only used in this file";
3170 }
3171 }
3172 if ($message) {
3173 diag($message);
3174 $file{changes} += ($c =~ s/^$HS*#$HS*define$HS+NEED_${func}_GLOBAL\b.*$LF//mg);
3175 }
3176 }
0a7c7f4f 3177
adfe19db 3178 $file{needs_inc_ppport} = keys %{$file{uses}};
0a7c7f4f 3179
adfe19db
MHM
3180 if ($file{needs_inc_ppport}) {
3181 my $pp = '';
0a7c7f4f 3182
adfe19db
MHM
3183 for $func (sort keys %{$file{needs}}) {
3184 my $type = $file{needs}{$func};
3185 next if $type eq 'extern';
3186 my $suffix = $type eq 'global' ? '_GLOBAL' : '';
3187 unless (exists $file{"needed_$type"}{$func}) {
3188 if ($type eq 'global') {
3189 diag("Files [@{$global{needs}{$func}}] need $func, adding global request");
3190 }
3191 else {
3192 diag("File needs $func, adding static request");
3193 }
3194 $pp .= "#define NEED_$func$suffix\n";
3195 }
3196 }
0a7c7f4f 3197
adfe19db
MHM
3198 if ($pp && ($c =~ s/^(?=$HS*#$HS*define$HS+NEED_\w+)/$pp/m)) {
3199 $pp = '';
3200 $file{changes}++;
3201 }
0a7c7f4f 3202
adfe19db
MHM
3203 unless ($file{has_inc_ppport}) {
3204 diag("Needs to include '$ppport'");
3205 $pp .= qq(#include "$ppport"\n)
3206 }
0a7c7f4f 3207
adfe19db
MHM
3208 if ($pp) {
3209 $file{changes} += ($c =~ s/^($HS*#$HS*define$HS+NEED_\w+.*?)^/$1$pp/ms)
3210 || ($c =~ s/^(?=$HS*#$HS*include.*\Q$ppport\E)/$pp/m)
3211 || ($c =~ s/^($HS*#$HS*include.*XSUB.*\s*?)^/$1$pp/m)
3212 || ($c =~ s/^/$pp/);
3213 }
3214 }
3215 else {
3216 if ($file{has_inc_ppport}) {
3217 diag("No need to include '$ppport'");
3218 $file{changes} += ($c =~ s/^$HS*?#$HS*include.*\Q$ppport\E.*?$LF//m);
3219 }
3220 }
0a7c7f4f 3221
adfe19db
MHM
3222 # put back in our C comments
3223 my $ix;
3224 my $cppc = 0;
3225 my @ccom = @{$file{ccom}};
3226 for $ix (0 .. $#ccom) {
3227 if (!$opt{cplusplus} && $ccom[$ix] =~ s!^//!!) {
3228 $cppc++;
3229 $file{changes} += $c =~ s/$rccs$ix$rcce/$ccs$ccom[$ix] $cce/;
3230 }
3231 else {
3232 $c =~ s/$rccs$ix$rcce/$ccom[$ix]/;
3233 }
3234 }
0a7c7f4f 3235
adfe19db
MHM
3236 if ($cppc) {
3237 my $s = $cppc != 1 ? 's' : '';
3238 warning("Uses $cppc C++ style comment$s, which is not portable");
3239 }
0a7c7f4f 3240
adfe19db
MHM
3241 if ($file{changes}) {
3242 if (exists $opt{copy}) {
3243 my $newfile = "$filename$opt{copy}";
3244 if (-e $newfile) {
3245 error("'$newfile' already exists, refusing to write copy of '$filename'");
3246 }
3247 else {
3248 local *F;
3249 if (open F, ">$newfile") {
3250 info("Writing copy of '$filename' with changes to '$newfile'");
3251 print F $c;
3252 close F;
3253 }
3254 else {
3255 error("Cannot open '$newfile' for writing: $!");
3256 }
3257 }
3258 }
3259 elsif (exists $opt{patch} || $opt{changes}) {
3260 if (exists $opt{patch}) {
3261 unless ($patch_opened) {
3262 if (open PATCH, ">$opt{patch}") {
3263 $patch_opened = 1;
3264 }
3265 else {
3266 error("Cannot open '$opt{patch}' for writing: $!");
3267 delete $opt{patch};
3268 $opt{changes} = 1;
3269 goto fallback;
3270 }
3271 }
3272 mydiff(\*PATCH, $filename, $c);
3273 }
3274 else {
3275fallback:
3276 info("Suggested changes:");
3277 mydiff(\*STDOUT, $filename, $c);
3278 }
3279 }
3280 else {
3281 my $s = $file{changes} == 1 ? '' : 's';
3282 info("$file{changes} potentially required change$s detected");
3283 }
3284 }
3285 else {
3286 info("Looks good");
3287 }
3288}
3289
3290close PATCH if $patch_opened;
3291
3292exit 0;
3293
3294
3295sub mydiff
3296{
3297 local *F = shift;
3298 my($file, $str) = @_;
3299 my $diff;
3300
3301 if (exists $opt{diff}) {
3302 $diff = run_diff($opt{diff}, $file, $str);
3303 }
3304
3305 if (!defined $diff and can_use('Text::Diff')) {
3306 $diff = Text::Diff::diff($file, \$str, { STYLE => 'Unified' });
3307 $diff = <<HEADER . $diff;
3308--- $file
3309+++ $file.patched
3310HEADER
3311 }
3312
3313 if (!defined $diff) {
3314 $diff = run_diff('diff -u', $file, $str);
3315 }
3316
3317 if (!defined $diff) {
3318 $diff = run_diff('diff', $file, $str);
3319 }
3320
3321 if (!defined $diff) {
3322 error("Cannot generate a diff. Please install Text::Diff or use --copy.");
3323 return;
3324 }
3325
3326 print F $diff;
3327
3328}
3329
3330sub run_diff
3331{
3332 my($prog, $file, $str) = @_;
3333 my $tmp = 'dppptemp';
3334 my $suf = 'aaa';
3335 my $diff = '';
3336 local *F;
3337
3338 while (-e "$tmp.$suf") { $suf++ }
3339 $tmp = "$tmp.$suf";
3340
3341 if (open F, ">$tmp") {
3342 print F $str;
3343 close F;
3344
3345 if (open F, "$prog $file $tmp |") {
3346 while (<F>) {
3347 s/\Q$tmp\E/$file.patched/;
3348 $diff .= $_;
3349 }
3350 close F;
3351 unlink $tmp;
3352 return $diff;
3353 }
3354
3355 unlink $tmp;
3356 }
3357 else {
3358 error("Cannot open '$tmp' for writing: $!");
3359 }
3360
3361 return undef;
3362}
3363
3364sub can_use
3365{
3366 eval "use @_;";
3367 return $@ eq '';
3368}
3369
3370sub rec_depend
3371{
3372 my $func = shift;
96ad942f 3373 my %seen;
adfe19db 3374 return () unless exists $depends{$func};
96ad942f 3375 grep !$seen{$_}++, map { ($_, rec_depend($_)) } @{$depends{$func}};
adfe19db
MHM
3376}
3377
3378sub parse_version
3379{
3380 my $ver = shift;
3381
3382 if ($ver =~ /^(\d+)\.(\d+)\.(\d+)$/) {
3383 return ($1, $2, $3);
3384 }
3385 elsif ($ver !~ /^\d+\.[\d_]+$/) {
3386 die "cannot parse version '$ver'\n";
3387 }
3388
3389 $ver =~ s/_//g;
3390 $ver =~ s/$/000000/;
3391
3392 my($r,$v,$s) = $ver =~ /(\d+)\.(\d{3})(\d{3})/;
3393
3394 $v = int $v;
3395 $s = int $s;
3396
3397 if ($r < 5 || ($r == 5 && $v < 6)) {
3398 if ($s % 10) {
3399 die "cannot parse version '$ver'\n";
3400 }
3401 }
3402
3403 return ($r, $v, $s);
3404}
3405
3406sub format_version
3407{
3408 my $ver = shift;
3409
3410 $ver =~ s/$/000000/;
3411 my($r,$v,$s) = $ver =~ /(\d+)\.(\d{3})(\d{3})/;
3412
3413 $v = int $v;
3414 $s = int $s;
3415
3416 if ($r < 5 || ($r == 5 && $v < 6)) {
3417 if ($s % 10) {
3418 die "invalid version '$ver'\n";
3419 }
3420 $s /= 10;
3421
3422 $ver = sprintf "%d.%03d", $r, $v;
3423 $s > 0 and $ver .= sprintf "_%02d", $s;
3424
3425 return $ver;
3426 }
3427
3428 return sprintf "%d.%d.%d", $r, $v, $s;
3429}
3430
3431sub info
3432{
3433 $opt{quiet} and return;
3434 print @_, "\n";
3435}
3436
3437sub diag
3438{
3439 $opt{quiet} and return;
3440 $opt{diag} and print @_, "\n";
3441}
3442
3443sub warning
3444{
3445 $opt{quiet} and return;
3446 print "*** ", @_, "\n";
3447}
3448
3449sub error
3450{
3451 print "*** ERROR: ", @_, "\n";
3452}
3453
3454my %given_hints;
3455sub hint
3456{
3457 $opt{quiet} and return;
3458 $opt{hints} or return;
3459 my $func = shift;
3460 exists $hints{$func} or return;
3461 $given_hints{$func}++ and return;
3462 my $hint = $hints{$func};
3463 $hint =~ s/^/ /mg;
3464 print " --- hint for $func ---\n", $hint;
3465}
3466
3467sub usage
3468{
3469 my($usage) = do { local(@ARGV,$/)=($0); <> } =~ /^=head\d$HS+SYNOPSIS\s*^(.*?)\s*^=/ms;
3470 my %M = ( 'I' => '*' );
3471 $usage =~ s/^\s*perl\s+\S+/$^X $0/;
3472 $usage =~ s/([A-Z])<([^>]+)>/$M{$1}$2$M{$1}/g;
3473
3474 print <<ENDUSAGE;
3475
3476Usage: $usage
3477
3478See perldoc $0 for details.
3479
3480ENDUSAGE
3481
3482 exit 2;
3483}
3484
3485__DATA__
3486*/
3487
3488#ifndef _P_P_PORTABILITY_H_
3489#define _P_P_PORTABILITY_H_
3490
3491#ifndef DPPP_NAMESPACE
3492# define DPPP_NAMESPACE DPPP_
3493#endif
3494
3495#define DPPP_CAT2(x,y) CAT2(x,y)
3496#define DPPP_(name) DPPP_CAT2(DPPP_NAMESPACE, name)
3497
3498#ifndef PERL_REVISION
cd266515 3499# if !defined(__PATCHLEVEL_H_INCLUDED__) && !(defined(PATCHLEVEL) && defined(SUBVERSION))
adfe19db
MHM
3500# define PERL_PATCHLEVEL_H_IMPLICIT
3501# include <patchlevel.h>
3502# endif
3503# if !(defined(PERL_VERSION) || (defined(SUBVERSION) && defined(PATCHLEVEL)))
3504# include <could_not_find_Perl_patchlevel.h>
3505# endif
3506# ifndef PERL_REVISION
3507# define PERL_REVISION (5)
3508 /* Replace: 1 */
3509# define PERL_VERSION PATCHLEVEL
3510# define PERL_SUBVERSION SUBVERSION
3511 /* Replace PERL_PATCHLEVEL with PERL_VERSION */
3512 /* Replace: 0 */
3513# endif
3514#endif
3515
3516#define PERL_BCDVERSION ((PERL_REVISION * 0x1000000L) + (PERL_VERSION * 0x1000L) + PERL_SUBVERSION)
3517
3518/* It is very unlikely that anyone will try to use this with Perl 6
3519 (or greater), but who knows.
3520 */
3521#if PERL_REVISION != 5
3522# error ppport.h only works with Perl version 5
3523#endif /* PERL_REVISION != 5 */
3524
3525#ifdef I_LIMITS
3526# include <limits.h>
3527#endif
3528
3529#ifndef PERL_UCHAR_MIN
3530# define PERL_UCHAR_MIN ((unsigned char)0)
3531#endif
3532
3533#ifndef PERL_UCHAR_MAX
3534# ifdef UCHAR_MAX
3535# define PERL_UCHAR_MAX ((unsigned char)UCHAR_MAX)
3536# else
3537# ifdef MAXUCHAR
3538# define PERL_UCHAR_MAX ((unsigned char)MAXUCHAR)
3539# else
3540# define PERL_UCHAR_MAX ((unsigned char)~(unsigned)0)
3541# endif
3542# endif
3543#endif
3544
3545#ifndef PERL_USHORT_MIN
3546# define PERL_USHORT_MIN ((unsigned short)0)
3547#endif
3548
3549#ifndef PERL_USHORT_MAX
3550# ifdef USHORT_MAX
3551# define PERL_USHORT_MAX ((unsigned short)USHORT_MAX)
3552# else
3553# ifdef MAXUSHORT
3554# define PERL_USHORT_MAX ((unsigned short)MAXUSHORT)
3555# else
3556# ifdef USHRT_MAX
3557# define PERL_USHORT_MAX ((unsigned short)USHRT_MAX)
3558# else
3559# define PERL_USHORT_MAX ((unsigned short)~(unsigned)0)
3560# endif
3561# endif
3562# endif
3563#endif
3564
3565#ifndef PERL_SHORT_MAX
3566# ifdef SHORT_MAX
3567# define PERL_SHORT_MAX ((short)SHORT_MAX)
3568# else
3569# ifdef MAXSHORT /* Often used in <values.h> */
3570# define PERL_SHORT_MAX ((short)MAXSHORT)
3571# else
3572# ifdef SHRT_MAX
3573# define PERL_SHORT_MAX ((short)SHRT_MAX)
3574# else
3575# define PERL_SHORT_MAX ((short) (PERL_USHORT_MAX >> 1))
3576# endif
3577# endif
3578# endif
3579#endif
3580
3581#ifndef PERL_SHORT_MIN
3582# ifdef SHORT_MIN
3583# define PERL_SHORT_MIN ((short)SHORT_MIN)
3584# else
3585# ifdef MINSHORT
3586# define PERL_SHORT_MIN ((short)MINSHORT)
3587# else
3588# ifdef SHRT_MIN
3589# define PERL_SHORT_MIN ((short)SHRT_MIN)
3590# else
3591# define PERL_SHORT_MIN (-PERL_SHORT_MAX - ((3 & -1) == 3))
3592# endif
3593# endif
3594# endif
3595#endif
3596
3597#ifndef PERL_UINT_MAX
3598# ifdef UINT_MAX
3599# define PERL_UINT_MAX ((unsigned int)UINT_MAX)
3600# else
3601# ifdef MAXUINT
3602# define PERL_UINT_MAX ((unsigned int)MAXUINT)
3603# else
3604# define PERL_UINT_MAX (~(unsigned int)0)
3605# endif
3606# endif
3607#endif
3608
3609#ifndef PERL_UINT_MIN
3610# define PERL_UINT_MIN ((unsigned int)0)
3611#endif
3612
3613#ifndef PERL_INT_MAX
3614# ifdef INT_MAX
3615# define PERL_INT_MAX ((int)INT_MAX)
3616# else
3617# ifdef MAXINT /* Often used in <values.h> */
3618# define PERL_INT_MAX ((int)MAXINT)
3619# else
3620# define PERL_INT_MAX ((int)(PERL_UINT_MAX >> 1))
3621# endif
3622# endif
3623#endif
3624
3625#ifndef PERL_INT_MIN
3626# ifdef INT_MIN
3627# define PERL_INT_MIN ((int)INT_MIN)
3628# else
3629# ifdef MININT
3630# define PERL_INT_MIN ((int)MININT)
3631# else
3632# define PERL_INT_MIN (-PERL_INT_MAX - ((3 & -1) == 3))
3633# endif
3634# endif
3635#endif
3636
3637#ifndef PERL_ULONG_MAX
3638# ifdef ULONG_MAX
3639# define PERL_ULONG_MAX ((unsigned long)ULONG_MAX)
3640# else
3641# ifdef MAXULONG
3642# define PERL_ULONG_MAX ((unsigned long)MAXULONG)
3643# else
3644# define PERL_ULONG_MAX (~(unsigned long)0)
3645# endif
3646# endif
3647#endif
3648
3649#ifndef PERL_ULONG_MIN
3650# define PERL_ULONG_MIN ((unsigned long)0L)
3651#endif
3652
3653#ifndef PERL_LONG_MAX
3654# ifdef LONG_MAX
3655# define PERL_LONG_MAX ((long)LONG_MAX)
3656# else
3657# ifdef MAXLONG
3658# define PERL_LONG_MAX ((long)MAXLONG)
3659# else
3660# define PERL_LONG_MAX ((long) (PERL_ULONG_MAX >> 1))
3661# endif
3662# endif
3663#endif
3664
3665#ifndef PERL_LONG_MIN
3666# ifdef LONG_MIN
3667# define PERL_LONG_MIN ((long)LONG_MIN)
3668# else
3669# ifdef MINLONG
3670# define PERL_LONG_MIN ((long)MINLONG)
3671# else
3672# define PERL_LONG_MIN (-PERL_LONG_MAX - ((3 & -1) == 3))
3673# endif
3674# endif
3675#endif
3676
3677#if defined(HAS_QUAD) && (defined(convex) || defined(uts))
3678# ifndef PERL_UQUAD_MAX
3679# ifdef ULONGLONG_MAX
3680# define PERL_UQUAD_MAX ((unsigned long long)ULONGLONG_MAX)
3681# else
3682# ifdef MAXULONGLONG
3683# define PERL_UQUAD_MAX ((unsigned long long)MAXULONGLONG)
3684# else
3685# define PERL_UQUAD_MAX (~(unsigned long long)0)
3686# endif
3687# endif
3688# endif
3689
3690# ifndef PERL_UQUAD_MIN
3691# define PERL_UQUAD_MIN ((unsigned long long)0L)
3692# endif
3693
3694# ifndef PERL_QUAD_MAX
3695# ifdef LONGLONG_MAX
3696# define PERL_QUAD_MAX ((long long)LONGLONG_MAX)
3697# else
3698# ifdef MAXLONGLONG
3699# define PERL_QUAD_MAX ((long long)MAXLONGLONG)
3700# else
3701# define PERL_QUAD_MAX ((long long) (PERL_UQUAD_MAX >> 1))
3702# endif
3703# endif
3704# endif
3705
3706# ifndef PERL_QUAD_MIN
3707# ifdef LONGLONG_MIN
3708# define PERL_QUAD_MIN ((long long)LONGLONG_MIN)
3709# else
3710# ifdef MINLONGLONG
3711# define PERL_QUAD_MIN ((long long)MINLONGLONG)
3712# else
3713# define PERL_QUAD_MIN (-PERL_QUAD_MAX - ((3 & -1) == 3))
3714# endif
3715# endif
3716# endif
3717#endif
3718
3719/* This is based on code from 5.003 perl.h */
3720#ifdef HAS_QUAD
3721# ifdef cray
3722#ifndef IVTYPE
3723# define IVTYPE int
3724#endif
3725
3726#ifndef IV_MIN
3727# define IV_MIN PERL_INT_MIN
3728#endif
3729
3730#ifndef IV_MAX
3731# define IV_MAX PERL_INT_MAX
3732#endif
3733
3734#ifndef UV_MIN
3735# define UV_MIN PERL_UINT_MIN
3736#endif
3737
3738#ifndef UV_MAX
3739# define UV_MAX PERL_UINT_MAX
3740#endif
3741
3742# ifdef INTSIZE
3743#ifndef IVSIZE
3744# define IVSIZE INTSIZE
3745#endif
3746
3747# endif
3748# else
3749# if defined(convex) || defined(uts)
3750#ifndef IVTYPE
3751# define IVTYPE long long
3752#endif
3753
3754#ifndef IV_MIN
3755# define IV_MIN PERL_QUAD_MIN
3756#endif
3757
3758#ifndef IV_MAX
3759# define IV_MAX PERL_QUAD_MAX
3760#endif
3761
3762#ifndef UV_MIN
3763# define UV_MIN PERL_UQUAD_MIN
3764#endif
3765
3766#ifndef UV_MAX
3767# define UV_MAX PERL_UQUAD_MAX
3768#endif
3769
3770# ifdef LONGLONGSIZE
3771#ifndef IVSIZE
3772# define IVSIZE LONGLONGSIZE
3773#endif
3774
3775# endif
3776# else
3777#ifndef IVTYPE
3778# define IVTYPE long
3779#endif
3780
3781#ifndef IV_MIN
3782# define IV_MIN PERL_LONG_MIN
3783#endif
3784
3785#ifndef IV_MAX
3786# define IV_MAX PERL_LONG_MAX
3787#endif
3788
3789#ifndef UV_MIN
3790# define UV_MIN PERL_ULONG_MIN
3791#endif
3792
3793#ifndef UV_MAX
3794# define UV_MAX PERL_ULONG_MAX
3795#endif
3796
3797# ifdef LONGSIZE
3798#ifndef IVSIZE
3799# define IVSIZE LONGSIZE
3800#endif
3801
3802# endif
3803# endif
3804# endif
3805#ifndef IVSIZE
3806# define IVSIZE 8
3807#endif
3808
3809#ifndef PERL_QUAD_MIN
3810# define PERL_QUAD_MIN IV_MIN
3811#endif
3812
3813#ifndef PERL_QUAD_MAX
3814# define PERL_QUAD_MAX IV_MAX
3815#endif
3816
3817#ifndef PERL_UQUAD_MIN
3818# define PERL_UQUAD_MIN UV_MIN
3819#endif
3820
3821#ifndef PERL_UQUAD_MAX
3822# define PERL_UQUAD_MAX UV_MAX
3823#endif
3824
3825#else
3826#ifndef IVTYPE
3827# define IVTYPE long
3828#endif
3829
3830#ifndef IV_MIN
3831# define IV_MIN PERL_LONG_MIN
3832#endif
3833
3834#ifndef IV_MAX
3835# define IV_MAX PERL_LONG_MAX
3836#endif
3837
3838#ifndef UV_MIN
3839# define UV_MIN PERL_ULONG_MIN
3840#endif
3841
3842#ifndef UV_MAX
3843# define UV_MAX PERL_ULONG_MAX
3844#endif
3845
3846#endif
3847
3848#ifndef IVSIZE
3849# ifdef LONGSIZE
3850# define IVSIZE LONGSIZE
3851# else
3852# define IVSIZE 4 /* A bold guess, but the best we can make. */
3853# endif
3854#endif
3855#ifndef UVTYPE
3856# define UVTYPE unsigned IVTYPE
3857#endif
3858
3859#ifndef UVSIZE
3860# define UVSIZE IVSIZE
3861#endif
3862
3863#ifndef sv_setuv
3864# define sv_setuv(sv, uv) \
3865 STMT_START { \
3866 UV TeMpUv = uv; \
3867 if (TeMpUv <= IV_MAX) \
3868 sv_setiv(sv, TeMpUv); \
3869 else \
3870 sv_setnv(sv, (double)TeMpUv); \
3871 } STMT_END
3872#endif
3873
3874#ifndef newSVuv
3875# define newSVuv(uv) ((uv) <= IV_MAX ? newSViv((IV)uv) : newSVnv((NV)uv))
3876#endif
3877#ifndef sv_2uv
3878# define sv_2uv(sv) ((PL_Sv = (sv)), (UV) (SvNOK(PL_Sv) ? SvNV(PL_Sv) : sv_2nv(PL_Sv)))
3879#endif
3880
3881#ifndef SvUVX
3882# define SvUVX(sv) ((UV)SvIVX(sv))
3883#endif
3884
3885#ifndef SvUVXx
3886# define SvUVXx(sv) SvUVX(sv)
3887#endif
3888
3889#ifndef SvUV
3890# define SvUV(sv) (SvIOK(sv) ? SvUVX(sv) : sv_2uv(sv))
3891#endif
3892
3893#ifndef SvUVx
3894# define SvUVx(sv) ((PL_Sv = (sv)), SvUV(PL_Sv))
3895#endif
3896
3897/* Hint: sv_uv
3898 * Always use the SvUVx() macro instead of sv_uv().
3899 */
3900#ifndef sv_uv
3901# define sv_uv(sv) SvUVx(sv)
3902#endif
3903#ifndef XST_mUV
3904# define XST_mUV(i,v) (ST(i) = sv_2mortal(newSVuv(v)) )
3905#endif
3906
3907#ifndef XSRETURN_UV
3908# define XSRETURN_UV(v) STMT_START { XST_mUV(0,v); XSRETURN(1); } STMT_END
3909#endif
96ad942f
MHM
3910#ifndef PUSHu
3911# define PUSHu(u) STMT_START { sv_setuv(TARG, (UV)(u)); PUSHTARG; } STMT_END
3912#endif
3913
3914#ifndef XPUSHu
3915# define XPUSHu(u) STMT_START { sv_setuv(TARG, (UV)(u)); XPUSHTARG; } STMT_END
3916#endif
adfe19db
MHM
3917
3918#if (PERL_VERSION < 4) || ((PERL_VERSION == 4) && (PERL_SUBVERSION <= 5))
3919/* Replace: 1 */
96ad942f
MHM
3920# define PL_DBsingle DBsingle
3921# define PL_DBsub DBsub
3922# define PL_Sv Sv
3923# define PL_compiling compiling
3924# define PL_copline copline
3925# define PL_curcop curcop
3926# define PL_curstash curstash
3927# define PL_debstash debstash
3928# define PL_defgv defgv
3929# define PL_diehook diehook
3930# define PL_dirty dirty
3931# define PL_dowarn dowarn
3932# define PL_errgv errgv
3933# define PL_hexdigit hexdigit
3934# define PL_hints hints
3935# define PL_na na
3936# define PL_no_modify no_modify
3937# define PL_perl_destruct_level perl_destruct_level
3938# define PL_perldb perldb
3939# define PL_ppaddr ppaddr
3940# define PL_rsfp_filters rsfp_filters
3941# define PL_rsfp rsfp
3942# define PL_stack_base stack_base
3943# define PL_stack_sp stack_sp
3944# define PL_stdingv stdingv
3945# define PL_sv_arenaroot sv_arenaroot
3946# define PL_sv_no sv_no
3947# define PL_sv_undef sv_undef
3948# define PL_sv_yes sv_yes
3949# define PL_tainted tainted
3950# define PL_tainting tainting
adfe19db
MHM
3951/* Replace: 0 */
3952#endif
3953
3954#ifdef HASATTRIBUTE
3955# if (defined(__GNUC__) && defined(__cplusplus)) || defined(__INTEL_COMPILER)
3956# define PERL_UNUSED_DECL
3957# else
3958# define PERL_UNUSED_DECL __attribute__((unused))
3959# endif
3960#else
3961# define PERL_UNUSED_DECL
3962#endif
3963#ifndef NOOP
3964# define NOOP (void)0
3965#endif
3966
3967#ifndef dNOOP
3968# define dNOOP extern int Perl___notused PERL_UNUSED_DECL
3969#endif
3970
3971#ifndef NVTYPE
3972# if defined(USE_LONG_DOUBLE) && defined(HAS_LONG_DOUBLE)
3973# define NVTYPE long double
3974# else
3975# define NVTYPE double
3976# endif
3977typedef NVTYPE NV;
3978#endif
3979
3980#ifndef INT2PTR
3981
3982# if (IVSIZE == PTRSIZE) && (UVSIZE == PTRSIZE)
3983# define PTRV UV
3984# define INT2PTR(any,d) (any)(d)
3985# else
3986# if PTRSIZE == LONGSIZE
3987# define PTRV unsigned long
3988# else
3989# define PTRV unsigned
3990# endif
3991# define INT2PTR(any,d) (any)(PTRV)(d)
3992# endif
3993
3994# define NUM2PTR(any,d) (any)(PTRV)(d)
3995# define PTR2IV(p) INT2PTR(IV,p)
3996# define PTR2UV(p) INT2PTR(UV,p)
3997# define PTR2NV(p) NUM2PTR(NV,p)
3998
3999# if PTRSIZE == LONGSIZE
4000# define PTR2ul(p) (unsigned long)(p)
4001# else
4002# define PTR2ul(p) INT2PTR(unsigned long,p)
4003# endif
4004
4005#endif /* !INT2PTR */
a745474a
MHM
4006
4007#undef START_EXTERN_C
4008#undef END_EXTERN_C
4009#undef EXTERN_C
4010#ifdef __cplusplus
4011# define START_EXTERN_C extern "C" {
4012# define END_EXTERN_C }
4013# define EXTERN_C extern "C"
4014#else
4015# define START_EXTERN_C
4016# define END_EXTERN_C
4017# define EXTERN_C extern
4018#endif
4019
4020#ifndef PERL_GCC_BRACE_GROUPS_FORBIDDEN
4021# if defined(__STRICT_ANSI__) && defined(PERL_GCC_PEDANTIC)
4022# define PERL_GCC_BRACE_GROUPS_FORBIDDEN
4023# endif
4024#endif
4025
4026#undef STMT_START
4027#undef STMT_END
4028#if defined(__GNUC__) && !defined(PERL_GCC_BRACE_GROUPS_FORBIDDEN) && !defined(__cplusplus)
4029# define STMT_START (void)( /* gcc supports ``({ STATEMENTS; })'' */
4030# define STMT_END )
4031#else
4032# if defined(VOIDFLAGS) && (VOIDFLAGS) && (defined(sun) || defined(__sun__)) && !defined(__GNUC__)
4033# define STMT_START if (1)
4034# define STMT_END else (void)0
4035# else
4036# define STMT_START do
4037# define STMT_END while (0)
4038# endif
4039#endif
adfe19db
MHM
4040#ifndef boolSV
4041# define boolSV(b) ((b) ? &PL_sv_yes : &PL_sv_no)
4042#endif
4043
4044/* DEFSV appears first in 5.004_56 */
4045#ifndef DEFSV
4046# define DEFSV GvSV(PL_defgv)
4047#endif
4048
4049#ifndef SAVE_DEFSV
4050# define SAVE_DEFSV SAVESPTR(GvSV(PL_defgv))
4051#endif
4052
4053/* Older perls (<=5.003) lack AvFILLp */
4054#ifndef AvFILLp
4055# define AvFILLp AvFILL
4056#endif
4057#ifndef ERRSV
4058# define ERRSV get_sv("@",FALSE)
4059#endif
4060#ifndef newSVpvn
4061# define newSVpvn(data,len) ((data) \
4062 ? ((len) ? newSVpv((data), (len)) : newSVpv("", 0)) \
4063 : newSV(0))
4064#endif
4065
4066/* Hint: gv_stashpvn
4067 * This function's backport doesn't support the length parameter, but
4068 * rather ignores it. Portability can only be ensured if the length
4069 * parameter is used for speed reasons, but the length can always be
4070 * correctly computed from the string argument.
4071 */
4072#ifndef gv_stashpvn
4073# define gv_stashpvn(str,len,create) gv_stashpv(str,create)
4074#endif
4075
4076/* Replace: 1 */
4077#ifndef get_cv
4078# define get_cv perl_get_cv
4079#endif
4080
4081#ifndef get_sv
4082# define get_sv perl_get_sv
4083#endif
4084
4085#ifndef get_av
4086# define get_av perl_get_av
4087#endif
4088
4089#ifndef get_hv
4090# define get_hv perl_get_hv
4091#endif
4092
4093/* Replace: 0 */
4094
4095#ifdef HAS_MEMCMP
4096#ifndef memNE
4097# define memNE(s1,s2,l) (memcmp(s1,s2,l))
4098#endif
4099
4100#ifndef memEQ
4101# define memEQ(s1,s2,l) (!memcmp(s1,s2,l))
4102#endif
4103
4104#else
4105#ifndef memNE
4106# define memNE(s1,s2,l) (bcmp(s1,s2,l))
4107#endif
4108
4109#ifndef memEQ
4110# define memEQ(s1,s2,l) (!bcmp(s1,s2,l))
4111#endif
4112
4113#endif
4114#ifndef MoveD
4115# define MoveD(s,d,n,t) memmove((char*)(d),(char*)(s), (n) * sizeof(t))
4116#endif
4117
4118#ifndef CopyD
4119# define CopyD(s,d,n,t) memcpy((char*)(d),(char*)(s), (n) * sizeof(t))
4120#endif
4121
4122#ifdef HAS_MEMSET
4123#ifndef ZeroD
4124# define ZeroD(d,n,t) memzero((char*)(d), (n) * sizeof(t))
4125#endif
4126
4127#else
4128#ifndef ZeroD
4129# define ZeroD(d,n,t) ((void)memzero((char*)(d), (n) * sizeof(t)),d)
4130#endif
4131
4132#endif
4133#ifndef Poison
4134# define Poison(d,n,t) (void)memset((char*)(d), 0xAB, (n) * sizeof(t))
4135#endif
4136#ifndef dUNDERBAR
4137# define dUNDERBAR dNOOP
4138#endif
4139
4140#ifndef UNDERBAR
4141# define UNDERBAR DEFSV
4142#endif
4143#ifndef dAX
4144# define dAX I32 ax = MARK - PL_stack_base + 1
4145#endif
4146
4147#ifndef dITEMS
4148# define dITEMS I32 items = SP - MARK
4149#endif
9132e1a3
MHM
4150#ifndef dXSTARG
4151# define dXSTARG SV * targ = sv_newmortal()
4152#endif
adfe19db
MHM
4153#ifndef dTHR
4154# define dTHR dNOOP
4155#endif
4156#ifndef dTHX
4157# define dTHX dNOOP
4158#endif
4159
4160#ifndef dTHXa
4161# define dTHXa(x) dNOOP
4162#endif
4163#ifndef pTHX
4164# define pTHX void
4165#endif
4166
4167#ifndef pTHX_
4168# define pTHX_
4169#endif
4170
4171#ifndef aTHX
4172# define aTHX
4173#endif
4174
4175#ifndef aTHX_
4176# define aTHX_
4177#endif
4178#ifndef dTHXoa
4179# define dTHXoa(x) dTHXa(x)
4180#endif
4181#ifndef PUSHmortal
4182# define PUSHmortal PUSHs(sv_newmortal())
4183#endif
4184
4185#ifndef mPUSHp
4186# define mPUSHp(p,l) sv_setpvn_mg(PUSHmortal, (p), (l))
4187#endif
4188
4189#ifndef mPUSHn
4190# define mPUSHn(n) sv_setnv_mg(PUSHmortal, (NV)(n))
4191#endif
4192
4193#ifndef mPUSHi
4194# define mPUSHi(i) sv_setiv_mg(PUSHmortal, (IV)(i))
4195#endif
4196
4197#ifndef mPUSHu
4198# define mPUSHu(u) sv_setuv_mg(PUSHmortal, (UV)(u))
4199#endif
4200#ifndef XPUSHmortal
4201# define XPUSHmortal XPUSHs(sv_newmortal())
4202#endif
4203
4204#ifndef mXPUSHp
4205# define mXPUSHp(p,l) STMT_START { EXTEND(sp,1); sv_setpvn_mg(PUSHmortal, (p), (l)); } STMT_END
4206#endif
4207
4208#ifndef mXPUSHn
4209# define mXPUSHn(n) STMT_START { EXTEND(sp,1); sv_setnv_mg(PUSHmortal, (NV)(n)); } STMT_END
4210#endif
4211
4212#ifndef mXPUSHi
4213# define mXPUSHi(i) STMT_START { EXTEND(sp,1); sv_setiv_mg(PUSHmortal, (IV)(i)); } STMT_END
4214#endif
4215
4216#ifndef mXPUSHu
4217# define mXPUSHu(u) STMT_START { EXTEND(sp,1); sv_setuv_mg(PUSHmortal, (UV)(u)); } STMT_END
4218#endif
4219
4220/* Replace: 1 */
4221#ifndef call_sv
4222# define call_sv perl_call_sv
4223#endif
4224
4225#ifndef call_pv
4226# define call_pv perl_call_pv
4227#endif
4228
4229#ifndef call_argv
4230# define call_argv perl_call_argv
4231#endif
4232
4233#ifndef call_method
4234# define call_method perl_call_method
4235#endif
4236#ifndef eval_sv
4237# define eval_sv perl_eval_sv
4238#endif
4239
4240/* Replace: 0 */
4241
4242/* Replace perl_eval_pv with eval_pv */
4243/* eval_pv depends on eval_sv */
4244
4245#ifndef eval_pv
4246#if defined(NEED_eval_pv)
96ad942f 4247static SV* DPPP_(my_eval_pv)(char *p, I32 croak_on_error);
adfe19db
MHM
4248static
4249#else
96ad942f 4250extern SV* DPPP_(my_eval_pv)(char *p, I32 croak_on_error);
adfe19db
MHM
4251#endif
4252
4253#ifdef eval_pv
4254# undef eval_pv
4255#endif
96ad942f
MHM
4256#define eval_pv(a,b) DPPP_(my_eval_pv)(aTHX_ a,b)
4257#define Perl_eval_pv DPPP_(my_eval_pv)
adfe19db
MHM
4258
4259#if defined(NEED_eval_pv) || defined(NEED_eval_pv_GLOBAL)
4260
4261SV*
96ad942f 4262DPPP_(my_eval_pv)(char *p, I32 croak_on_error)
adfe19db
MHM
4263{
4264 dSP;