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