Text::Markdown::Discount
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

6376 lines
151 KiB

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