This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl5.git
11 years agoGNU gcc-4.6.1 revealed a broken system header on HP-UX 11.00
H.Merijn Brand [Mon, 8 Aug 2011 10:06:45 +0000 (12:06 +0200)]
GNU gcc-4.6.1 revealed a broken system header on HP-UX 11.00

11 years ago[perl #96228] perlop misdocuments ${ qr/x/ } as undef
Chas. Owens [Sun, 7 Aug 2011 19:37:10 +0000 (12:37 -0700)]
[perl #96228] perlop misdocuments ${ qr/x/ } as undef

11 years agoIn embed.pl, inline hide() and bincompat_var() into their only call point.
Nicholas Clark [Sun, 7 Aug 2011 14:16:00 +0000 (16:16 +0200)]
In embed.pl, inline hide() and bincompat_var() into their only call point.

hide() has only been used by bincompat_var() since commit acfe0abcedaf592f
in 2001, and bincompat_var() only used in one place at the top level since
commit 87b9e16005b9e39b in 2010.

11 years agoIn embed.pl, refactor readvars() to return a sorted list.
Nicholas Clark [Sun, 7 Aug 2011 14:04:26 +0000 (16:04 +0200)]
In embed.pl, refactor readvars() to return a sorted list.

Previously it would assign to the hash reference passed to it. However, the
rest of the code only ever used the keys of that hash, in sorted order, so it
is simpler to change readvars() to return that list directly.

Also move the declaration of the lexical $sym down to its first point of use.

11 years agoIn embed.pl, remove unused parameter $keep_pre from readvars().
Nicholas Clark [Sun, 7 Aug 2011 13:46:09 +0000 (15:46 +0200)]
In embed.pl, remove unused parameter $keep_pre from readvars().

$keep_pre was added by commit c6af7a1aaf1f569e in 1998, and the last user
removed by commit 51371543ca1a75ed in 1999.

11 years agoUpdate CPAN to CPAN version 1.9800
Chris 'BinGOs' Williams [Sun, 7 Aug 2011 09:56:50 +0000 (10:56 +0100)]
Update CPAN to CPAN version 1.9800

  [DELTA]

  2011-08-07  Andreas J. Koenig  <andk@cpan.org>

  * release 1.9800

  * RT #69463: fix memory leak in CacheMgr (Serguei Trouchelle)

  2011-06-27  Andreas J. Koenig  <andk@cpan.org>

  * release 1.97_51

  * address #68835: Changed read_meta to ignore dynamic_config (David Golden)

  * bugfix: refuse to store_persistent if the own build_dir is not
  available (Andreas Koenig)

  * cosmetics: remove "Going to" from the beginning of user-visible
  strings (Jesse Vincent)

  * flock adjustments for Win32 from activestate (Christian Walde)

11 years agoUpdate DB_File to CPAN version 1.824
Chris 'BinGOs' Williams [Sat, 6 Aug 2011 21:38:29 +0000 (22:38 +0100)]
Update DB_File to CPAN version 1.824

  [DELTA]

  1.824 6 Aug 2011

   * Amendments to tests to work in blead
     [RT #70108]

11 years agoUpdate DB_File to CPAN version 1.823
Chris 'BinGOs' Williams [Sat, 6 Aug 2011 16:38:01 +0000 (17:38 +0100)]
Update DB_File to CPAN version 1.823

  [DELTA]

  1.823 6 Aug 2011

   * croak if attempt to freeze/thaw DB_File object
     [RT #69985]

11 years agoprevent mixing non-native and native newlines in manifest files
Sandy Andy [Sat, 6 Aug 2011 06:09:22 +0000 (08:09 +0200)]
prevent mixing non-native and native newlines in manifest files

11 years agoRemove comment from ck_glob that is no longer relevant
Father Chrysostomos [Sat, 6 Aug 2011 12:55:57 +0000 (05:55 -0700)]
Remove comment from ck_glob that is no longer relevant

This code was made more failsafe by commit 4984aa345.

11 years agoUpdate ExtUtils-MakeMaker to CPAN version 6.59
Chris 'BinGOs' Williams [Fri, 5 Aug 2011 17:38:51 +0000 (18:38 +0100)]
Update ExtUtils-MakeMaker to CPAN version 6.59

  [DELTA]

  6.59  Fri Aug  5 12:09:00 BST
    No changes since 6.58_01

  6.58_01  Wed Aug  3 21:12:00 BST
    Doc Fixes
    * Corrected the repository location [chorny]

    Bug Fixes
    * Removed the %INC check from _has_cpan_meta and updated the CPAN::Meta
      bundled with EUMM to one that doesn't set $VERSION in a begin block
      so it can't appear to be loaded, thus causing us to mistakenly try
      and call methods on CPAN::Meta modules - this is due to older versions
      in site_perl shadowing our installation of other bundled modules.
      [rt.cpan.org 69465] [rt.cpan.org 69900] [MSTROUT]

11 years agoRT #96354: \h \H \v and \V didn't check for EOL
David Mitchell [Fri, 5 Aug 2011 16:46:46 +0000 (17:46 +0100)]
RT #96354: \h \H \v and \V didn't check for EOL

The HORIZWS and similar regexp ops didn't check that the end of the string
had been reached; therefore they would blithely compare against the \0 at
the end of the string, or beyond.

11 years agoDon't use [.lib.pods] staging directory in VMS builds.
Craig A. Berry [Fri, 5 Aug 2011 14:12:25 +0000 (09:12 -0500)]
Don't use [.lib.pods] staging directory in VMS builds.

It's arduous to maintain all the dependency rules, and since
7eb47696de, which removed the only reference to $(pod), we don't
even *run* any of those rules, i.e., the directory does not even
get populated during the build.  Its existence appears to be a
carryover from a time before installperl copied [.pods] in the
build directory to [.lib.pods] in the install directory.

Reducing the size of vms/descrip_mms.template by 44% probably
won't cause too many tears to be shed, either.

11 years agoDon't install perldoc.com twice.
Craig A. Berry [Fri, 5 Aug 2011 14:01:39 +0000 (09:01 -0500)]
Don't install perldoc.com twice.

It gets built and installed in [.utils], so there's no reason to
copy it into [.lib.pods], from whence it gets installed a second
time.  Putting it in [.lib.pods] was introduced way back in
97abc6adff, well before installperl was even working on VMS.

11 years agoNo dots in directory names, please.
Craig A. Berry [Fri, 5 Aug 2011 13:25:37 +0000 (08:25 -0500)]
No dots in directory names, please.

Dot is the directory delimiter on VMS, so it's awkward at best to use
it in directory names.  4eb81ef279, "Update Module-Metadata to CPAN
version 1.000005" introduced two new directories with dots in the
name, which confused the manifest checker and broke the build on VMS.

11 years agoFix typos in pod/perlgit.pod
brian greenfield [Fri, 29 Jul 2011 12:55:10 +0000 (13:55 +0100)]
Fix typos in pod/perlgit.pod

11 years agoAnother ExtUtils::ParseXS version upgrade necessary
Steffen Mueller [Thu, 4 Aug 2011 18:12:21 +0000 (20:12 +0200)]
Another ExtUtils::ParseXS version upgrade necessary

This is ExtUtils::ParseXS 3.02. Nothing to see here.

11 years agoPromote ExtUtils::ParseXS to a stable release
Steffen Mueller [Thu, 4 Aug 2011 15:52:18 +0000 (17:52 +0200)]
Promote ExtUtils::ParseXS to a stable release

11 years agoSkip the hanging eintr.t test on GNU/kFreeBSD too
Niko Tyni [Thu, 4 Aug 2011 15:33:39 +0000 (08:33 -0700)]
Skip the hanging eintr.t test on GNU/kFreeBSD too

As we're still using a list of hanging operating systems,
include 'gnukfreebsd' by matching for 'freebsd' anywhere in $^O.

11 years agoSupport gcc-4.x on HP-UX PA-RISC/64
H.Merijn Brand [Thu, 4 Aug 2011 07:20:32 +0000 (09:20 +0200)]
Support gcc-4.x on HP-UX PA-RISC/64

Correct the socketsize. Probably due to big-endian versus
little-endian, this has always worked on Intel CPUs. This
is a very very old problem,  and it has been the reason I
never used gcc-4 on PA-RISC,  because perl would not pass
the test suite in 64bitall.

Noticeable effects of wrong "$socksizetype" are return codes
of 0 (pass) from functions like getpeername (),  but invalid
(or none) data in the returned structures or a return length
of 0 or 256. In the latter case, the length is stored in the
second part of the 64bit long and the 32bit first part is 0.
This might be true on Intel-like machines too, but the tests
will pass, as the significant part of the returned length is
in the first 32bits and a pointer to int will still see that
correct.  Mind that in that case the 32bits after that might
have been overridden => can of worms.

11 years agoUpdate Module-Metadata to CPAN version 1.000005
Chris 'BinGOs' Williams [Wed, 3 Aug 2011 08:28:11 +0000 (09:28 +0100)]
Update Module-Metadata to CPAN version 1.000005

  [DELTA]

  1.0.5 2011-08-02 09:45:00

  - Localize $package::VERSION during version discovery (MIYAGAWA)
  - Fix references to Module::Build::ModuleInfo [RT #66133] (DAGOLDEN)
  - Added 'new_from_handle()' method [RT #68875] (DAGOLDEN)
  - Improved documentation (SYNOPSIS, broke out class/object method, and
    other minor edits) (DAGOLDEN)

11 years agoUpdate CPAN-Meta to CPAN version 2.112150
Chris 'BinGOs' Williams [Wed, 3 Aug 2011 08:17:26 +0000 (09:17 +0100)]
Update CPAN-Meta to CPAN version 2.112150

  [DELTA]

  2.112150  2011-08-02 22:25:41 America/New_York

  [BUGFIX]

  - Stringify any objects encountered during conversion. (RT #67295)

  - Fixed some broken URLs in documentation and for LGPL in legacy
    conversion (RT #68738)

  - Fixed invalid private Pod in CPAN::Meta::Validator (RT #65925)

  [SPEC]

  - Clarified that file paths in the 'provides' section must be in
    Unix-style (i.e. forward slashes) (RT #69045)

  - Replaced examples using Module::Build::ModuleInfo with Module::Metadata
    (RT #66135)

11 years agoAdd the correct PL_sig_ignoring skip for VMS in makedef.pl.
Craig A. Berry [Wed, 3 Aug 2011 00:06:41 +0000 (19:06 -0500)]
Add the correct PL_sig_ignoring skip for VMS in makedef.pl.

This only exists when FAKE_PERSISTENT_SIGNAL_HANDLERS is defined,
and that's only defined when HAS_SIGACTION is false.

The problem was exposed by ed76ea85d1, which fixed a typo introduced
in aadb217dbe, but that typo introduced code that was a noop on all
platforms, including VMS, where $^O is 'VMS', not 'vms'.

TODO: The existence of PL_sig_defaulting and PL_sig_handlers_initted
depends on the definedness of FAKE_DEFAULT_SIGNAL_HANDLERS, which
depends on KILL_BY_SIGPRC, which is written directly to config.h
without being recorded in config.sh and is thus not visible in Config.
So there's no good way to know when these symbols should be skipped.

KILL_BY_SIGPRC currently gets defined on all VMS versions and platforms,
so it's a breakage-in-waiting but does not actually fall down (yet).

11 years agoRemove Perl_mod
Father Chrysostomos [Tue, 2 Aug 2011 21:41:58 +0000 (14:41 -0700)]
Remove Perl_mod

After mod was renamed to op_lvalue, this stub was added temporarily
to provide a smoother transition for the compilers.  The compiler
maintainer is happy with its extirpation at this stage.  See
ticket #78908.

11 years agoIncrease $diagnostics::VERSION from 1.23 to 1.24
Father Chrysostomos [Tue, 2 Aug 2011 21:33:25 +0000 (14:33 -0700)]
Increase $diagnostics::VERSION from 1.23 to 1.24

11 years agoRT #94988 - Support for %u in diagnostics.pm's printf()-format parser
Matthew Horsfall (alh) [Mon, 1 Aug 2011 02:42:22 +0000 (22:42 -0400)]
RT #94988 - Support for %u in diagnostics.pm's printf()-format parser

11 years agoFix typos in pod/perlexperiment.pod
Keith Thompson [Tue, 2 Aug 2011 20:58:09 +0000 (13:58 -0700)]
Fix typos in pod/perlexperiment.pod

11 years agoA few tweaks to the new perlexperiment.pod
Father Chrysostomos [Tue, 2 Aug 2011 19:36:32 +0000 (12:36 -0700)]
A few tweaks to the new perlexperiment.pod

• The :unique attribute has been deprecated already.
• The fields pragma has never been experimental and still exists.
• Grammar

11 years agoFix typos in several pod/perl*.pod files
Keith Thompson [Sat, 30 Jul 2011 00:17:00 +0000 (17:17 -0700)]
Fix typos in several pod/perl*.pod files

11 years agoMake verbatim pod in bignum.pm fit in 80 columns
Father Chrysostomos [Tue, 2 Aug 2011 15:39:56 +0000 (08:39 -0700)]
Make verbatim pod in bignum.pm fit in 80 columns

11 years agoAdd perlexperiment to detail experimental features
brian d foy [Mon, 25 Oct 2010 05:10:06 +0000 (00:10 -0500)]
Add perlexperiment to detail experimental features

nearly all this work merged from brian d foy's briandfoy/perlexperiment branch,
tidied up and squished by rjbs

11 years agoSvREFCNT_dec already checks if the SV is non-NULL
Vincent Pit [Tue, 2 Aug 2011 10:17:47 +0000 (12:17 +0200)]
SvREFCNT_dec already checks if the SV is non-NULL

11 years agoUpdate Module-Load to version 0.20
Chris 'BinGOs' Williams [Mon, 1 Aug 2011 19:17:54 +0000 (20:17 +0100)]
Update Module-Load to version 0.20

  [DELTA]

  Changes for 0.20    Mon Aug  1 19:13:44 2011
  ============================================
  * Resolve [rt #69886] reported by Laurent Dami,
    trailing '::' silently ignored

11 years agoNote the stat() change in perldelta
Tony Cook [Mon, 1 Aug 2011 12:01:02 +0000 (22:01 +1000)]
Note the stat() change in perldelta

11 years ago[rt #84590] try to preserve the inode number, even if it's large
Tony Cook [Wed, 27 Jul 2011 11:32:37 +0000 (21:32 +1000)]
[rt #84590] try to preserve the inode number, even if it's large

This matches the checks done for other stat() fields.

11 years agoMerge the refactored makedef.pl into blead.
Nicholas Clark [Mon, 1 Aug 2011 10:08:55 +0000 (12:08 +0200)]
Merge the refactored makedef.pl into blead.

This adds a new script, Porting/exercise_makedef.pl, to help test makedef.pl.

11 years agoNote in perldelta that makedef.pl has been refactored.
Nicholas Clark [Mon, 1 Aug 2011 10:07:44 +0000 (12:07 +0200)]
Note in perldelta that makedef.pl has been refactored.

11 years agoIn makedef.pl, refactor the code that reads *.sym files.
Nicholas Clark [Thu, 28 Jul 2011 15:03:04 +0000 (17:03 +0200)]
In makedef.pl, refactor the code that reads *.sym files.

Hoist the test that chooses the prefix out of the loop. Tweak the regex to
avoid needing an explicit chomp/ Use 3-arg open and a lexical for the file
handle.

11 years agoIn makedef.pl, correct a typo in a comment.
Nicholas Clark [Thu, 28 Jul 2011 13:08:27 +0000 (15:08 +0200)]
In makedef.pl, correct a typo in a comment.

11 years agoIn makedef.pl, avoid creating %PLATFORMS just for one existence check.
Nicholas Clark [Thu, 28 Jul 2011 13:05:26 +0000 (15:05 +0200)]
In makedef.pl, avoid creating %PLATFORMS just for one existence check.

A single linear search of @PLATFORMS is simpler and possibly even faster
than building a hash from @PLATFORMS, making one lookup, then discarding the
hash.

Add a block to limit the scope of @PLATFORMS to the code that uses it.

11 years agoIn makedef.pl, use %ARGS instead of 4 variables for command line arguments.
Nicholas Clark [Thu, 28 Jul 2011 12:29:27 +0000 (14:29 +0200)]
In makedef.pl, use %ARGS instead of 4 variables for command line arguments.

This simplifies processing @ARGV.

11 years agoIn makedef.pl, consolidate all the C compiler flags parsing code.
Nicholas Clark [Thu, 28 Jul 2011 12:04:53 +0000 (14:04 +0200)]
In makedef.pl, consolidate all the C compiler flags parsing code.

This isn't quite a "pure" refactoring, as -Dfoo=bar read from %Config will
now be processed as $Config{foo} = 'bar'; instead of $Config{foo} = 1;
However, it won't change any behaviour, as the only time makedef.pl uses a
value of %define for anything other than a truth test is $define{PERL_DLL},
and that is passed in on the command-line by the Makefile invoking
makedef.pl

11 years agoIn makedef.pl, read ccflags and optimize from %Config.
Nicholas Clark [Thu, 28 Jul 2011 11:24:36 +0000 (13:24 +0200)]
In makedef.pl, read ccflags and optimize from %Config.

Previously they were read by opening and parsing config.sh. Remove all code
related to reading config.sh, as it is no longer needed.

11 years agoIn makedef.pl, read 4 configuration values direct from %Config.
Nicholas Clark [Thu, 28 Jul 2011 11:06:26 +0000 (13:06 +0200)]
In makedef.pl, read 4 configuration values direct from %Config.

makedef.pl has been using Config since commit 9d6c7f2eccef26a6 in 2009.
Hence we can read them direct from %Config, instead of parsing config.sh
and storing the values in %define.

11 years agoIn makedef.pl, merge the code that reads config.sh
Nicholas Clark [Wed, 27 Jul 2011 21:21:14 +0000 (23:21 +0200)]
In makedef.pl, merge the code that reads config.sh

For now, retain compatibility (bug compatibility?) by not processing ccflags
and optimize on Win32, WinCE and NetWare.

11 years agoIn makedef.pl, export boot_* for static modules only on Win32 and WinCE.
Nicholas Clark [Fri, 29 Jul 2011 11:37:42 +0000 (13:37 +0200)]
In makedef.pl, export boot_* for static modules only on Win32 and WinCE.

The code as-is will only be run on Win32 and WinCE, because currently the
code to populate $static_ext is only run on Win32 and WinCE. As-is this code
can't be run on all platforms, because currently *nix (ie AIX) links static
extensions into the perl executable, rather than into the shared perl
library. Hence boot_* functions for static extensions aren't in the shared
perl library, so it would be an error to attempt to export them from it.

11 years agoIn makedef.pl, tidy up the MYMALLOC logic.
Nicholas Clark [Wed, 27 Jul 2011 13:36:35 +0000 (15:36 +0200)]
In makedef.pl, tidy up the MYMALLOC logic.

No need to call try_symbols() for PL_malloc_mutex, as it is found in
perlvars.h. Unlike PL_perlio_mutex, PL_malloc_mutex isn't listed in the
main !USE_ITHREADS skip list - perhaps it should be for consistency.

11 years agoIn makedef.pl, tidy up the USE_PERLIO logic.
Nicholas Clark [Tue, 26 Jul 2011 20:26:13 +0000 (22:26 +0200)]
In makedef.pl, tidy up the USE_PERLIO logic.

No need to call try_symbols() for PL_perlio_mutex, as it is found in
perlvars.h, and no need to duplicate the skip for it if USE_ITHREADS is not
defined.

We do need to skip PL_perlio_mutex if if USE_PERLIO is not defined but
USE_ITHREADS is [not that this is a configuration that Configure will let
you select, until you edit it :-)]

Add a comment describing what the "Oddities from PerlIO" are.

Remove PerlIO_sv_dup from the list, as it's also in @layer_syms, and
inclusion in @layer_syms makes the former redundant. It was added to both in
commit 8437356be6fd345c in 2001.

11 years agoIn makedef.pl, consolidate all the code that tries platform-specific symbols.
Nicholas Clark [Tue, 26 Jul 2011 15:25:39 +0000 (17:25 +0200)]
In makedef.pl, consolidate all the code that tries platform-specific symbols.

Previously the code for OS/2 and VMS was run much earlier. Fortunately none
of the symbols tried were conditionally added to the skip list, else much
confusion would have ensued.

Move the OS/2 code that reads miniperl.map after the code that tries
platform-specific symbols.

11 years agoIn makedef.pl, remove duplicate symbols passed to try_symbols() for OS/2.
Nicholas Clark [Tue, 26 Jul 2011 13:15:32 +0000 (15:15 +0200)]
In makedef.pl, remove duplicate symbols passed to try_symbols() for OS/2.

Code to try the 4 thread-specific symbols was added in 2003 by commit
5c728af092d5feba. However, all 4 symbols were already listed in makedef.pl,
added in 1999 by commit 3cfae81b38bc8edd.

(Unlike other platforms, on OS/2 adding symbols to %export that aren't
actually compiled in does not cause errors, as there is code later in
makedef.pl to read in miniperl.map, and strip from %export all symbols not
listed there.)

11 years agoIn makedef.pl, replace calls to try_symbol() with try_symbols().
Nicholas Clark [Tue, 26 Jul 2011 13:04:57 +0000 (15:04 +0200)]
In makedef.pl, replace calls to try_symbol() with try_symbols().

Following the simplification of the previous commit, the two are now
equivalent.

11 years agoIn makedef.pl, change readvar() to add items to a passed-in hash reference.
Nicholas Clark [Tue, 26 Jul 2011 12:37:53 +0000 (14:37 +0200)]
In makedef.pl, change readvar() to add items to a passed-in hash reference.

Previously, readvar() returned a list of symbols, extracting the names of
the variables declared there, then transforming them either via a passed in
function, or prepending 'PL_'. The list was then either added to %skip, or
added to %export by try_symbols(), which had a kludge to normalise the
previous transformation to 'PL_'.

Instead, passing a reference to the target hash into readvar() allows that
kludge to be removed, considerably simplifying try_symbols().

11 years agoIn makedef.pl, no need to loop over a 1 item list.
Nicholas Clark [Tue, 26 Jul 2011 12:20:25 +0000 (14:20 +0200)]
In makedef.pl, no need to loop over a 1 item list.

11 years agoIn makedef.pl, inline output_symbol() into its only caller.
Nicholas Clark [Tue, 26 Jul 2011 11:09:56 +0000 (13:09 +0200)]
In makedef.pl, inline output_symbol() into its only caller.

Remove code commented out by commit 51371543ca1a75ed in 1999 with the note
"binary compatibility between compilers is an exercise in frustration".

11 years agoIn makedef.pl, consolidate the actual output code in one place.
Nicholas Clark [Tue, 26 Jul 2011 10:46:48 +0000 (12:46 +0200)]
In makedef.pl, consolidate the actual output code in one place.

Previously, the platform specific header output code was near the top of
makedef.pl, before some of the emit/skip logic and some of the file reading
code, and far from the rest of the output logic.

11 years agoIn makedef.pl, rename emit_symbols() to try_symbols(), and pass it a list.
Nicholas Clark [Tue, 26 Jul 2011 10:23:51 +0000 (12:23 +0200)]
In makedef.pl, rename emit_symbols() to try_symbols(), and pass it a list.

try_symbols() better describes what it does - add symbols to the list to
export, unless they are in the skip list.

11 years agoIn makedef.pl, inline emit_symbol.
Nicholas Clark [Tue, 26 Jul 2011 10:05:51 +0000 (12:05 +0200)]
In makedef.pl, inline emit_symbol.

All emit_symbol() did was add to the hash of symbols to emit the list it was
passed.

11 years agoIn makedef.pl, eliminate now-superfluous chomp and file-content processing.
Nicholas Clark [Tue, 26 Jul 2011 09:16:02 +0000 (11:16 +0200)]
In makedef.pl, eliminate now-superfluous chomp and file-content processing.

emit_symbol() would chomp every symbol passed to it. The chomp was added in
3e3baf6d63945cb6, in the refactoring which replaced print statements with
emit_symbol(), because its callers (still) passed it the values previously
printed, values generated from the lines of files. The chomp in emit_symbol()
probably should have been removed as part of 22239a37ce131e4f, which unified
the code that parsed external files, adding chomp there, and added chomp to
the code which read from <DATA>.

The chomp of <DATA> added in 22239a37ce131e4f was moved wholesale with all
the file-content specific processing into a new routine try_symbol() in
commit 549a6b102c2ac8c4 on the cfgperl branch. That commit and subsequent
commits used try_symbol() as the general-purpose routine to add symbols to
the export list, even though it also had all the specific file processing
code to ignore comments and other text that did not look like symbols.

An analogous alternative routine to add symbols to the export list,
emit_symbols(), was added to blead 6 days earlier in commit 51371543ca1a75ed.

As makedef.pl no longer uses <DATA>, and reading from external files is
nicely encapsulated, all this vestigial code can be removed.

Technical debt from 1997 and 1999 finally being eliminated.

11 years agoIn makedef.pl, inline skip_symbols.
Nicholas Clark [Mon, 25 Jul 2011 22:02:22 +0000 (00:02 +0200)]
In makedef.pl, inline skip_symbols.

All skip_symbols() did was add to the hash of symbols to skip the list it was
passed.

11 years agoIn makedef.pl, readvar now returns a list, not an array reference.
Nicholas Clark [Mon, 25 Jul 2011 20:59:30 +0000 (22:59 +0200)]
In makedef.pl, readvar now returns a list, not an array reference.

Convert it from a loop to a map. Refactor its callers to use its results
directly, instead of assigning to a lexical variable which is used only once.

11 years agoIn makedef.pl, move the "oddities from PerlIO" from <DATA> to a data structure.
Nicholas Clark [Mon, 25 Jul 2011 16:07:54 +0000 (18:07 +0200)]
In makedef.pl, move the "oddities from PerlIO" from <DATA> to a data structure.

At one time various categories of symbols were listed after __DATA__.
All others are now dealt with elsewhere, leaving only some PerlIO symbols, at
which point it becomes clearer and terser to move the list to the point in the
code that previously looped over <DATA>.

11 years agoIn makedef.pl, consolidate all the code conditional on PERL_IMPLICIT_SYS.
Nicholas Clark [Mon, 25 Jul 2011 13:00:41 +0000 (15:00 +0200)]
In makedef.pl, consolidate all the code conditional on PERL_IMPLICIT_SYS.

Previously the conditional skips were for all platforms (in two places, both
added in commit 7766f1371a6d2b58, whereas the conditional additions to the
export lists were in platform specific blocks for Win32, WinCE and NetWare.
Given that only those 3 platforms can (currently) build with
-DPERL_IMPLICIT_SYS, it's safe to implicitly remove the platform check for
those export additions by moving the code.

11 years agoIn makedef.pl, NetWare can't export perl_clone_host without USE_ITHREADS.
Nicholas Clark [Mon, 25 Jul 2011 12:13:51 +0000 (14:13 +0200)]
In makedef.pl, NetWare can't export perl_clone_host without USE_ITHREADS.

NetWare/nw5.c conditionally compiles perl_clone_host only if USE_ITHREADS is
defined. It can't be added to the export list if it isn't compiled.
NetWare/config.wc has useithreads='define'

11 years agoIn makedef.pl, read Config::{,non_}bincompat_options() on all platforms.
Nicholas Clark [Fri, 22 Jul 2011 16:54:01 +0000 (18:54 +0200)]
In makedef.pl, read Config::{,non_}bincompat_options() on all platforms.

Previously makedef.pl was only taking them into account on AIX, Win32 and
WinCE. This might cause more API symbols to be exported on NetWare, OS/2
and VMS.

On VMS, $define{DEBUGGING} and $define{UNLINK_ALL_VERSIONS} will now be read
from Config::non_bincompat_options(), so no need for special case code to
read them config.sh

11 years agoIn makedef.pl, remove the skip for Perl_pidgone for not-PERL_USES_PL_PIDSTATUS.
Nicholas Clark [Thu, 21 Jul 2011 11:49:59 +0000 (13:49 +0200)]
In makedef.pl, remove the skip for Perl_pidgone for not-PERL_USES_PL_PIDSTATUS.

The skip for Perl_pidgone was added by 0c25f67f45e5dccb in 2005, However,
Perl_pidgone was never in the public API, and has not been available for
export since commit 954c1994944eafa7 (in January 2000).

11 years agoIn makedef.pl, remove the skip for Perl_mro_meta_dup for non-ITHREADS.
Nicholas Clark [Thu, 21 Jul 2011 11:10:42 +0000 (13:10 +0200)]
In makedef.pl, remove the skip for Perl_mro_meta_dup for non-ITHREADS.

Perl_mro_meta_dup was removed from the public API with commit
47c9dd1447a52d20 in April 2007, and hence was never in the API for any stable
release.

11 years agoIn makedef.pl, remove Perl_malloc{ed,_good}_size from the !MYMALLOC skip list.
Nicholas Clark [Thu, 21 Jul 2011 10:50:28 +0000 (12:50 +0200)]
In makedef.pl, remove Perl_malloc{ed,_good}_size from the !MYMALLOC skip list.

Perl_malloced_size was never in the public API, has not been available for
export since commit 954c1994944eafa7 (in January 2000) restricted exports to
just API functions. Perl_malloc_good_size was added to the skip list with
commit 641071807211a396, which added the (non-API) function to malloc.c

11 years agoIn makedef.pl, remove 15 non-API functions from the not-PERLMAD skip list.
Nicholas Clark [Thu, 21 Jul 2011 10:38:29 +0000 (12:38 +0200)]
In makedef.pl, remove 15 non-API functions from the not-PERLMAD skip list.

These functions have never been exported, so never needed to be added to the
skip list in makedef.pl. Perl_pad_peg was added in 1dba731d9f7b0a03, the
remainder in 3b721df9bf246129.

11 years agoIn makedef.pl, remove the skip for Perl_deb_growlevel for not-DEBUGGING.
Nicholas Clark [Thu, 21 Jul 2011 10:04:14 +0000 (12:04 +0200)]
In makedef.pl, remove the skip for Perl_deb_growlevel for not-DEBUGGING.

Perl_deb_growlevel was removed in 199 by commit f4c556ac9d141bf8.

11 years agoIn makedef.pl, remove the skip for PL_sig_sv for PERL_IMPLICIT_CONTEXT.
Nicholas Clark [Wed, 20 Jul 2011 20:52:55 +0000 (22:52 +0200)]
In makedef.pl, remove the skip for PL_sig_sv for PERL_IMPLICIT_CONTEXT.

PL_sig_sv was removed in 2010 by commit 0c4d3b5ea916cf64.

11 years agoIn makedef.pl, remove the skip for 9 symbols for not-USE_ITHREADS
Nicholas Clark [Wed, 20 Jul 2011 20:37:56 +0000 (22:37 +0200)]
In makedef.pl, remove the skip for 9 symbols for not-USE_ITHREADS

They were moved into the XS for threads::shared in 2002 by commit
68795e9367de9848.

11 years agoIn makedef.pl, remove the skip for PL_regdupe for not-USE_ITHREADS.
Nicholas Clark [Wed, 20 Jul 2011 20:29:18 +0000 (22:29 +0200)]
In makedef.pl, remove the skip for PL_regdupe for not-USE_ITHREADS.

PL_regdupe was removed in 2006 by commit f9f4320a413e57e4.

11 years agoIn makedef.pl, remove the skip for PL_curthr for FAKE_THREADS.
Nicholas Clark [Wed, 20 Jul 2011 20:13:37 +0000 (22:13 +0200)]
In makedef.pl, remove the skip for PL_curthr for FAKE_THREADS.

PL_curthr was removed along with the rest of the 5.005 thread implementation
in 2002.

11 years agoIn makedef.pl, remove all skips for variables now in the parser struct.
Nicholas Clark [Wed, 20 Jul 2011 19:39:30 +0000 (21:39 +0200)]
In makedef.pl, remove all skips for variables now in the parser struct.

Different parser variables exist when perl is compiled with/without -Dmad.
Before these were moved into the parser struct, they all had to be skipped
explicitly. Now the parser struct has different members depending on whether
perl is MAD or not.

11 years agoIn makedef.pl, consolidate $PLATFORM specific skip logic.
Nicholas Clark [Tue, 19 Jul 2011 16:16:01 +0000 (18:16 +0200)]
In makedef.pl, consolidate $PLATFORM specific skip logic.

11 years agoIn makedef.pl, correct a use of $^O to $PLATFORM.
Nicholas Clark [Tue, 19 Jul 2011 16:03:38 +0000 (18:03 +0200)]
In makedef.pl, correct a use of $^O to $PLATFORM.

11 years agoIn makedef.pl, skip Perl_signbit when HAS_SIGNBIT is defined.
Nicholas Clark [Tue, 19 Jul 2011 14:48:07 +0000 (16:48 +0200)]
In makedef.pl, skip Perl_signbit when HAS_SIGNBIT is defined.

Previously this condition was only checked on AIX and VMS. However, as all
the other platforms don't have HAS_SIGNBIT defined, this simplifies the code
with no change in output.

11 years agoIn makedef.pl, simplify handling the 7 symbols wanted on Win32 but not WinCE.
Nicholas Clark [Tue, 19 Jul 2011 14:31:23 +0000 (16:31 +0200)]
In makedef.pl, simplify handling the 7 symbols wanted on Win32 but not WinCE.

18f68570297a0260 added WinCE, but did so by changing a block that adds
symbols for Win32 to add them for both Win32 & WinCE, and simultaneously
adding 7 of those symbols to the WinCE specific skip list.

Much simpler is to split the list of symbols to add into one for Win32 only,
and one for Win32 & WinCE, and removing the skip list.

11 years agoIn makedef.pl, remove PL_csh{len,name} from 3 skip lists.
Nicholas Clark [Tue, 19 Jul 2011 14:07:53 +0000 (16:07 +0200)]
In makedef.pl, remove PL_csh{len,name} from 3 skip lists.

PL_cshname was converted to a true global by commit 618b9757aa96db62 in
2007, and PL_cshlen to a constant macro. Effectively both were dropped from
the list of exported symbols at this time, although as they were skipped on
Win32, WinCE and NetWare, the only platforms which would have noticed would
be AIX, OS/2 and VMS. As they've been missing in 5.10.0, 5.12.0 and 5.14.0
without any bug reports, it doesn't seem worth re-adding PL_cshname to the
list of exported symbols.

11 years agoIn makedef.pl, remove from 3 skip lists 3 variables now in PL_parser.
Nicholas Clark [Tue, 19 Jul 2011 13:53:14 +0000 (15:53 +0200)]
In makedef.pl, remove from 3 skip lists 3 variables now in PL_parser.

199e78b72f538ce0 moved PL_pending_indent and PL_sublex_info into the
PL_parser struct. f06b58485d86282d moved PL_linestart there.

11 years agoIn makedef.pl, remove PL_archpat_auto from 3 skip lists.
Nicholas Clark [Tue, 19 Jul 2011 13:17:46 +0000 (15:17 +0200)]
In makedef.pl, remove PL_archpat_auto from 3 skip lists.

PL_archpat_auto was eliminated by commit a7cb1f9979dd83ab in 1999 -
"support for v5.5.640 style version numbers".

11 years agoIn makedef.pl, remove Perl_setenv_getix from 3 skip lists.
Nicholas Clark [Tue, 19 Jul 2011 12:56:41 +0000 (14:56 +0200)]
In makedef.pl, remove Perl_setenv_getix from 3 skip lists.

Perl_setenv_getix was never in the public API, has not been available for
export since commit 954c1994944eafa7 (in January 2000) restricted exports to
just API functions, and in 2008 was changed to a static function with commit
051b305ded17acbc and then eliminated by being inlined into its only caller
with commit 3a9222bef66d8694.

11 years agoIn makedef.pl, remove Perl_init_thread_intern from 3 skip lists.
Nicholas Clark [Tue, 19 Jul 2011 12:34:26 +0000 (14:34 +0200)]
In makedef.pl, remove Perl_init_thread_intern from 3 skip lists.

Perl_init_thread_intern has not been available for export since commit
864dbfa3ca8032ef in 1999, and was removed by 3db8f154c4c6e098 in 2002.

11 years agoIn makedef.pl, remove Perl_my_p{open,close} from 3 skip lists.
Nicholas Clark [Tue, 19 Jul 2011 11:46:08 +0000 (13:46 +0200)]
In makedef.pl, remove Perl_my_p{open,close} from 3 skip lists.

Both will already be correctly skipped by the existing code that
handles PERL_IMPLICIT_SYS.

11 years agoIn makedef.pl, remove Perl_ErrorNo from 4 skip lists.
Nicholas Clark [Tue, 19 Jul 2011 11:02:38 +0000 (13:02 +0200)]
In makedef.pl, remove Perl_ErrorNo from 4 skip lists.

Perl_ErrnoNo() was removed in 51371543ca1a75ed in 1999.

11 years agoIn makedef.pl, remove from skip lists symbols which are not in the API.
Nicholas Clark [Tue, 19 Jul 2011 10:50:35 +0000 (12:50 +0200)]
In makedef.pl, remove from skip lists symbols which are not in the API.

The Win32 and AIX lists were created back when all symbols were exported.
954c1994944eafa7 (in January 2000) restricted exports to just API functions.
The skip lists were not purged of non-API functions, and have subsequently
propagated to new ports via mindless copy & paste.

11 years agoIn makedef.pl, remove Perl_safex{{c,m,re}alloc,free} from 4 skip lists.
Nicholas Clark [Mon, 18 Jul 2011 21:28:58 +0000 (23:28 +0200)]
In makedef.pl, remove Perl_safex{{c,m,re}alloc,free} from 4 skip lists.

All 4 were part of LEAKTEST, removed in 2002 with 7bab3ede7bf671f5.

11 years agoIn makedef.pl, skip relevant symbols when HAVE_INTERP_INTERN is not defined.
Nicholas Clark [Mon, 18 Jul 2011 19:26:20 +0000 (21:26 +0200)]
In makedef.pl, skip relevant symbols when HAVE_INTERP_INTERN is not defined.

Previously these symbols were only listed as platform specific exceptions
for AIX and NetWare. NetWare actually failed to list PL_sys_intern, but this
would not have mattered, as their config.wc shows that NetWare builds with
-DMULTIPLICITY, and hence "PL_sys_intern" is not a real variable there, but
part of the interpreter struct.

11 years agoIn makedef.pl, skip Perl_unlnk on all platforms without UNLINK_ALL_VERSIONS.
Nicholas Clark [Mon, 18 Jul 2011 13:55:52 +0000 (15:55 +0200)]
In makedef.pl, skip Perl_unlnk on all platforms without UNLINK_ALL_VERSIONS.

As only VMS sets UNLINK_ALL_VERSIONS, this permits removing Perl_unlnk from
the platform specific skip lists of all the other platforms.

11 years agoIn makedef.pl, skip relevant symbols when USE_LOCALE_NUMERIC is not defined.
Nicholas Clark [Mon, 18 Jul 2011 13:21:32 +0000 (15:21 +0200)]
In makedef.pl, skip relevant symbols when USE_LOCALE_NUMERIC is not defined.

Previously these symbols were only listed as platform specific exceptions
for WinCE. config.ce has i_locale as undef, so <locale.h> is not included,
so (presumably) there USE_LOCALE_NUMERIC is not part of
Config::bincompat_options().

11 years agoIn makedef.pl, skip relevant symbols when USE_LOCALE_COLLATE is not defined.
Nicholas Clark [Mon, 18 Jul 2011 13:00:53 +0000 (15:00 +0200)]
In makedef.pl, skip relevant symbols when USE_LOCALE_COLLATE is not defined.

Previously these symbols were only listed as platform specific exceptions
for WinCE. config.ce has i_locale as undef, so <locale.h> is not included,
so (presumably) there USE_LOCALE_COLLATE is not part of
Config::bincompat_options().

11 years agoIn makedef.pl, remove PL_numeric_compat1 from the WinCE skip list.
Nicholas Clark [Mon, 18 Jul 2011 12:19:42 +0000 (14:19 +0200)]
In makedef.pl, remove PL_numeric_compat1 from the WinCE skip list.

e0a47c36269dd7ce removed PL_numeric_compat1 from the interpreter structure, but
missed the reference to it here.

11 years agoIn makedef.pl, remove unneeded PerlIO* skips from the NetWare platform list.
Nicholas Clark [Mon, 18 Jul 2011 11:10:22 +0000 (13:10 +0200)]
In makedef.pl, remove unneeded PerlIO* skips from the NetWare platform list.

011f1a1a00b94fe9 added, among other things, 23 PerlIO symbols to the
list to skip on NetWare on 2002/04/22. On 2002/05/01, ad6971c848a6c9ab
added PerlIO_perlio to the main list of symbols to skip if PerlIO was
deconfigured. On 2002/05/02, 1e8a8f599308436d added the other 22 there.

NetWare's configuration (config.wc) has perlio=undef. Hence the latter 2
commits were the correct fix, and the 23 symbols can be removed from the
NetWare platform list with no difference in makedef.pl's output.

11 years agoIn makedef.pl, extract SPRINTF_RETURNS_STRLEN from config.h
Nicholas Clark [Mon, 18 Jul 2011 10:31:42 +0000 (12:31 +0200)]
In makedef.pl, extract SPRINTF_RETURNS_STRLEN from config.h

This allows its removal from platform specific skip lists.

11 years agoIn makedef.pl, all platforms other than OS/2 share 12 common "skip_symbols".
Nicholas Clark [Mon, 18 Jul 2011 08:54:33 +0000 (10:54 +0200)]
In makedef.pl, all platforms other than OS/2 share 12 common "skip_symbols".

11 years agoIn makedef.pl, merge the regexs that parse config.h.
Nicholas Clark [Sun, 17 Jul 2011 21:29:42 +0000 (23:29 +0200)]
In makedef.pl, merge the regexs that parse config.h.

11 years agoIn makedef.pl, merge the regexs that parse config.sh on non-dosish platforms.
Nicholas Clark [Sun, 17 Jul 2011 21:16:59 +0000 (23:16 +0200)]
In makedef.pl, merge the regexs that parse config.sh on non-dosish platforms.

Use a plain alternation, instead of trying to "optimise", as the trie compiler
can do a much better job than a human.

11 years agoIn makedef.pl, use HAS_{MMAP,SIGACTION} instead of d_{mmap,sigaction}.
Nicholas Clark [Thu, 28 Jul 2011 09:40:48 +0000 (11:40 +0200)]
In makedef.pl, use HAS_{MMAP,SIGACTION} instead of d_{mmap,sigaction}.

All defines matching /^HAS_/ are read from config.h, so no need for special
code to read the corresponding variables from config.sh.

11 years agoIn makedef.pl, replace $CONFIG_ARGS, $ARCHNAME, $PATCHLEVEL with keys in %define
Nicholas Clark [Sun, 17 Jul 2011 15:49:39 +0000 (16:49 +0100)]
In makedef.pl, replace $CONFIG_ARGS, $ARCHNAME, $PATCHLEVEL with keys in %define

11 years agoIn makedef.pl, set $CONFIG_ARGS, $ARCHNAME and $PATCHLEVEL on all platforms.
Nicholas Clark [Sun, 17 Jul 2011 15:29:28 +0000 (16:29 +0100)]
In makedef.pl, set $CONFIG_ARGS, $ARCHNAME and $PATCHLEVEL on all platforms.

They are only used on OS/2, but there's no harm in processing them on all
platforms, as this eliminates some platform specific code.