This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Yves Orton [Sun, 23 Apr 2023 16:23:56 +0000 (18:23 +0200)]
INSTALL - document how to build a perl without taint support
Given this is a build option it is odd we have not mentioned
this in INSTALL. I know that Steffen didnt want this to be seen
as a "supported build mode" when it was introduced, but I think
its about time we documented it properly.
Yves Orton [Sun, 23 Apr 2023 16:00:16 +0000 (18:00 +0200)]
configpm - Add comments prefixes to here docs
This separates out the code and content that is injected into one
of the lib/Config.* files, from the code that is part of configpm
itself. In particular this makes sure that nothing thinks that this
file contains usable POD.
Fixes https://github.com/Perl/perl5/issues/21045
Elvin Aslanov [Sun, 30 Apr 2023 00:37:14 +0000 (00:37 +0000)]
Remove duplicate "the" in comments
Fix spelling on various files pertaining to core Perl.
Elvin Aslanov [Wed, 19 Apr 2023 13:17:19 +0000 (15:17 +0200)]
Add MS Build Tools links
Add new section on Microsoft Build Tools, improve formatting.
MSBT provides CLI compiler and other related tools (without the overhead of the Visual Studio IDE) to compile programs on Windows.
Karl Williamson [Wed, 26 Apr 2023 21:36:54 +0000 (15:36 -0600)]
perlapi: Fix strftime inaccuracies, clarify
The deficiency mention removed by this commit was fixed earlier, but the
documentation did not get updated.
Karl Williamson [Mon, 1 May 2023 13:22:10 +0000 (07:22 -0600)]
autodoc.pl: strftime format functions can use short names
It was saying you had to use the Perl_foo(aTHX_ ...) form, which isn't
true.
積丹尼 Dan Jacobson [Mon, 24 Apr 2023 07:46:24 +0000 (15:46 +0800)]
Still cleaning up Y2K residue
Else... you'll get something recognizable back last century (e.g., 99 for 1999) , but what currently (123) looks more like https://en.wikipedia.org/wiki/Republic_of_China_calendar (112) than anything anyone else on the planet would understand!
Also, my correction ensures the man page will still be correct after the year 9999!
Karl Williamson [Mon, 1 May 2023 02:32:03 +0000 (20:32 -0600)]
embed.fnc: Correct some comments
A strftime format is different from a printf one, and doesn't have the
constraints the latter has.
Karl Williamson [Mon, 1 May 2023 02:36:56 +0000 (20:36 -0600)]
Remove my_strftime8()
The comment from Tony Cook
https://github.com/Perl/perl5/issues/20373#issuecomment-
1524256091
made me realize that this function doesn't fully work. It was added as
public API earlier in the 5.37 series, but we don't want it making it
into a stable release. This commit renames it so that the original name
will no longer work, but POSIX.xs can still, by changing to use the new
name.name
Karen Etheridge [Thu, 27 Apr 2023 16:16:02 +0000 (18:16 +0200)]
add a mention of smartmatch being deprecated
H.Merijn Brand [Sun, 30 Apr 2023 08:55:57 +0000 (10:55 +0200)]
Default i_sysyscall to undef
H.Merijn Brand [Sun, 30 Apr 2023 08:06:18 +0000 (10:06 +0200)]
Now that I_SYS_SYSCALL is defined, use it
Yves Orton [Fri, 11 Mar 2022 08:35:00 +0000 (09:35 +0100)]
replace "define\t" with "define " in most "normal" core files.
The main exceptions being dist/, ext/, and Configure related
files, which will be updated in a subsequent commit. Files in the cpan/
directory are also omitted as they are not owned by the core.
'#define' has seven characters, so following it with a \t makes it look
like '#define ' when it is not, which then frustrates attempts to find
where a given define is. If you *know* then you do a
git grep -P 'define\s+WHATEVER'
but if don't or you forget, you can get very confused trying to find
where a given define is located. This fixes all such cases so they
actually are 'define WHATEVER' instead.
If this patch is getting in your way with blame analysis then view it
with the -w option to blame.
Yves Orton [Tue, 21 Feb 2023 14:50:33 +0000 (15:50 +0100)]
ext/SDBM_File/ - replace "define\t" with "define "
"#define\t" is annoying as it is it 8 spaces wide, so it looks like
"#define ", yet will not be found in a grep for "define foo" as the
space is actually a tab.
Yves Orton [Tue, 21 Feb 2023 14:50:11 +0000 (15:50 +0100)]
ext/File-Glob/ - replace "define\t" with "define "
"#define\t" is annoying as it is it 8 spaces wide, so it looks like
"#define ", yet will not be found in a grep for "define foo" as the
space is actually a tab.
Yves Orton [Sat, 12 Mar 2022 08:06:55 +0000 (09:06 +0100)]
dist/IO: replace "define\t" with "define "
This cleans up the defines in dist/IO/poll.h.
"#define\t" is annoying as it is it 8 spaces wide, so it looks like
"#define ", yet will not be found in a grep for "define foo" as the
space is actually a tab.
Yves Orton [Sat, 12 Mar 2022 07:51:15 +0000 (08:51 +0100)]
Replace "define\t" with "define " in Configure/metaconfig related files
This is broken out so it is easier for Tux to find and merge with
metaconfig.
View this patch with -w and you will see "no changes" except for
config_h.SH and Porting/config_h.pl both which needed to be changed to
ensure that they produce output that doesn't replicate the problem.
H.Merijn Brand [Fri, 28 Apr 2023 15:47:54 +0000 (17:47 +0200)]
Add sys/syscall.h probe
H.Merijn Brand [Fri, 28 Apr 2023 15:47:07 +0000 (17:47 +0200)]
Add a verbose option
H.Merijn Brand [Fri, 28 Apr 2023 12:50:10 +0000 (14:50 +0200)]
Whitespace consistency from Configure end
H.Merijn Brand [Fri, 28 Apr 2023 07:09:55 +0000 (09:09 +0200)]
ask the compiler to find libquadmath
Currently this requires special handling on Linux and is broken
on Cygwin, since the compiler internal library directories
aren't in the normal search path.
Rather than searching ourselves, let the compiler do it, and check
it's vaguely functional.
H.Merijn Brand [Thu, 27 Apr 2023 12:01:53 +0000 (14:01 +0200)]
Manually re-order to simplify oncoming quadmath change
H.Merijn Brand [Thu, 27 Apr 2023 09:52:46 +0000 (11:52 +0200)]
Regen Configure after backports
Steve Hay [Sun, 23 Apr 2023 15:53:14 +0000 (16:53 +0100)]
Import perl5361delta.pod
Steve Hay [Sun, 23 Apr 2023 15:49:36 +0000 (16:49 +0100)]
Update Module-CoreList with data for 5.36.1
Steve Hay [Sun, 23 Apr 2023 15:32:29 +0000 (16:32 +0100)]
Tick off release
Steve Hay [Sun, 23 Apr 2023 15:29:52 +0000 (16:29 +0100)]
Add epigraph for 5.36.1
Steve Hay [Sun, 23 Apr 2023 14:11:38 +0000 (15:11 +0100)]
5.36.1 today
Steve Hay [Thu, 20 Apr 2023 19:45:25 +0000 (20:45 +0100)]
Prepare Module-CoreList for 5.37.12
Steve Hay [Thu, 20 Apr 2023 19:35:47 +0000 (20:35 +0100)]
Bump version for 5.37.12
Steve Hay [Thu, 20 Apr 2023 19:25:16 +0000 (20:25 +0100)]
New perldelta for 5.37.12
Steve Hay [Thu, 20 Apr 2023 19:17:54 +0000 (20:17 +0100)]
Tick off release
Steve Hay [Thu, 20 Apr 2023 19:14:24 +0000 (20:14 +0100)]
Add epigraph for 5.37.11
Steve Hay [Thu, 20 Apr 2023 17:32:53 +0000 (18:32 +0100)]
5.37.11 today
Steve Hay [Thu, 20 Apr 2023 17:30:11 +0000 (18:30 +0100)]
Finalize perldelta
Steve Hay [Thu, 20 Apr 2023 17:22:13 +0000 (18:22 +0100)]
Update Module::CoreList for 5.37.11
Steve Hay [Thu, 20 Apr 2023 17:20:58 +0000 (18:20 +0100)]
Module::CoreList - complete post-5.37.10 preparation for 5.37.11
Steve Hay [Wed, 19 Apr 2023 19:40:18 +0000 (20:40 +0100)]
perldelta - Update modules
Steve Hay [Wed, 19 Apr 2023 19:34:44 +0000 (20:34 +0100)]
perldelta - Remove boilerplate
Steve Hay [Wed, 19 Apr 2023 19:23:55 +0000 (20:23 +0100)]
Update perldelta
Steve Hay [Wed, 19 Apr 2023 19:20:53 +0000 (20:20 +0100)]
Porting/Maintainers.pl - Tidy up CUSTOMIZED files
Tomasz Konojacki [Wed, 19 Apr 2023 02:34:10 +0000 (04:34 +0200)]
regen/embed.pl: don't hide mathoms
makedef.pl exports them unconditionally and embed.pl should use the same
logic.
Karl Williamson [Tue, 18 Apr 2023 03:34:51 +0000 (21:34 -0600)]
perldelta: Mention support for LC_NAME
Karl Williamson [Wed, 5 Apr 2023 18:26:26 +0000 (12:26 -0600)]
PERL_SET_LOCALE_CONTEXT: Actually do something
This is a macro that does a quick check before calling a function to
actually do the work. The sense of that check was reversed.
The check is repeated in the function, but this time correctly.
The bottom line was if the function should be called, the macro failed
to call it. If it shouldn't be called the macro would call it, but the
check in the function caused it to return without doing anything. Hence
this whole thing was a no-op.
However, I cant get things to fail without this patch. ISTR this was
the result of a BBC, with another one likely affected, but I can't find
them now.
Craig A. Berry [Sun, 16 Apr 2023 13:12:51 +0000 (08:12 -0500)]
t/harness: avoid brace expansion
Brace expansion is not available in a POSIX shell, is handled
slightly differently by the shells that do support it, and is
unlikely to work when the underlying implementation for Perl's
glob() function is not a Unix shell. So instead of doing:
{foo,bar,baz}/*.t
just accumulate the results of simpler glob operations:
foo/*.t
bar/*.t
baz/*.t
This also allows us to dispense with the recursive function
_extract_tests() and its fancy dispatch based on reference type;
we would only ever be calling it with a simple string argument,
so we might as well just call glob() directly.
Sevan Janiyan [Sat, 15 Apr 2023 16:02:42 +0000 (17:02 +0100)]
.gitignore: Ignore file backups
Generated by patch(1) when applying diffs to the tree
Steve Hay [Sun, 16 Apr 2023 15:44:33 +0000 (16:44 +0100)]
Porting/epigraphs - Add epigraph for 5.36.1-RC3
Steve Hay [Sun, 16 Apr 2023 14:30:14 +0000 (15:30 +0100)]
5.36.1-RC3 today
Karl Williamson [Fri, 7 Apr 2023 15:38:42 +0000 (09:38 -0600)]
locale.c: Update comment
This comment did not reflect what is actually now happening.
Karl Williamson [Fri, 7 Apr 2023 01:23:58 +0000 (19:23 -0600)]
locale.c: Update comment
THe documentation for my_strftime was moved to locale.c earlier in 5.37.
This comment should have been updated then.
Craig A. Berry [Sat, 15 Apr 2023 17:01:07 +0000 (12:01 -0500)]
t/TEST: trim .DIR extension on VMS
Otherwise the test suite dies with:
Can't read op/hook.DIR/require.t.
The problem never arose until
93f6f9654a81b66c4 added another
directory one level down from those immediately under t/.
Craig A. Berry [Sun, 26 Mar 2023 01:26:54 +0000 (20:26 -0500)]
Exclude get_context on non-win32 in makedef.pl
Otherwise we'll try (and fail) to make a global symbol for a
static inline function.
Craig A. Berry [Sat, 8 Apr 2023 15:15:55 +0000 (10:15 -0500)]
.PHONY not portable in dist/Locale-Maketext/Makefile.PL
It breaks the build on VMS because .PHONY is a syntax error in
the native make-like utilities. It probably also breaks nmake
builds on Windows.
The solution here is to exclude the .PHONY directive unless running
under gmake or bsdmake.
Karl Williamson [Thu, 13 Apr 2023 15:40:32 +0000 (09:40 -0600)]
Devel::PPPort: Fix broken pod link
ppport.h is pod, but the link to it, removed by this commit, is broken,
resulting in a 404 "Raptor not found" from
https://perldoc.perl.org/Devel::PPPort#SEE-ALSO
This commit changes the mention of the file from a link to a F<>.
Dan Book [Wed, 12 Apr 2023 02:21:10 +0000 (22:21 -0400)]
perl5376delta - Remove erroneous hyphen (fixes #21014)
Steve Hay [Tue, 11 Apr 2023 19:58:41 +0000 (20:58 +0100)]
Porting/epigraphs - Add epigraph for 5.36.1-RC2
Steve Hay [Tue, 11 Apr 2023 19:02:57 +0000 (20:02 +0100)]
5.36.1-RC2 today
Steve Hay [Mon, 10 Apr 2023 20:24:50 +0000 (21:24 +0100)]
Porting/epigraphs - Add epigraph for 5.36.1-RC1
Steve Hay [Mon, 10 Apr 2023 19:00:31 +0000 (20:00 +0100)]
5.36.1-RC1 today
Steve Hay [Mon, 10 Apr 2023 18:47:59 +0000 (19:47 +0100)]
perlhist - Minor fix to list of pumpkin keepers
Steve Hay [Mon, 10 Apr 2023 11:33:16 +0000 (12:33 +0100)]
Expand a few recent links in epigraphs.pod
Steve Hay [Sun, 9 Apr 2023 19:34:22 +0000 (20:34 +0100)]
Fill in release schedule up to 5.38.0
(including a 5.36.1, currently aiming for 23 April)
Yves Orton [Tue, 28 Mar 2023 19:57:22 +0000 (21:57 +0200)]
regen/HeaderParser.pm - improved expression formatting and wrapping
Karl complained about some of the wrapping logic we use for expressions.
This tweaks the rules in a number of different ways in an attempt to
produce more legible expressions. For instance if we have a complex
expression with different parenthesized sub expressions, then try to put
each sub expression on its own line. A previous patch ensures that we
put shorter sub expressions first, and this patch builds on that to put
each sub expression on its own line.
We also use different logic to wrap the expressions, with the end result
that each line should have the same number of defined() operations on it
(with the exception of the last). We also try harder to line up
logical operators and defined() functions.
Yves Orton [Tue, 28 Mar 2023 13:36:31 +0000 (15:36 +0200)]
regen/HeaderParser.pm - remove comments from elif/else/endif when the contents is short
it is a bit "noisy" to have comments that duplication the conditions
when the original line with the condition is visible on the screen at
the same time. this patch changes the rules so we only add these comments
when the clause is 10 lines or more from its prior
Yves Orton [Tue, 28 Mar 2023 13:32:52 +0000 (15:32 +0200)]
embed.fnc - remove incorrect comment
which in turn allows the nested if clauses to be merged
Yves Orton [Tue, 28 Mar 2023 12:38:01 +0000 (14:38 +0200)]
regen/HeaderParser.pm - with multi-term expressions put least first
if we have defined(X) && (defined(Y) || defined(Z)) put the defined(X)
first because it has less operations in it.
Karl Williamson [Tue, 28 Mar 2023 02:25:35 +0000 (20:25 -0600)]
threads.xs: Set non thread context in ithread_set()
This generally was getting set anyway, but a test yet to be committed
found a case where it wasn't.
Yves Orton [Fri, 31 Mar 2023 19:29:02 +0000 (21:29 +0200)]
workflows/testsuite.yaml - Add testing of -DNO_TAINT_SUPPORT
Test that we can pass test with -DNO_TAINT_SUPPORT but without
-DSILENT_NO_TAINT_SUPPORT. Both disable taint mode, but the latter
causes -t and -T to be silently ignored, whereas the former by itself
causes use of -t and -T to throw fatal exceptions during process
startup.
Yves Orton [Fri, 31 Mar 2023 11:22:15 +0000 (13:22 +0200)]
test infra - Under -DNO_TAINT_SUPPORT skip tests that use -T or -t
This patch uses a collection of heuristics to skip test files which
would die on a perl compiled with -DNO_TAINT_SUPPORT but without
-DSILENT_NO_TAINT_SUPPORT.
-DNO_TAINT_SUPPORT disables taint support in a "safe" way, such that if
you try to use taint mode with the -t or -T options an exception will be
thrown informing you that the perl you are using does not support taint.
(The related setting -DSILENT_NO_TAINT_SUPPORT disables taint support
but causes the -t and -T options to be silently ignored.)
The error from using -t and -T is thrown very early in the process
startup and there is no way to "gracefully" handle it and convert it
into something else, for instance to skip a test file which contains it.
This patch generally fixes our code to skip these tests.
* Make t/TEST and t/harness check shebang lines and use filename checks
to filter out tests that use -t or -T. Primarily this is the result of
checking their shebang line, but some cpan/ files are excluded by
name, either from a very short list of exclusions, or because their
file name contains the word "taint". Non-cpan test files were fixed
individually as noted below.
* test.pl - make run_multiple_progs() skip test cases based on the
switches that are part of the test definition. This function is
used in a great deal of our internal tests, so it fixes a lot of
tests in one go.
* XS-APITest/t/call.t, t/run/switchDX.t, lib/B/Deparse.t - Skip a small
set of tests in each file.
David Cantrell [Sat, 25 Mar 2023 22:46:01 +0000 (22:46 +0000)]
workflows/testsuite.yml - Automatically test without taint support
Add an entry for -DSILENT_NO_TAINT_SUPPORT to our linux based test
matrix. Currently we cannot do the same for plain -DNO_TAINT_SUPPORT
as it chokes on -t and -T on the command line.
[Committers note: edited commit message to add detail]
Yves Orton [Wed, 29 Mar 2023 09:51:05 +0000 (11:51 +0200)]
Config.pm - add taint_disabled and taint_support to %Config
This adds 'taint_disabled' and 'taint_support' to Config.pm and %Config.
This way people can use them while we decide what to do about the
changes to Configure. We shouldn't need to have Configure changed to
export status variables like this in Config.pm
See: https://github.com/Perl-Toolchain-Gang/Test-Harness/pull/118
and: https://github.com/Perl/perl5/pull/20972
for related work that is stalled because we have not decided what
to do about these variables.
Lukas Mai [Thu, 30 Mar 2023 00:42:40 +0000 (02:42 +0200)]
Deparse: fix scalar-proto sub calls without arguments
- fix (;$)
- remove infinite loops from check_proto()
- implement (+)
- fix (\@) and (\%)
Fixes GH #20989.
Lukas Mai [Fri, 31 Mar 2023 07:59:31 +0000 (09:59 +0200)]
perlretut: use a numbered list to format a numbered list
Manually messing around with Z<> and E<nbsp> just ends up looking weird
in some formatters. See for example
<https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1033649>.
Use POD's built-in support for numbered lists instead. (Also, add the
missing "." after some numbers in the first list.)
Fixes #20997.
Lukas Mai [Thu, 30 Mar 2023 17:17:56 +0000 (19:17 +0200)]
regexec.c: fix warning about unused argument to capture_clear
Previously:
regexec.c: In function ‘S_capture_clear’:
regexec.c:373:72: warning: unused parameter ‘str’ [-Wunused-parameter]
373 | S_capture_clear(pTHX_ regexp *rex, U16 from_ix, U16 to_ix, const char *str comma_pDEPTH) {
| ~~~~~~~~~~~~^~~
Karl Williamson [Mon, 27 Mar 2023 23:57:02 +0000 (17:57 -0600)]
locale.c: Don't use bit-wise 'or' when bool is meant
This thinko was exposed by smoke tests using an uncommitted test.
PEBKAC
Leon Timmermans [Wed, 29 Mar 2023 15:13:07 +0000 (17:13 +0200)]
ParseXS: Correct colon translation of $type in OUTPUT section
The $type variable in typemaps is documented as in perlxstypemap as
"any : replaced with _", however currently it only does so in INPUT
sections. This will also make it do the same in OUTPUT sections.
Yves Orton [Wed, 29 Mar 2023 17:09:38 +0000 (19:09 +0200)]
t/porting/bincompat.t - test the code itself not just the output
Our checks on the define info we expose via Internals::V(), especially
the sorted part, did not really work properly as it only checked defines
that are actually exposed in our standard builds. Many of the defines
that are exposed in this list are special cases that would not be
enabled in a normal build we test under CI, and indeed prior to this
patch it was possible for us to produce unsorted output if certain
defines were enabled.
This patch adds checks that reads the actual code. It checks that the
define and the string are the same, and it checks that strings would be
output in sorted order assuming every define was enabled.
There are two historical exceptions where the string we show and the
define use internally are different, but we work around these two cases
with as special case hash.
Lukas Mai [Thu, 30 Mar 2023 07:21:54 +0000 (09:21 +0200)]
op.c: use consistent spacing around = and ,
... in the Module::Install::DSL hack. Also, move `{` up to the same line
as the controlling `if` for consistency with the rest of the file.
Lukas Mai [Wed, 29 Mar 2023 21:42:49 +0000 (23:42 +0200)]
op.c: remove unneeded variable
`is_module_install_hack` is a local variable in S_process_special_blocks
that is only used to silently treat INIT blocks (in package
Module::Install::DSL) as BEGIN blocks. But instead of setting the
variable and jumping before the `if` block that checks the variable, we
can just jump into the block and get rid of the variable.
Lukas Mai [Wed, 29 Mar 2023 21:28:46 +0000 (23:28 +0200)]
edit a comment in op.c that confused me
Philippe Bruhat (BooK) [Mon, 27 Mar 2023 23:10:01 +0000 (01:10 +0200)]
Perl RFC have been renamed to PPC
Scott Baker [Wed, 29 Mar 2023 16:12:45 +0000 (09:12 -0700)]
Fix some wording per @demerphq
Scott Baker [Thu, 9 Feb 2023 19:48:31 +0000 (11:48 -0800)]
Add docs for BEGIN, INIT, CHECK for pop()
Scott Baker [Thu, 9 Feb 2023 16:52:52 +0000 (08:52 -0800)]
Add a section about additional blocks
Scott Baker [Wed, 8 Feb 2023 22:52:59 +0000 (14:52 -0800)]
Update shift() docs with examples
Make wording consistent
Foobar
Scott Baker [Wed, 8 Feb 2023 22:39:02 +0000 (14:39 -0800)]
Update pop() docs with examples
Yves Orton [Sat, 25 Mar 2023 19:28:35 +0000 (20:28 +0100)]
dist/Net-Ping - remove HPUX from the exclusions list in 450_service.t
We pass these tests just fine on HPUX 11.31.
Yves Orton [Sat, 25 Mar 2023 19:26:19 +0000 (20:26 +0100)]
Porting/maintainers.pl - remove Net-Ping customized files
Net-Ping is in dist/ which means we are upstream, so there should
not be any customized files.
Yves Orton [Sat, 25 Mar 2023 13:20:03 +0000 (14:20 +0100)]
t/porting/globvar.t - fix for HPUX
On HPUX `nm globals.o` produces output like this (without the indent):
[5] | 2420| 2|OBJT |GLOB |0| .rodata|PL_Yes
So change the $define qr// to accommodate it.
We also have to TODO some of the tests, as HPUX seems to export
everything.
Yves Orton [Sat, 25 Mar 2023 12:18:10 +0000 (13:18 +0100)]
hints/hpux - only run d_strtold define override check on version < 11.23
I added a version check around the logic as the comment already says
that "In HP-UXes prior to 11.23 strtold() returned a HP-UX specific
union called long_double, not a C99 long double."
The logic did not check for the version mentioned in the comment, it
simply greped for something that is no longer present in the file:
grep 'double strtold.const' /usr/include/stdlib.h
outputs nothing on HPUX version B.11.31.
But
grep "double strtold" /usr/include/stdlib.h
outputs:
extern long_double strtold __((const char * __restrict, char ** __restrict));
extern long double strtold __((const char * __restrict, char ** __restrict));
on HPUX version B.11.31.
Yves Orton [Sat, 25 Mar 2023 11:37:01 +0000 (12:37 +0100)]
perl.c - show HAS_LONG_DOUBLE and HAS_STRTOLD as well as USE_LONG_DOUBLE
Makes it easier to debug long double issues.
Yves Orton [Thu, 23 Mar 2023 11:51:44 +0000 (12:51 +0100)]
threads-shared - use pure pragma version of CLANG_DIAG_IGNORE
Otherwise HPUX complains about unreachable statements.
"shared.xs", line 707: warning #2111-D: statement is unreachable
CLANG_DIAG_RESTORE_STMT;
^
This version should do the same thing, the only difference being
it doesnt allow a semicolon on the macro call.
Yves Orton [Thu, 23 Mar 2023 11:47:42 +0000 (12:47 +0100)]
dist/threads - use pure pragma form of CLANG_DIAG_IGNORE in threads.xs
Otherwise on HPUX we get warnings
"threads.xs", line 1057: warning #2111-D: statement is unreachable
CLANG_DIAG_IGNORE_STMT(-Wthread-safety);
Yves Orton [Thu, 23 Mar 2023 11:33:51 +0000 (12:33 +0100)]
intrpvar - ignore deprecated warning on MSVC as well
Yves Orton [Thu, 23 Mar 2023 11:28:37 +0000 (12:28 +0100)]
intrpvar.h - silence deprcation warning on HPUX
We were already silencing it on GCC, so lets add HPUX to the party.
Unfortunately I have not figured out a way to have a nice neat define
for it like we have for GCC or MSVC. :-(
Silences this:
"intrpvar.h", line 941: warning #3215-D: function "Perl_sv_nounlocking"
(declared at line 5934 of "proto.h") was declared deprecated
PERLVARI(I, unlockhook, share_proc_t, PERL_UNLOCK_HOOK)
^
We probably should add the same for MSVC as well.
Yves Orton [Thu, 23 Mar 2023 10:50:54 +0000 (11:50 +0100)]
util.c - avoid warning about truncated pointer value
This code is part of the fallback rng initialization, it should
only be used in odd circumstances, and it is intended to be "random"ish,
so the logic change should not be a problem.
This more or less reverts commit
4b4c4ab35e70f005167c863eae6d2003492c393c,
although the S_ptr_hash() now lives in util.c instead of hv.c.
Turns out having a decent pointer hash /is/ useful.
Yves Orton [Thu, 23 Mar 2023 10:42:56 +0000 (11:42 +0100)]
util.c - assign HS_GETXSVERLEN() to var before assert
This makes it easier to see the value with gdb, and also avoids an
assignment in the if condition body.
Yves Orton [Wed, 22 Mar 2023 19:17:49 +0000 (20:17 +0100)]
perlio.c - double cast PerlIO_lockcnt()
This avoids various warnings about alignment on HPUX.
Yves Orton [Wed, 22 Mar 2023 19:15:54 +0000 (20:15 +0100)]
Devel-PPPort - deal with signed klen in check_HeUTF8
Some of the HV logic uses a negative key length to indicate utf8
keys, and this logic was using an unsigned keylength, which obviously
does not work
Yves Orton [Wed, 22 Mar 2023 19:04:10 +0000 (20:04 +0100)]
numeric.c - change logical && to bitwise & in nantype test
This appears to have been broken since 2015, found by HPUX compiler warnings:
"numeric.c", line 927: warning #4277-D: logical AND with a constant, do you
mean to use '&'?
!(nantype && IS_NUMBER_IN_UV)) {