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