summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* Add docs for BEGIN, INIT, CHECK for pop()Scott Baker2023-03-301-0/+3
|
* Add a section about additional blocksScott Baker2023-03-301-0/+3
|
* Update shift() docs with examplesScott Baker2023-03-301-8/+17
| | | | | | Make wording consistent Foobar
* Update pop() docs with examplesScott Baker2023-03-301-6/+15
|
* dist/Net-Ping - remove HPUX from the exclusions list in 450_service.tYves Orton2023-03-292-3/+3
| | | | We pass these tests just fine on HPUX 11.31.
* Porting/maintainers.pl - remove Net-Ping customized filesYves Orton2023-03-292-16/+0
| | | | | Net-Ping is in dist/ which means we are upstream, so there should not be any customized files.
* t/porting/globvar.t - fix for HPUXYves Orton2023-03-291-2/+6
| | | | | | | | | | | 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.
* hints/hpux - only run d_strtold define override check on version < 11.23Yves Orton2023-03-291-7/+9
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* perl.c - show HAS_LONG_DOUBLE and HAS_STRTOLD as well as USE_LONG_DOUBLEYves Orton2023-03-291-0/+6
| | | | Makes it easier to debug long double issues.
* threads-shared - use pure pragma version of CLANG_DIAG_IGNOREYves Orton2023-03-292-4/+4
| | | | | | | | | | | 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.
* dist/threads - use pure pragma form of CLANG_DIAG_IGNORE in threads.xsYves Orton2023-03-292-4/+4
| | | | | | | Otherwise on HPUX we get warnings "threads.xs", line 1057: warning #2111-D: statement is unreachable CLANG_DIAG_IGNORE_STMT(-Wthread-safety);
* intrpvar - ignore deprecated warning on MSVC as wellYves Orton2023-03-291-0/+2
|
* intrpvar.h - silence deprcation warning on HPUXYves Orton2023-03-291-0/+7
| | | | | | | | | | | | | | 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.
* util.c - avoid warning about truncated pointer valueYves Orton2023-03-294-1/+43
| | | | | | | | | | | 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.
* util.c - assign HS_GETXSVERLEN() to var before assertYves Orton2023-03-291-3/+3
| | | | | This makes it easier to see the value with gdb, and also avoids an assignment in the if condition body.
* perlio.c - double cast PerlIO_lockcnt()Yves Orton2023-03-291-1/+1
| | | | This avoids various warnings about alignment on HPUX.
* Devel-PPPort - deal with signed klen in check_HeUTF8Yves Orton2023-03-292-3/+3
| | | | | | 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
* numeric.c - change logical && to bitwise & in nantype testYves Orton2023-03-291-1/+1
| | | | | | | | 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)) {
* regcomp.c - eliminate assignment in while conditionYves Orton2023-03-291-23/+25
| | | | | | | This gives covertiy heartburn, and also makes the HPUX compiler whine. Reworking it so that it is a while 1 and the condition determines if we break out of the loop resolves the heartburn and makes for more readable code.
* ExtUtils-ParseXS - silence warnings about unreached code in generated XS codeYves Orton2023-03-297-6/+24
| | | | | | | | | | On HPUX we get a lot of: "APItest.c", line 4004: warning #2111-D: statement is unreachable: PUTBACK because people have used something like XSRETURN(1); and we generate code that does PUTBACK; return; Adding a pragma to silence it makes the builds happier;
* t/op/sprintf2 - TODO some failing tests for %g.Yves Orton2023-03-291-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | On HPUX none of the usual methods for doing high precision %g seem to work: Checking for an efficient way to convert floats to strings. Trying sprintf... sprintf() found. sprintf length mismatch: Expected 55, got 38 ...But sprintf didn't work as I expected. Trying gconvert... gconvert NOT found. Trying gcvt... gcvt() found. gcvt length mismatch: Expected 55, got 38 ...But gcvt didn't work as I expected. *** WHOA THERE!!! *** None of ( sprintf gconvert gcvt) seemed to work properly. I'll use sprintf. So we can safely TODO these tests for now. See: https://github.com/Perl/perl5/issues/20953#issuecomment-1478744988 and: https://github.com/Perl/perl5/issues/20953#issuecomment-1483814118 Fixes: #20953 And also some issues in: #20959
* Porting/cmpVERSION.pl - deal with old git clients better in tag date parsingYves Orton2023-03-291-2/+10
| | | | | | The HPUX box we smoke on does not have a modern git and chokes on taggerdate:unix, so we use taggerdata:iso8601 instead, and then parse the date with Time::Local.
* sv.c - don't cast SVTYPEMASK to svtype, use SvIS_FREED() instead.Yves Orton2023-03-293-7/+7
| | | | | | | svtype is an enum with 18 values. SVTYPEMASK is 31. A picky compiler (like on HPUX) will complain that casting 31 to a svtype is an error. We have SvIS_FREED() to do this properly anyway.
* regexec.c - mark the bottom of a sub as never reachedYves Orton2023-03-291-2/+1
| | | | | We used to have a return statement here that picky compilers would complain about.
* regcomp.c - simplify logic to eliminate unreached codeYves Orton2023-03-291-4/+1
| | | | | We always goto out of this if, so eliminate the unreached code and also eliminate the useless else block.
* pp_sys.c - suppress warning about comparison to unsigned valueYves Orton2023-03-291-0/+6
|
* op.c - deal with not-reached statement warningYves Orton2023-03-291-2/+1
| | | | | | | The return statement could never be reached as the while loop is while(1) and there is no break statement inside of it. This patch replaces the 'return arg;' with a NOT_REACHED; assertion, just in case someone does add a break later on without thinking.
* peep.c - ensure deferred_queue is initialized before useYves Orton2023-03-291-1/+1
| | | | | HPUX was warning that it can be used before it is initialized. There is no cost to nulling it out early so do so.
* regcomp.h - use a common union for head and args across all regnodes.Yves Orton2023-03-297-223/+176
| | | | | | | | | | | | This helps with HPUX builds where we need to ensure everything is aligned the same (on 32 bit boundaries). It also strongly encourages everything to use the accessor macros and not access the members directly. By using a union for the variadic fields we make it more obvious that some regops use the field in different ways. This patch also converts all the arg unions into a standardized union with standardized member names.
* regcomp.h - use different struct member names for U8 vs U32 str_lenYves Orton2023-03-291-6/+6
| | | | | | | It is confusing to have two different members, at different struct offsets and with different sizes, with the same name. So rename them so they have different names that include their size so it is obvious what is going on.
* perl.h - silence certain warnings on HPUX globally.Yves Orton2023-03-292-0/+17
| | | | | | | | | | | | | | | | | There are two warnings classes which account for a very large number of the warnings produced when building on HPUX Itanium. We know the cause of these warnings and we are ok with ignoring them. One set comes from our memory wrap checks, where we end up doing a comparison against constants in certain conditions. See the comments in handy.h line 2723 related to PERL_MALLOC_WRAP. The other set comes from our common "trick" of doing OO in C code with casting. This is the foundation of how we manage SV types and how we manage regular expression ops (regops). If this logic really was a problem then we would have lots of test failures and segfaults, and we do not, so we can silence them.
* locale.c: get_displayable_string: Check bad inputKarl Williamson2023-03-281-0/+4
| | | | Just refuse to go out of bounds on an empty string
* utf8.h: Add commentKarl Williamson2023-03-281-2/+2
|
* perlre: Fix grammarKarl Williamson2023-03-281-1/+1
| | | | In a list, only the final item has an 'and'
* t/harness - rework App::Prove::State setup to not warn and use customizable ↵Yves Orton2023-03-282-4/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | state file Currently we only store state if we are running parallel tests, so if you run the tests in series we do not store data on how long they took, and we can't use that information in a follow up parallel test run. We also do not allow the state file to be customized to be outside of the repo, so git clean -dfx wipes it. This means you can't keep your test data over time, which can be a bit annoying. We also currently construct the state object twice during setup, resulting in two (useless) warnings when the state file is missing, which also doubles the time to set up the tests because the yaml file gets read twice, and not very efficiently either. This patch changes the logic so that we initialize the state object only once during startup, and we use the state file if we are going to run tests, parallel or not, provided the user does not explicitly disable it (see below). The order that tests are run is affected only when the tests are run in parallel. It also allows the user to specify where the state file should live, with the $ENV{PERL_TEST_STATE_FILE} environment variable, which can be set to 0 or the empty string to disable use of the state file if needed. We also take care to silence the warning about an empty state file, except in the case where the user has overriden the file name with the $ENV{PERL_TEST_STATE_FILE}. Lastly this patch disables loading the state data /at all/, when the dump_tests option is invoked. There is no need nor point to load the state data when we are simply going to dump out the list of tests we will run.
* cpan/ExtUtils-MakeMaker - Update to version 7.70Yves Orton2023-03-2837-78/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7.70 Sun 26 Mar 14:13:20 BST 2023 No changes since v7.69_01 7.69_01 Sat 25 Mar 11:06:19 GMT 2023 Core reversions: - Reverted the PERL_CORE and PERL_SRC changes from v7.67_02 These will be reintroduced after more testing in core 7.68 Tue 14 Mar 21:38:00 GMT 2023 No changes since v7.67_02 7.67_02 Mon 6 Mar 10:53:22 GMT 2023 Core fixes: - initialize PERL_CORE object var early and use it consistently - only search for PERL_SRC when PERL_CORE is true or unset Clean-ups: - remove use vars from non-bundled modules - remove unused _find_magic_vstring function 7.67_01 Wed 1 Mar 12:38:00 GMT 2023 Bug fixes: - Treat MidnightBSD as a BSD - fix MIN_PERL_VERSION for perl versions with underscores Test fixes: - t/.../More.pm - remove isn't: apostrophe as a package sep is deprecated
* Porting/sync-with-cpan - pickup ExtUtils::MakeMaker changes betterYves Orton2023-03-281-3/+10
| | | | | | ExtUtils::MakeMaker makes heavy use of dev releases, so the most recent change entry does not contain much. This patch makes it so we read the full set of changes since the last change when doing an update.
* [doc] update description of $^H and %^H in perlvarLukas Mai2023-03-281-9/+8
| | | | | | | | | | - remove trailing spaces - add hyperlink to "caller" in perlfunc - add hyperlink to $^H in description of %^H - change "pointers to objects" to "references to objects" - change "semantic" to "semantics" - reword "useful for implementation of pragmas" as "useful for implementing pragmas"
* report uninit variable name even in optimized casesLukas Mai2023-03-242-1/+62
| | | | | | | | | | | | | | | | | | Several cases that used to be simple assignment ops with lexical variables have been optimized in some way: - $foo = undef is now a single OP_UNDEF with special flags - $foo = ... is now a single OP_PADSV_STORE - $foo[0] = ... is now a single OP_AELEMFASTLEX_STORE This is mostly transparent to users, except for "Use of uninitialized value" warnings, which previously mentioned the name of the undefined variable, but don't do so anymore in blead. This commit teaches find_uninit_var() about the new ops, so error messages for these ops can mention variable names again. Fixes #20945.
* [doc] clarify behavior of File::Copy::cp re: permissionsLukas Mai2023-03-241-4/+7
| | | | | | In particular, explain that "preserve permission bits like cp" means the default behavior of /bin/cp, not "cp -p" or "cp --preserve", so the umask still applies.
* don't set a special filetype for generated .gitignoreLukas Mai2023-03-242-10/+20
| | | | | | | Previously it would default to Perl, which happens to produce the right comment character ("#"), but results in nonsensical syntax highlighting. Now we set $lang to the special value 'None', which still produces read-only declarations, but doesn't force a mode/filetype on editors.
* fix incorrect vi filetype declarations in generated filesLukas Mai2023-03-2438-40/+40
| | | | | Vim's filetype declarations are case sensitive. The correct types for Perl, C, and Pod are perl, c, and pod, respectively.
* perlio.c: remove silly castsLukas Mai2023-03-231-14/+18
|
* perldelta for 51675517951Tony Cook2023-03-231-1/+3
|
* getsockopt: increase the buffer size for getsockopt()Tony Cook2023-03-231-3/+6
| | | | | | | | | | | | | | | | | | As suggested in the ticket, the buffer size is now 1024 by default, but this can be adjusted at perl build time with: -Accflags=-DPERL_GETSOCKOPT_SIZE=2048 or similarly with hints. I considered making this adjustable with a ${^...} variable, but that seemed excessive. I don't see a practical way to regression test this, TCP_INFO is non-portable. I did examine strace output for a one-liner that calls getsockopt() and the new buffer size was used. Fixes #19758
* perl.h - remove redundant /*EMPTY*/ commentYves Orton2023-03-221-1/+1
| | | | | | mauke: it was added by Andy Lester in 6f207bd3ddac24959aa7f00f2d7a66f116dcc7ed mauke: when he replaced '/*EMPTY*/;' statements by 'NOOP;' mauke: I would also remove the comment
* fix precedence issue with NOOPZefram2023-03-221-1/+1
| | | | Parens are required or precedence issues can occur.
* t/porting/test_testlist.t - test that we test the same thing with t/harness ↵Yves Orton2023-03-224-20/+154
| | | | | | | | | | and t/TEST Also that we test everything expected in MANIFEST. Also includes some fixups to t/TEST to deal with the fact that List/Util is not anymore the name of a distribution even though it is the name of an extension. Same for Cwd.
* t/TEST - rework poor mans getoptYves Orton2023-03-221-9/+24
| | | | Less cryptic and repetitive code.
* t/TEST - glob @ARGV after we setup @INC properly (win32 only)Yves Orton2023-03-221-5/+13
| | | | | | | | | | | | | | | | On win32 we glob the arguments passed into @ARGV. *However*, this was done in an unsafe way that could result in @ARGV being empty if 'lib' was not in @INC prior to execution. Also it was being done in an eval STRING to avoid loading File::Glob unnecessarily, but with no error checking of the eval. In fact this logic was firing much too early, before option parsing, and before @INC was set up properly. This patch moves this logic to much later, after any options are parsed out and after @INC is set up, which should reduce or eliminate the chance it dies. It also reworks the logic so that if the eval does die that the entire script dies as well.