This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl5.git
3 years agoparts/inc/misc: Shorten sub names
Karl Williamson [Thu, 11 Jul 2019 22:16:42 +0000 (16:16 -0600)]
parts/inc/misc: Shorten sub names

These all had an unnecessary prefix that was to prevent name space
collisions, but the infrastructure of D:P already took care of that.

(cherry picked from commit d8d82913b626ad2f6c5179d4a95b26fe52048a70)
Signed-off-by: Nicolas R <atoomic@cpan.org>
3 years agoparts/inc/misc: Can't use GCC brace groups before 5.4
Karl Williamson [Wed, 10 Jul 2019 04:19:27 +0000 (22:19 -0600)]
parts/inc/misc: Can't use GCC brace groups before 5.4

(cherry picked from commit b036d9249ac2b7f64d8a3e9b2f520a469f86fcdb)
Signed-off-by: Nicolas R <atoomic@cpan.org>
3 years agoparts/inc/misc: Change Hints into comments
Karl Williamson [Thu, 4 Jul 2019 20:23:05 +0000 (14:23 -0600)]
parts/inc/misc: Change Hints into comments

I wrote these not knowing what Hints were for (since clarified in
HACKERS).  They are really comments for a person reading this file.

(cherry picked from commit 0dcefa7708a4113757a215c3e5386b2ead255135)
Signed-off-by: Nicolas R <atoomic@cpan.org>
3 years agoparts/inc/mess: Use numeric comparisons for $]
Karl Williamson [Wed, 10 Jul 2019 04:15:45 +0000 (22:15 -0600)]
parts/inc/mess: Use numeric comparisons for $]

These give better results, and the string compares were broken on 5.4.3.

(cherry picked from commit 01fbc5c65146c6cce5845f6accca6515ca4509b3)
Signed-off-by: Nicolas R <atoomic@cpan.org>
3 years agoparts/inc/mess: Don't use 'for' modifier
Karl Williamson [Wed, 10 Jul 2019 04:12:15 +0000 (22:12 -0600)]
parts/inc/mess: Don't use 'for' modifier

It doesn't work on early perls.  Instead wrap with a for loop

(cherry picked from commit c87fc33e0370528f8e0376e48ef0ea4f82395afb)
Signed-off-by: Nicolas R <atoomic@cpan.org>
3 years agoparts/inc/mess: Some things are broken in the 5.7 series
Karl Williamson [Wed, 10 Jul 2019 04:09:27 +0000 (22:09 -0600)]
parts/inc/mess: Some things are broken in the 5.7 series

while working earlier and later

(cherry picked from commit fa7ee13073f7d45e205cd6cdd7e727c83739ed30)
Signed-off-by: Nicolas R <atoomic@cpan.org>
3 years agoparts/inc/mess: Some things don't work before 5.4.0
Karl Williamson [Wed, 10 Jul 2019 04:05:51 +0000 (22:05 -0600)]
parts/inc/mess: Some things don't work before 5.4.0

(cherry picked from commit d2544abef917c023c211f4e084ff464c0e07b822)
Signed-off-by: Nicolas R <atoomic@cpan.org>
3 years agoparts/inc/mess: \N{} broken in more versions
Karl Williamson [Sun, 30 Jun 2019 16:45:54 +0000 (10:45 -0600)]
parts/inc/mess: \N{} broken in more versions

Skip these tests on more versions than before

(cherry picked from commit f62175a208c31a08d85fb2d73b7a6d496b04ad37)
Signed-off-by: Nicolas R <atoomic@cpan.org>
3 years agoparts/inc/cop: Adjust prototype to match blead
Karl Williamson [Fri, 12 Jul 2019 16:49:17 +0000 (10:49 -0600)]
parts/inc/cop: Adjust prototype to match blead

(cherry picked from commit c19b8832d23fd6999231e451e86a50fb43720790)
Signed-off-by: Nicolas R <atoomic@cpan.org>
3 years agoparts/inc/call: Fix to run on old perls
Karl Williamson [Sun, 14 Jul 2019 15:57:27 +0000 (09:57 -0600)]
parts/inc/call: Fix to run on old perls

Use numeric, not string, comparisons with $], and can't have postfix
'for' modifiers

(cherry picked from commit 19e824df0bd6883d8f3deef860bbaf40249d811b)
Signed-off-by: Nicolas R <atoomic@cpan.org>
3 years agoparts/inc/call: Adjust prototype to match blead
Karl Williamson [Fri, 12 Jul 2019 16:49:59 +0000 (10:49 -0600)]
parts/inc/call: Adjust prototype to match blead

(cherry picked from commit 444c878fc618827c1d33c2257476c31815c50eda)
Signed-off-by: Nicolas R <atoomic@cpan.org>
3 years agoparts/inc/format: Fix to work on early perls
Karl Williamson [Tue, 9 Jul 2019 17:55:48 +0000 (11:55 -0600)]
parts/inc/format: Fix to work on early perls

It just isn't ported before 5.4, and postfix 'for' isn't supported

(cherry picked from commit 88a327df23bd4647730a8a6bc2e99879a1f96fc9)
Signed-off-by: Nicolas R <atoomic@cpan.org>
3 years agoppphtest: Update based on previous commits
Karl Williamson [Fri, 9 Aug 2019 20:24:25 +0000 (14:24 -0600)]
ppphtest: Update based on previous commits

The wording of some messages has changed.  This also adds some test
names

(cherry picked from commit 80d37f0acfdb10cf180655b4accf49ea09e93379)
Signed-off-by: Nicolas R <atoomic@cpan.org>
3 years agodevel/mkapidoc.pl: Rewrite entirely in perl
Karl Williamson [Mon, 19 Aug 2019 22:42:45 +0000 (16:42 -0600)]
devel/mkapidoc.pl: Rewrite entirely in perl

The old version, partially in sh, grabbed every file in the directory
structure, looking for apidoc lines.  Unfortunately that included
things, in .git, for example, and those could be out-of-date entries,
with the result that there could be multiple entries with different
prototypes for the same macro.

This commit changes to read only MANIFEST files, and a few generated
files.

(cherry picked from commit d8bc0a3f40e83e52934696240c2d89398465a56c)
Signed-off-by: Nicolas R <atoomic@cpan.org>
3 years agoparts/inc/ppphdoc: Add caution to pod
Karl Williamson [Wed, 7 Aug 2019 00:09:43 +0000 (18:09 -0600)]
parts/inc/ppphdoc: Add caution to pod

(cherry picked from commit 35558be45ff5f20805c6ea56f66b900231ac4e33)
Signed-off-by: Nicolas R <atoomic@cpan.org>
3 years agoPPPort_pm.PL: Silence warnings on early perls
Karl Williamson [Sat, 17 Aug 2019 13:37:09 +0000 (07:37 -0600)]
PPPort_pm.PL: Silence warnings on early perls

Enclose some hash keys in quotes.

(cherry picked from commit cef8c4f4fa7a02a330ed79ac67934ad32e5e48e0)
Signed-off-by: Nicolas R <atoomic@cpan.org>
3 years agodevel/regenerate: make sure the .fnc files don't overlap
Karl Williamson [Thu, 15 Aug 2019 22:43:01 +0000 (16:43 -0600)]
devel/regenerate: make sure the .fnc files don't overlap

If they do, this could show that they weren't recently regenerated, or
that there is a bug in the regeneration code.

(cherry picked from commit 51e09cbdf5df04a4e2a7304c5a5bf39f9e91ff00)
Signed-off-by: Nicolas R <atoomic@cpan.org>
3 years agodevel/scanprov: Store information about all fcns
Karl Williamson [Thu, 15 Aug 2019 22:08:06 +0000 (16:08 -0600)]
devel/scanprov: Store information about all fcns

This makes it convenient for someone to find out in what version
something got added.  I'm not publicizing this just yet, and
ppport.h --api-check won't return it for non-public ones at the moment,
but the information is now there for those who know where to look, and
perhaps for future public consumption.

(cherry picked from commit a9fc5abd7e81911cb92ed3554300c340a8f3c88e)
Signed-off-by: Nicolas R <atoomic@cpan.org>
3 years agoparts/apicheck.pl: Use the passed NEED_foo macros
Karl Williamson [Thu, 15 Aug 2019 03:38:54 +0000 (21:38 -0600)]
parts/apicheck.pl: Use the passed NEED_foo macros

These no longer need to be hardcoded in two places when adding new ones.

(cherry picked from commit 867650c3a523c9e8f5014ba02ef52e88692a5302)
Signed-off-by: Nicolas R <atoomic@cpan.org>
3 years agodevel/regenerate: get a list of all NEED_foo macros
Karl Williamson [Thu, 15 Aug 2019 04:43:23 +0000 (22:43 -0600)]
devel/regenerate: get a list of all NEED_foo macros

And put it in the environment for apicheck.pl.  This will keep a
maintainer from having to remember to add these in two places.

(cherry picked from commit 6734eaffe2a3aedd68a6c610a0f0258c2df850e9)
Signed-off-by: Nicolas R <atoomic@cpan.org>
3 years agoRealPPPort_xs.PL: Fix spelling in comment
Karl Williamson [Thu, 15 Aug 2019 02:24:13 +0000 (20:24 -0600)]
RealPPPort_xs.PL: Fix spelling in comment

(cherry picked from commit acd6caec2173ad3c12f04c788b8b4ba64746e2b1)
Signed-off-by: Nicolas R <atoomic@cpan.org>
3 years agodevel/regenerate: Add some error checking
Karl Williamson [Thu, 15 Aug 2019 01:35:11 +0000 (19:35 -0600)]
devel/regenerate: Add some error checking

Make sure that things we skip testing are on the list of such things,
which has information that we otherwise would glean from testing

(cherry picked from commit 98ff9eaf3c08405d27ba8380835087116e7c98f4)
Signed-off-by: Nicolas R <atoomic@cpan.org>
3 years agoUpdate parts/ppport.fnc
Karl Williamson [Wed, 14 Aug 2019 23:56:30 +0000 (17:56 -0600)]
Update parts/ppport.fnc

(cherry picked from commit 09bc9a820d17f1010e8b6bacdf1e6d319ef4e41b)
Signed-off-by: Nicolas R <atoomic@cpan.org>
3 years agoparts/apicheck.pl: make macro public in X+M flagged functions
Karl Williamson [Wed, 14 Aug 2019 05:07:26 +0000 (23:07 -0600)]
parts/apicheck.pl: make macro public in X+M flagged functions

The X says we export a function even though it's not public API, but the
M says there is an extra, public, macro that maybe used to call the
function, but now calls something else, and that macro is public, so
should be tested.

(cherry picked from commit 7528b129460c777edc99db3e5555b38a41a9390f)
Signed-off-by: Nicolas R <atoomic@cpan.org>
3 years agoCreate regeneration files in final directory
Karl Williamson [Wed, 14 Aug 2019 03:04:57 +0000 (21:04 -0600)]
Create regeneration files in final directory

Prior to this commit, the files for what happened when were placed in
the parts/todo directory, then moved to parts/base.  Now they go
directly into their final resting place

(cherry picked from commit 18edcc361cd5a2a208ae85a627c3c861c5ce3d74)
Signed-off-by: Nicolas R <atoomic@cpan.org>
3 years agoPass values from mktodo.pl to apicheck.pl
Karl Williamson [Tue, 13 Aug 2019 18:30:28 +0000 (12:30 -0600)]
Pass values from mktodo.pl to apicheck.pl

This uses an environment variable to send the version number across a
make to apicheck.pl, where it is inserted as comments in apicheck.c.

I found that when debugging, it is useful to have this information
handy throughout the file.

(cherry picked from commit 2a055a1a8526c1b721d10078ce9bf39178c7ea62)
Signed-off-by: Nicolas R <atoomic@cpan.org>
3 years agoppport.fnc
Karl Williamson [Tue, 13 Aug 2019 15:18:01 +0000 (09:18 -0600)]
ppport.fnc

(cherry picked from commit 139ab76c6ce97398246dda402e0e98ac32e1df1d)
Signed-off-by: Nicolas R <atoomic@cpan.org>
3 years agoPPPort_pm.PL: Add __UNDEF_NOT_PROVIDED__
Karl Williamson [Thu, 8 Aug 2019 20:44:15 +0000 (14:44 -0600)]
PPPort_pm.PL: Add __UNDEF_NOT_PROVIDED__

This is like __UNDEFINED__, but does make "provided" the macro it
targets

(cherry picked from commit 63a8d75f3253d340ded4bbbc4246d68fdf7ed0e7)
Signed-off-by: Nicolas R <atoomic@cpan.org>
3 years agoPPPort_pm.PL: Add an item for unknown min supported version
Karl Williamson [Thu, 8 Aug 2019 19:51:33 +0000 (13:51 -0600)]
PPPort_pm.PL: Add an item for unknown min supported version

The pod for this has sections of what elements are first supported when.
Unfortunately there are some that we do not have that information.

The cure for this is for someone to contribute pod for that element to
the perl core, but in the meantime, this lists those we couldn't figure
out.

It uses ppport.fnc to figure out many of the ones it otherwise couldn't.
And it is possible to enhance this to figure out more.  But just
documenting them removes them from the list.  And they should be
documented anyway.

(cherry picked from commit 5b548c97ec59bfb65f3caefea9fcf50cf8cd6d49)
Signed-off-by: Nicolas R <atoomic@cpan.org>
3 years agoparts/ppptools.pl: Make sure mathoms fcns are deprecated
Karl Williamson [Thu, 8 Aug 2019 19:37:17 +0000 (13:37 -0600)]
parts/ppptools.pl: Make sure mathoms fcns are deprecated

This makes sure that we consider functions in mathoms as being
deprecated.  The current blead regen/embed.pl already does this, but
this makes sure, should that get reverted.  A mathoms function with
an M flag indicates there is a macro by that name that avoids the
function (which must begin with 'Perl_'), and the macro isn't deprecated
unless the D flag is also present.

(cherry picked from commit 8ed3f9e76aca7a9341a8878d2d7c61a8b8717621)
Signed-off-by: Nicolas R <atoomic@cpan.org>
3 years agoparts/apicheck.pl: Don't test macros with weird params
Karl Williamson [Thu, 8 Aug 2019 19:32:44 +0000 (13:32 -0600)]
parts/apicheck.pl: Don't test macros with weird params

These are marked for us in the =for apidoc line.

(cherry picked from commit beb801439ddfa3dc555a1ea0ff5a1794715b6ca4)
Signed-off-by: Nicolas R <atoomic@cpan.org>
3 years agoparts/inc/ppphbin: Use dependency info for min support
Karl Williamson [Thu, 8 Aug 2019 19:18:21 +0000 (13:18 -0600)]
parts/inc/ppphbin: Use dependency info for min support

Some items don't get tested, and so we don't know their minimum
supported version.  But if they're dependent on some other thing whose
minimum version we do know, we can glean that they aren't supported
prior the the dependent thing's support.

(cherry picked from commit 311664e55550bf20d255a952ad2532c1c8747c73)
Signed-off-by: Nicolas R <atoomic@cpan.org>
3 years agoAdd script to regenerate ppport.fnc
Karl Williamson [Sat, 3 Aug 2019 22:47:40 +0000 (16:47 -0600)]
Add script to regenerate ppport.fnc

Now, instead of this being static, it will be regenerated.  This allows
us to create tests for macros that otherwise wouldn't be.

(cherry picked from commit b730918253cf5ea4167f6c3ee7096dd2e4068506)
Signed-off-by: Nicolas R <atoomic@cpan.org>
3 years agoPPPort_pm.PL: Handle blead specially
Karl Williamson [Sun, 28 Jul 2019 22:15:06 +0000 (16:15 -0600)]
PPPort_pm.PL: Handle blead specially

blead actually shouldn't be reported, as the symbols it shows as
existing are (due to the algorithm) actually ones that don't exist in
any version.  By ignoring it, we omit wrong information.

(cherry picked from commit 97d35610a4fccf694db9a601b102b5a2888b9713)
Signed-off-by: Nicolas R <atoomic@cpan.org>
3 years agoparts/inc/uv: Add Replace: pragma
Karl Williamson [Sun, 28 Jul 2019 21:38:00 +0000 (15:38 -0600)]
parts/inc/uv: Add Replace: pragma

(cherry picked from commit fef460fa0e876800c7cde33b188dd2c95a6ec231)
Signed-off-by: Nicolas R <atoomic@cpan.org>
3 years agoparts/inc/SvPV: Add Replace: comments
Karl Williamson [Sun, 28 Jul 2019 21:30:52 +0000 (15:30 -0600)]
parts/inc/SvPV: Add Replace: comments

(cherry picked from commit 0b4cfb7fef017e2bb9ff99e223a6fce5f2bb7794)
Signed-off-by: Nicolas R <atoomic@cpan.org>
3 years agoppport.h: Make use of scanprov's new returns
Karl Williamson [Thu, 8 Aug 2019 19:10:29 +0000 (13:10 -0600)]
ppport.h: Make use of scanprov's new returns

(cherry picked from commit 0e1a8da5dde291aa56a336ed14ce721f3e6c028f)
Signed-off-by: Nicolas R <atoomic@cpan.org>
3 years agoppport.h: Reword --api-info entries
Karl Williamson [Wed, 7 Aug 2019 01:14:55 +0000 (19:14 -0600)]
ppport.h: Reword --api-info entries

This makes the wording, I believe, more succinct and friendlier.

(cherry picked from commit 272e25aaf16afedb1ad27079644861e472aa58bc)
Signed-off-by: Nicolas R <atoomic@cpan.org>
3 years agoppport.h: --api-info Reorder output of hints/depends info
Karl Williamson [Wed, 7 Aug 2019 01:01:12 +0000 (19:01 -0600)]
ppport.h: --api-info Reorder output of hints/depends info

It looks better after everything else

(cherry picked from commit 0b98f2fcb18283bc726c16fc45ba8e8efcf8017c)
Signed-off-by: Nicolas R <atoomic@cpan.org>
3 years agoppport.h: Suppress useless warning
Karl Williamson [Fri, 2 Aug 2019 00:17:34 +0000 (18:17 -0600)]
ppport.h: Suppress useless warning

If an element is ported as far back as we know about, there is no point
warning about that.

(cherry picked from commit cb6834059fb808db043092b42e421a66023ea26a)
Signed-off-by: Nicolas R <atoomic@cpan.org>
3 years agoparts/inc/ppphbin: Do calc once, and store in variable
Karl Williamson [Wed, 7 Aug 2019 01:05:28 +0000 (19:05 -0600)]
parts/inc/ppphbin: Do calc once, and store in variable

(cherry picked from commit ef5acaa4d66699bbf87a9051192c1db82f79d406)
Signed-off-by: Nicolas R <atoomic@cpan.org>
3 years agoPPPort_pm.PL: Make use of scanprov's new flags
Karl Williamson [Fri, 2 Aug 2019 00:09:05 +0000 (18:09 -0600)]
PPPort_pm.PL: Make use of scanprov's new flags

scanprov now gives us a type for the symbols it adds.  Pass that type
along to ppport.h

(cherry picked from commit ba8e4f38988bca4a29edeb751b6c461eb671864b)
Signed-off-by: Nicolas R <atoomic@cpan.org>
3 years agodevel/scanprov: Scan for functions we didn't test
Karl Williamson [Thu, 1 Aug 2019 23:14:03 +0000 (17:14 -0600)]
devel/scanprov: Scan for functions we didn't test

mktodo.pl tried to compile each element it knows about.  But not all
will actually compile, as some compile only when certain Configure
options are specified on certain platforms, like ones dealing with quad
math, or GLOBAL_PRIVATE_STRUCT.  But those functions are in embed.fnc
and the hdrs that get generated from that.  We can use the same
mechanism as elsewhere in scanprov to look for the first mentions of
these.

(cherry picked from commit 8530a7806b5283c981eb3e22ba311be35924a071)
Signed-off-by: Nicolas R <atoomic@cpan.org>
3 years agodevel/scanprov: Extract code into a function
Karl Williamson [Thu, 1 Aug 2019 23:03:27 +0000 (17:03 -0600)]
devel/scanprov: Extract code into a function

This is in preparation for it being called a 2nd time.

(cherry picked from commit be556cbfa5105ba27a1099ca21625c4958ee8992)
Signed-off-by: Nicolas R <atoomic@cpan.org>
3 years agodevel/mktodo.pl: Get working on threaded perls.
Karl Williamson [Thu, 1 Aug 2019 16:14:39 +0000 (10:14 -0600)]
devel/mktodo.pl: Get working on threaded perls.

If we don't ignore issues with this libc symbol, pthread_getspecific(),
we don't work on threaded perls.

I don't understand why this is undefined.

(cherry picked from commit dd767ef602ff590b061b8d54d83eaec1945ec473)
Signed-off-by: Nicolas R <atoomic@cpan.org>
3 years agoppport.h: Turn off some likely warnings
Karl Williamson [Sun, 28 Jul 2019 21:07:14 +0000 (15:07 -0600)]
ppport.h: Turn off some likely warnings

I'm not sure when this ability to turn off warnings was introduced, but
putting it inside a block eval should avoid any issues.

(cherry picked from commit d1378eaded6746a4c36230f9eb803c2bce7edb3d)
Signed-off-by: Nicolas R <atoomic@cpan.org>
3 years agoparts/apicheck.pl: Don't skip some cases
Karl Williamson [Sun, 28 Jul 2019 19:45:25 +0000 (13:45 -0600)]
parts/apicheck.pl: Don't skip some cases

We only should create a single test for a given function.  But if that
function is like this:

  #if foo
    int bar(...)
  #else
    char bar(...)
  #endif

We would only generate a test for the 'foo' case.  Uniqueness of a
function includes the compile time conditional expression for it.

(cherry picked from commit 2d6698cc1724195e18acd67fb8fddf9527372eda)
Signed-off-by: Nicolas R <atoomic@cpan.org>
3 years agodevel/scanprov: Add in exceptions
Karl Williamson [Sun, 28 Jul 2019 19:50:50 +0000 (13:50 -0600)]
devel/scanprov: Add in exceptions

Things like RETVAL were being listed as not having any portability
information, whereas they are actually valid for all current releases.
Elements like these can't be tested individually because they are too
tightly bound with XS, which is used to do the testing.  Therefore, they
are in a list of exceptions.  This commit causes scanprov to use this
list and insert the items into the proper version files.

(cherry picked from commit 06245c0f864cb3b530028a3fbb2baa3e540cccbf)
Signed-off-by: Nicolas R <atoomic@cpan.org>
3 years agoparts/apicheck.pl: Extract list into lib fcn call
Karl Williamson [Sun, 28 Jul 2019 19:43:16 +0000 (13:43 -0600)]
parts/apicheck.pl: Extract list into lib fcn call

This is in preparation for scanprov to use the same list.

(cherry picked from commit b3b8255b1cb743f160e6d9f33fa52b7b7149d53b)
Signed-off-by: Nicolas R <atoomic@cpan.org>
3 years agoPPPort_pm.PL: Revise pod
Karl Williamson [Sun, 28 Jul 2019 18:23:42 +0000 (12:23 -0600)]
PPPort_pm.PL: Revise pod

(cherry picked from commit 7c5cbcc2317710ec510aad42e8c64ca65ca0f7a4)
Signed-off-by: Nicolas R <atoomic@cpan.org>
3 years agoXXX parts/inc/ppphtest: Update
Karl Williamson [Sun, 28 Jul 2019 17:12:24 +0000 (11:12 -0600)]
XXX parts/inc/ppphtest: Update

Changes in this distribution have caused certain things to change
slightly.  Update so the tests pass again.

(cherry picked from commit 53824f57c7b96239c40fa20a89f6b184cca12b77)
Signed-off-by: Nicolas R <atoomic@cpan.org>
3 years agodevel/scanprov: Add a code letter to generated lines
Karl Williamson [Mon, 29 Jul 2019 18:01:51 +0000 (12:01 -0600)]
devel/scanprov: Add a code letter to generated lines

This is in preparation for other types of lines being handled by
scanprov.

The lines in parts/base that come from mktodo.pl have the codes that nm
outputs for each symbol, plus some internal codes.  This adds M, which
doesn't appear to be an nm code.

(cherry picked from commit cb5fef4b862d528eba649ee18870324ac26a4e68)
Signed-off-by: Nicolas R <atoomic@cpan.org>
3 years agodevel/scanprov: Extract code into a fcn
Karl Williamson [Mon, 29 Jul 2019 17:56:16 +0000 (11:56 -0600)]
devel/scanprov: Extract code into a fcn

This is in preparation for it being called from other places

(cherry picked from commit 56bf67b75f766a453aa2373db9f6f09935cbae2e)
Signed-off-by: Nicolas R <atoomic@cpan.org>
3 years agodevel/scanprov: Ignore comments in scan
Karl Williamson [Sun, 28 Jul 2019 16:59:01 +0000 (10:59 -0600)]
devel/scanprov: Ignore comments in scan

As noted in the comments in scanprov, the results could be thrown off by
something being mentioned in a comment in a scanned hdr.  This commit
removes the comments before scanning.

I'm unsure of what else could throw off the results, but I can imagine
there is something that I (and previous maintainers) haven't thought of.

(cherry picked from commit 413b3996cf5d19cc43357ba714b0662c93d73903)
Signed-off-by: Nicolas R <atoomic@cpan.org>
3 years agodevel/scanprov: Restrict symbols to identifier-like
Karl Williamson [Sun, 28 Jul 2019 16:39:08 +0000 (10:39 -0600)]
devel/scanprov: Restrict symbols to identifier-like

Previously, it used \w+, which gathers things like numbers.  We are
instead interested in identifiers.  It probably doesn't make a
difference except that we don't needlessly add a bunch of things to the
generated hash

(cherry picked from commit 83a7475bfcfa1bd2d56b4cb1a77f43e7059c2f20)
Signed-off-by: Nicolas R <atoomic@cpan.org>
3 years agodevel/scanprov: Handle blead properly
Karl Williamson [Sun, 28 Jul 2019 16:22:25 +0000 (10:22 -0600)]
devel/scanprov: Handle blead properly

Previously, the code just removed blead from the list of perls it dealt
with.  But this doesn't work, because the algorithm (heuristic,
actually) relies on going through all the versions, and the symbols
erroneously ascribed to blead will instead erroneously be ascribed to
the next lower version.  Instead, this commit changes so that blead is
simply not written.  (The comments detail why the symbols are
erroneously ascribed to the highest version checked.)

(cherry picked from commit 89c7fcf8b81b3390a318abd2d2f5875305fc5fd1)
Signed-off-by: Nicolas R <atoomic@cpan.org>
3 years agoPPPort_pm.PL: Rename variable for clarity
Karl Williamson [Thu, 8 Aug 2019 18:57:12 +0000 (12:57 -0600)]
PPPort_pm.PL: Rename variable for clarity

Doing so showed that we already had an array with what we wanted, no
need to go through a hash again.

(cherry picked from commit 4f91b5dc1d8171a6bc6b54fb8d76fa6bca697f7b)
Signed-off-by: Nicolas R <atoomic@cpan.org>
3 years agoPPPort_pm.PL: Comments, white space
Karl Williamson [Sun, 21 Jul 2019 18:47:36 +0000 (12:47 -0600)]
PPPort_pm.PL: Comments, white space

(cherry picked from commit c9bb660cea95c2c98a0f5a6a63b7f5fdf1d2fadc)
Signed-off-by: Nicolas R <atoomic@cpan.org>
3 years agoparts/inc/ppphbin: Change variable name
Karl Williamson [Thu, 1 Aug 2019 16:39:08 +0000 (10:39 -0600)]
parts/inc/ppphbin: Change variable name

This makes it clearer at first glance as to what is going on

(cherry picked from commit 38edf48e7b91ba30e1c26958445deac475d52347)
Signed-off-by: Nicolas R <atoomic@cpan.org>
3 years agoparts/inc/ppphbin: Add comments
Karl Williamson [Sun, 21 Jul 2019 18:47:01 +0000 (12:47 -0600)]
parts/inc/ppphbin: Add comments

(cherry picked from commit 9e8dd684615d93294c81a4bff7e7610b0621d1fe)
Signed-off-by: Nicolas R <atoomic@cpan.org>
3 years agoparts/inc/ppphbin: Fix accumulation of Hints/Warnings
Karl Williamson [Sun, 21 Jul 2019 18:43:30 +0000 (12:43 -0600)]
parts/inc/ppphbin: Fix accumulation of Hints/Warnings

Prior to this commit, if any line in the middle of one of these didn't
begin with an asterisk (a typical comment continuation marker), the hint
was silently discarded.

(cherry picked from commit d7b17de7bd53bc7f5c58e0aebeec7420e0de860d)
Signed-off-by: Nicolas R <atoomic@cpan.org>
3 years agoRename some data files
Karl Williamson [Mon, 15 Jul 2019 16:06:04 +0000 (10:06 -0600)]
Rename some data files

These are renamed to their proper 6 digit perl version names.
Previously the final part was multiplied by 10.

(cherry picked from commit d48910fdea411975c3e0be496800f8ea73c69091)
Signed-off-by: Nicolas R <atoomic@cpan.org>
3 years agopppport: Print hints/warnings always.
Karl Williamson [Sun, 28 Jul 2019 21:51:39 +0000 (15:51 -0600)]
pppport: Print hints/warnings always.

Previously they were displayed only if somethng else was.

(cherry picked from commit 27527f7a456d30199751a43bdba64212daad7e61)
Signed-off-by: Nicolas R <atoomic@cpan.org>
3 years agoparts/inc/ppphbin: Add clarifying text to output
Karl Williamson [Sun, 14 Jul 2019 16:01:09 +0000 (10:01 -0600)]
parts/inc/ppphbin: Add clarifying text to output

(cherry picked from commit 1f910f5b55fe9bfb8d755dae343f2b785e44aee7)
Signed-off-by: Nicolas R <atoomic@cpan.org>
3 years agoppport.h: Don't say unsupported if avail in earliest version
Karl Williamson [Sun, 21 Jul 2019 18:31:14 +0000 (12:31 -0600)]
ppport.h: Don't say unsupported if avail in earliest version

If this API element is available in the earliest version we have info
for, then it actually is supported.

(cherry picked from commit 083f8295dac44481178034faba58f096dda25703)
Signed-off-by: Nicolas R <atoomic@cpan.org>
3 years agoppport.h: Don't print unsupported info for invalid entries
Karl Williamson [Sun, 21 Jul 2019 18:29:22 +0000 (12:29 -0600)]
ppport.h: Don't print unsupported info for invalid entries

By 'invalid', I mean ones that are, say deprecated or inaccessible
outside core, etc.

(cherry picked from commit a114ba3327ec8379d16b870e91d260b1e99b1866)
Signed-off-by: Nicolas R <atoomic@cpan.org>
3 years agoppport.h: Print out more API info
Karl Williamson [Sun, 21 Jul 2019 18:27:21 +0000 (12:27 -0600)]
ppport.h: Print out more API info

This uses the flags from embed.fnc to enable printing better API info
for elements that are, say, deprecated or core-only.

(cherry picked from commit 1fc2b5279cfb31e354f3bba615df71f721ad071b)
Signed-off-by: Nicolas R <atoomic@cpan.org>
3 years agoparts/inc/ppphbin: Change variable name
Karl Williamson [Sun, 21 Jul 2019 04:11:55 +0000 (22:11 -0600)]
parts/inc/ppphbin: Change variable name

This was a smash up of several words that I kept reading wrong

(cherry picked from commit 20bf156f900f5a012fc3610ddc54db6092ed907e)
Signed-off-by: Nicolas R <atoomic@cpan.org>
3 years agoparts/inc/ppphbin: Change option default
Karl Williamson [Sun, 21 Jul 2019 03:56:10 +0000 (21:56 -0600)]
parts/inc/ppphbin: Change option default

The verion that we default to shouldn't be earlier than the earliest
version we know about.

(cherry picked from commit ef70102090b532971146c8ea9d67df4369abb175)
Signed-off-by: Nicolas R <atoomic@cpan.org>
3 years agodevel/mktodo.pl: Don't discard earliest info
Karl Williamson [Sun, 21 Jul 2019 03:43:12 +0000 (21:43 -0600)]
devel/mktodo.pl: Don't discard earliest info

When regenerating the files of what came when, the code uses version n
as a base to see what version n+1 added.  Prior to this commit the
information from version 0 was simply discarded.  That meant you had to
have one more perl to compile than what you wanted info for.  That is
wasteful and unnecessary.

This commit changes so that a file is generated for the earliest perl
being generated, containing all the API symbols known to that perl.
Effectively, it assumes that all of them popped into existence when that
version came out.  Words will be changed in the output to indicate that
these symbols have been available AT LEAST since this version.

For many years, the earliest perl that we had info for was 5.003_07.
That meant that the regeneration was run with an even earlier perl.
With this commit, wherever we stop, we have information from it, and
don't have to throw anything away.

(cherry picked from commit 28c1bee885eb2373eda222e45b5af49cec6ccfb5)
Signed-off-by: Nicolas R <atoomic@cpan.org>
3 years agoPPPort_pm.PL: Don't hard-code min/max versions
Karl Williamson [Sun, 21 Jul 2019 00:34:53 +0000 (18:34 -0600)]
PPPort_pm.PL: Don't hard-code min/max versions

We can calculate this from the files we have generated, so manual
intervention is no longer required.

(cherry picked from commit f778898fbc24791c7b1181ac5e4d9b677d7e3233)
Signed-off-by: Nicolas R <atoomic@cpan.org>
3 years agoAdd an argument to mktodo.pl
Karl Williamson [Sun, 21 Jul 2019 00:10:39 +0000 (18:10 -0600)]
Add an argument to mktodo.pl

This will be the directory in which to place the output files.

This will enable not having to write over one set of file as we go
along.  Previously everything got written to one directory, then the
files were moved, and the directory filled again.

This will also enable passing in info without having to add even more,
mostly redundant, arguments.

(cherry picked from commit 23e4148517314fb987306cc65255c25028174c16)
Signed-off-by: Nicolas R <atoomic@cpan.org>
3 years agodevel/mktodo.pl: White-space only
Karl Williamson [Sun, 21 Jul 2019 00:18:01 +0000 (18:18 -0600)]
devel/mktodo.pl: White-space only

(cherry picked from commit e01f423f20117c9315f3b05bd485a78cab5b8212)
Signed-off-by: Nicolas R <atoomic@cpan.org>
3 years agoparts/inc/inctools: Add function to format version
Karl Williamson [Sun, 21 Jul 2019 00:04:15 +0000 (18:04 -0600)]
parts/inc/inctools: Add function to format version

This takes a version number and creates a floating point version with
exactly 7 digits with a decimal point after the 5.  This is used as the
first line in files in parts/todo,base, as well as in the data in
ppport.h.

(cherry picked from commit fad2103a9a2c28ff439b9b7c851a9e09194e91a6)
Signed-off-by: Nicolas R <atoomic@cpan.org>
3 years agodevel/mktodo.pl: Use debug levels.
Karl Williamson [Tue, 6 Aug 2019 22:26:49 +0000 (16:26 -0600)]
devel/mktodo.pl: Use debug levels.

(cherry picked from commit cb2f9c687c7687295c5f63aca668edba9a395751)
Signed-off-by: Nicolas R <atoomic@cpan.org>
3 years agoChange --debug option to have levels of detail
Karl Williamson [Tue, 6 Aug 2019 22:03:38 +0000 (16:03 -0600)]
Change --debug option to have levels of detail

(cherry picked from commit d62bda55bbfa2de367141dce1774eed7db9c3b64)
Signed-off-by: Nicolas R <atoomic@cpan.org>
3 years agodevel/regenerate: Remove exists from if tests
Karl Williamson [Thu, 1 Aug 2019 22:40:06 +0000 (16:40 -0600)]
devel/regenerate: Remove exists from if tests

I'm unsure as to why his is needed, but I found there were problems when
the code uses exists instead of just checking if the value is true.
This is a tiny hash, so autovivification isn't a performance issue at
all.

(cherry picked from commit 41457fa69251e60ddfce2e4f870a09a0115bfc6b)
Signed-off-by: Nicolas R <atoomic@cpan.org>
3 years agodevel/regenerate: Add a few comments
Karl Williamson [Sat, 13 Jul 2019 19:30:55 +0000 (13:30 -0600)]
devel/regenerate: Add a few comments

(cherry picked from commit 13c691ffddb3eef81dc61589f8c1bba382c5a1f2)
Signed-off-by: Nicolas R <atoomic@cpan.org>
3 years agodevel/regenerate: Fix progess message typo
Karl Williamson [Tue, 25 Jun 2019 17:37:40 +0000 (11:37 -0600)]
devel/regenerate: Fix progess message typo

(cherry picked from commit 9b68795efa464fb125892c4c67a78bea1b57eb7f)
Signed-off-by: Nicolas R <atoomic@cpan.org>
3 years agodevel/devtools.pl: 'use warnings'
Karl Williamson [Thu, 1 Aug 2019 15:49:01 +0000 (09:49 -0600)]
devel/devtools.pl: 'use warnings'

(cherry picked from commit 2844f84fbd42bd3f5111503e22c4ec60fd87bcd7)
Signed-off-by: Nicolas R <atoomic@cpan.org>
3 years agodevel/devtools.pl: Print out perls in this run if debug
Karl Williamson [Wed, 10 Jul 2019 23:33:56 +0000 (17:33 -0600)]
devel/devtools.pl: Print out perls in this run if debug

(cherry picked from commit 2514f0d3f4ea2ce02304660effec31b9e17c079c)
Signed-off-by: Nicolas R <atoomic@cpan.org>
3 years agodevel/devtools.pl: Add debugging info
Karl Williamson [Mon, 15 Jul 2019 21:33:04 +0000 (15:33 -0600)]
devel/devtools.pl: Add debugging info

This is triggered by either an error or verbose debugging options

(cherry picked from commit ff6dd7ca2b7c06a784c21af4d7e940268c30395a)
Signed-off-by: Nicolas R <atoomic@cpan.org>
3 years agoAdd --debug option
Karl Williamson [Wed, 10 Jul 2019 23:32:37 +0000 (17:32 -0600)]
Add --debug option

This option already existed in an inner script, but you couldn't specify
it from an outer one, which would be the typical way that got called.

(cherry picked from commit aefd7c471b5018d9f65cdb44559f743b56580405)
Signed-off-by: Nicolas R <atoomic@cpan.org>
3 years agodevel/devtools.pl: Comments
Karl Williamson [Mon, 15 Jul 2019 23:25:08 +0000 (17:25 -0600)]
devel/devtools.pl: Comments

(cherry picked from commit 9c0820c499f22640bd6bef34d4b82161fd86d203)
Signed-off-by: Nicolas R <atoomic@cpan.org>
3 years agodevel/mktodo: Add option to speed up debugging
Karl Williamson [Sat, 20 Jul 2019 22:55:57 +0000 (16:55 -0600)]
devel/mktodo: Add option to speed up debugging

'debug-start=' allows the caller to skip all releases above the one
specified, so that you don't have to go through them all again just to
get to one thats failing.  (The order things are done is descending.)

devel/regenerate is also made to recognize this parameter and pass it
along.

(cherry picked from commit 52bf4fc971becb876364b7e634530f383f88bb1c)
Signed-off-by: Nicolas R <atoomic@cpan.org>
3 years agodevel/devtools.pl: Add an element to a hash
Karl Williamson [Sat, 20 Jul 2019 23:47:22 +0000 (17:47 -0600)]
devel/devtools.pl: Add an element to a hash

which is an integer, and use that to sort on.  This turns out to be the
file name of the key in the proper parts/base,todo directory, but for
the moment is not used except in this function

(cherry picked from commit 907e18f8e5a8dea9054da01a6d18c8bac70603d1)
Signed-off-by: Nicolas R <atoomic@cpan.org>
3 years agodevel/devtools.pl: Standardize input version number
Karl Williamson [Sat, 20 Jul 2019 23:48:59 +0000 (17:48 -0600)]
devel/devtools.pl: Standardize input version number

Instead of having the user have to know the exact syntax, this will take
any of several possibilities and format it to a standard value.

(cherry picked from commit 654cbcc5ab3d26fe42339ab2d0df8857b742c70c)
Signed-off-by: Nicolas R <atoomic@cpan.org>
3 years agodevel/scanprov: Use library fcn to find perl versions
Karl Williamson [Sun, 28 Jul 2019 16:10:44 +0000 (10:10 -0600)]
devel/scanprov: Use library fcn to find perl versions

(cherry picked from commit bda70fe0831788bc0acd0f681d72340bbf8a40de)
Signed-off-by: Nicolas R <atoomic@cpan.org>
3 years agodevel/scanprov: Rename variable to be more mnemonic
Karl Williamson [Sun, 28 Jul 2019 15:51:46 +0000 (09:51 -0600)]
devel/scanprov: Rename variable to be more mnemonic

(cherry picked from commit 157a5aebaba3103015fb49b167941c5158554965)
Signed-off-by: Nicolas R <atoomic@cpan.org>
3 years agodevel/scanprov: Comments, white-space
Karl Williamson [Sun, 28 Jul 2019 15:48:56 +0000 (09:48 -0600)]
devel/scanprov: Comments, white-space

(cherry picked from commit 76db8504124b170fdeda965d724a830eba465bc5)
Signed-off-by: Nicolas R <atoomic@cpan.org>
3 years agoMove finding perl versions from mktodo to devtools.pl
Karl Williamson [Sat, 20 Jul 2019 22:55:37 +0000 (16:55 -0600)]
Move finding perl versions from mktodo to devtools.pl

This is in preparation for this calculation to be done from a second
place.

(cherry picked from commit 0cca64a344d7e677ed62e307aa8183fecb63f5ea)
Signed-off-by: Nicolas R <atoomic@cpan.org>
3 years agodevel/mktodo.pl: Stop using a known bad API element
Karl Williamson [Sat, 24 Aug 2019 21:05:05 +0000 (15:05 -0600)]
devel/mktodo.pl: Stop using a known bad API element

This was a bug which led to some unpredicatble results due to hash key
randomization.  We determined that a function or macro is not suitable
for a given release, but then forget that fact, and try to use it
anyway.

This single line change fixed a bunch of problems.  As I understand, you
couldn't regenerate on newer perls, and still may have had to try
multiple times for success.  I believe this is because of the hash key
randomization in v5.18.  I sort of understand how that could cause this
kind of issue, but I can't explain it easily, and its gone now anyway.

(cherry picked from commit 63d92fe04f63baa649f33ce9d751a6f5d58b3ce6)
Signed-off-by: Nicolas R <atoomic@cpan.org>
3 years agodevel/mktodo.pl: Put hash lookups in variables
Karl Williamson [Sat, 24 Aug 2019 21:03:20 +0000 (15:03 -0600)]
devel/mktodo.pl: Put hash lookups in variables

Looked up once, and easier to read.

(cherry picked from commit 04d3d1b8c41271de1940e81ae3a516e229e2e434)
Signed-off-by: Nicolas R <atoomic@cpan.org>
3 years agodevel/mktodo.pl: Explicitly close file
Karl Williamson [Mon, 15 Jul 2019 19:16:54 +0000 (13:16 -0600)]
devel/mktodo.pl: Explicitly close file

I'm not sure if it was always getting closed or not.

(cherry picked from commit b173ed3c45da4be559e3c5da128a9fcb9b95f27c)
Signed-off-by: Nicolas R <atoomic@cpan.org>
3 years agodevel/mktodo.pl: Add some comments
Karl Williamson [Tue, 2 Jul 2019 16:58:44 +0000 (10:58 -0600)]
devel/mktodo.pl: Add some comments

(cherry picked from commit 99f5969f6583102fb7bcf1f28e18b91324f208b7)
Signed-off-by: Nicolas R <atoomic@cpan.org>
3 years agodevel/mktodo.pl: Reorder else clauses
Karl Williamson [Mon, 15 Jul 2019 20:25:58 +0000 (14:25 -0600)]
devel/mktodo.pl: Reorder else clauses

This makes the trivial (short) case first, so it's easier to read

(cherry picked from commit 9f3102880cda991067d28d7f59759bc4005f886a)
Signed-off-by: Nicolas R <atoomic@cpan.org>
3 years agodevel/mktodo.pl: Move invariant expression out of loop
Karl Williamson [Thu, 11 Jul 2019 04:22:07 +0000 (22:22 -0600)]
devel/mktodo.pl: Move invariant expression out of loop

(cherry picked from commit a513fe6f824d69d855753d04893a94692433a718)
Signed-off-by: Nicolas R <atoomic@cpan.org>
3 years agodevel/mktodo.pl: Add ability to dump generated file
Karl Williamson [Tue, 2 Jul 2019 17:08:56 +0000 (11:08 -0600)]
devel/mktodo.pl: Add ability to dump generated file

For use in debugging

(cherry picked from commit 7dd1ddf8118d5e9d622609d393be81055d5156b9)
Signed-off-by: Nicolas R <atoomic@cpan.org>
3 years agodevel/mktodo.pl: Add comments, dump stderr if error
Karl Williamson [Sat, 29 Jun 2019 06:32:21 +0000 (00:32 -0600)]
devel/mktodo.pl: Add comments, dump stderr if error

These are some rudimentary comments.  It started working before I had to
delve deeper.

(cherry picked from commit a70e4aafcde7761301e62b6f630d11da5788c61f)
Signed-off-by: Nicolas R <atoomic@cpan.org>
3 years agodevel/mktodo.pl: Rename some variables
Karl Williamson [Sat, 13 Jul 2019 19:06:29 +0000 (13:06 -0600)]
devel/mktodo.pl: Rename some variables

These were confusingly named.

(cherry picked from commit 269a0070e5633ab951c216bb706aef1250c22af5)
Signed-off-by: Nicolas R <atoomic@cpan.org>