| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
This is just reading the environment, not changing it, so many readers
can be accessing it at the same time.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The "multiline" logic of diag.t was getting confused by define
statements that would define a symbol to call an error function but not
end in ";", this would then slurp potentially many lines errorenously,
potentially absorbing more than one message. The multi-line logic also
would undef $listed_as and lose the diag_listed_as data in some
circumstances.
Fixing those issues revealed some interesting cases. To fix one of them
I defined a new noop macro in perl.h to help: PERL_DIAG_WARN_SYNTAX(),
which helps the diag.t parser identify messages without needing to be
actually part of a specific message line. These macros are noops, they
just return their argument, but they help hint to diag.t what is going
on. Maybe in the future this can be reworked to be more generic, there
are other similar cases that are not covered.
Interestingly fixing this bug meant that at least one message that used
to be erroneously picked up was no longer identified or tested. This was
replaced with a PERL_DIAG_DIE_SYNTAX() wrapper.
|
|
|
|
| |
This reverts commit 64a9c780950becebc7326a31d067801ec9b187a2.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Now that C99 is required, bool is always defined, so HAS_BOOL should
also always be defined.
PERL_BOOL_AS_CHAR was used to workaround problems when no bool type
existed, so it is obsolete, and in fact perl won't compile if
PERL_BOOL_AS_CHAR is #defined. So remove it completely from being
looked at.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In Perl_my_pclose() the code as been calling av_fetch() with TRUE (lvalue;
create the SV if not found) since the Perl 4 -> Perl 5 migration. The
code *had* been assuming that the returned result was always a valid SvIV
until commit 25d9202327791097 in Jan 2001:
Safe fix for Simon's pclose() doing SvIVX of undef -> core bug.
which fixes the bug reported in
https://www.nntp.perl.org/group/perl.perl5.porters/2001/01/msg28651.html
That commit changed the code to default the IV result (the pid) to -1 if the
av_fetch() failed to return SVt_IV. However, that commit failed to notice
that the value -1 was *already* "in use" *only 4 lines later* as a flag for
OS/2 to indicate "Opened by popen."
Hence switch the OS/2 sentinel value to -2.
The that states that OS/2 has a my_pclose implementation in os2.c is wrong.
It was erroneously added by commit 5f05dabc4054964a in Dec 1996:
[inseparable changes from patch from perl5.003_11 to perl5.003_12]
It appears to be a copy-paste error from the previous comment added about
my_popen.
I tested this fix with the 2001-era code of commit 25d9202327791097 - it
(also) solves the bug reported back then.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
This just detabifies to get rid of the mixed tab/space indentation.
Applying consistent indentation and dealing with other tabs are another issue.
Done with `expand -i`.
* vutil.* left alone, it's part of version.
* Left regen managed files alone for now.
|
|
|
|
|
|
|
|
|
| |
For: https://github.com/Perl/perl5/pull/18201
Committer: Samanta Navarro is now a Perl author.
To keep 'make test_porting' happy: Increment $VERSION in several files.
Regenerate uconfig.h via './perl -Ilib regen/uconfig_h.pl'.
|
| |
|
| |
|
|
|
|
| |
which has added protections beyond plain getenv()
|
|
|
|
| |
Only THREAD_RET_TYPE is still used.
|
|
|
|
|
| |
This encapsulates a common paradigm, making sure that it is done
correctly for the platform's size.
|
|
|
|
|
| |
Mostly in comments and docs, but some in diagnostic messages and one
case of 'or die die'.
|
|
|
|
|
|
|
| |
This replaces strchr("list", c) calls throughout the core. They don't
work properly when 'c' is a NUL, returning the position of the
terminating NUL in "list" instead of failure. This could lead to
segfaults or even security issues.
|
|
|
|
|
| |
This moves calculations definitely to compile time; some optimizing
compilers may already do this, but some may not.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit 8e920bd341e241f50a74dbf8aa343319f204e200.
Also skip the tests in t/op/blocks.t
RT #132863
8e920bd341 sets the PERL_EXIT_DESTRUCT_END flag on non-UNIXy platforms,
like is already done on UNIXy platforms. This makes things like
BEGIN { exit(1) } call END blocks on those platforms (like they already
do on UNIX).
But it caused problems with win32 pseudo-forks, so revert for 5.28
and re-address the issues sometime later.
|
|
|
|
|
|
| |
The new tests in commit 503bc07b4b9e34ed04a725b2bc8faec1ae0f3be2
showed up platform differences in whether END blocks get run.
Set PERL_EXIT_DESTRUCT_END in all embeddings to make this consistent.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some platform-specific embeddings of perl were misusing the
return values from perl_parse() and perl_run(), in some cases
causing failure due to exit(0) combined with the recent changes
in commit 0301e899536a22752f40481d8a1d141b7a7dda82. Commit
d4a50999a5525c2681d59cae5fcd94f94ff897fd partially fixed a Windows
embedding. More fully fix that, along with NetWare and OS/2. Even in
embeddings with correct logic, stop using a variable named "exitstatus"
to hold the result of perl_parse() or perl_run(), to avoid misleading
people who copy the code.
|
|
|
|
|
|
|
|
|
|
| |
Bits of exec code were putting the constructed commands into globals
PL_Argv and PL_Cmd, which could then be clobbered by reentrancy.
These are only global in order to manage their freeing, but that's
better managed by using the scope stack. So replace them with automatic
variables, with ENTER/SAVEFREEPV/LEAVE to free the memory. Also copy
the strings acquired from SVs, to avoid magic clobbering the buffers of
SVs already read. Fixes [perl #129888].
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ExtUtils::ParseXS::Typemaps:
Just in documentation, but it’s good to change it, in case peo-
ple copy it.
Time::HiRes:
It doesn’t even use these typemap entries, but I changed it in case
they get used in the future. (The changes are not identical to the
default typemap, because Time::HiRes is 5.6-compatible, at least
nominally.)
os2/os2.c:
No, this is not a module, but I changed it, too.
Some other instances of newGVgen are already handled properly, or are
just in tests, so I left them alone.
|
|
|
|
|
|
|
|
|
|
| |
The original names are confusing.
See thread beginning with
http://nntp.perl.org/group/perl.perl5.porters/244335
The two macros are mapped into just that one, complementing the result
for the few cases where strNEs was used.
|
|
|
|
|
| |
These macros are defined as NOOP outside USE_ITHREADS, so there's no
point in guarding them with it.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
a3c8358c changed:
-#define dXSUB_SYS int dummy
+#define dXSUB_SYS
which made dXSUB_SYS into not-a-declaration, this apparently broke
something, since 8cc95fdb then went through all the definitions of
dXSUB_SYS, made each of them into not-a-declaration and then
ensured ExtUtilis::Miniperl emitted dXSUB_SYS in a place where it
didn't matter whether it was a declaration or a statement.
When these changes were made perl.h didn't have dNOOP, but now we
do, so we can make dXSUB_SYS a declaration again, as its name
implies.
Based on a patch originally created by Daniel Dragan (bulk88).
|
|
|
|
|
|
|
|
|
|
| |
Switch from two-argument form. Filehandle cloning is still done with the two
argument form for backward compatibility.
Committer: Get all porting tests to pass. Increment some $VERSIONs.
Run: ./perl -Ilib regen/mk_invlists.pl; ./perl -Ilib regen/regcharclass.pl
For: RT #130122
|
| |
|
|
|
|
|
| |
The dual-life dists affected use Devel::PPPort, so can safely use
sv_setpvs() even though it wasn't added until Perl v5.10.0.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There are a number of variables in the generated Makefile, such as
'obj' and 'minindt_obj', that enumerate various subsets of the object
files that need to be compiled and linked.
Rename and reorganise these vars slightly, to make the next commit
simpler. In particular it now splits the object files in into 3 sets:
common (av.o etc), those used just by miniperl (opmini.o etc)
and those used just by perl (op.o etc).
Should be no functional changes.
The changes to os2/Makefile.SHs have been done blind. Does anyone still
use OS2?
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The are a few places in Makefile.SH which do (approximately):
rm $libfile
ar rcu $libfile *.o
The 'u' in 'rcu' seems redundant since the old lib file is always deleted
just before being recreated; and more to the point, it generates warnings
on recent Linux builds:
/bin/ar: `u' modifier ignored since `D' is the default (see `U')
This is because the 'u' modifier updates the archive, i.e. only replaces
the objects which are newer in an existing archive. On my Linux system,
ar by default operates in 'deterministic' mode, which means that it
doesn't add timestamps etc (so that repeated builds will give identical
binaries). In this mode 'u' can't work, hence the warning.
So this commit just removes the 'u' flag.
|
|
|
|
|
| |
These are the last remaining uses outside the interwoven mess in
S_openn_cleanup, openn_setup, and their callers in doio.c.
|
|
|
|
| |
This fixes a bunch of them, but there are many more
|
| |
|
|
|
|
|
| |
The dual-life dists affected use Devel::PPPort, so can safely use
newSVpvs() even though it wasn't added until Perl v5.8.9.
|
|
|
|
|
|
| |
Calls to Perl_do_openn() all have at least 2 unused arguments which clutter
the code and hinder easy understanding. Perl_do_open6() and
Perl_do_open_raw() each only do one job, so don't have the dead arguments.
|
|
|
|
|
|
| |
av_tindex is a more clearly named synonym for av_len, available starting
in v5.18. This changes the core uses to it, including modules in /ext,
which are not dual-lifed.
|
|
|
|
|
| |
This was added in 5.5/5.6 as a backwards-compatibility measure
when taint was extended to happen in more places.
|
|
|
|
| |
Bump $VERSION for os2/OS2/OS2-Process/Process.pm.
|
|
|
|
|
| |
These were all uncovered by the new Pod::Checker, not yet in core.
Fixing these will speed up debugging the new Checker.
|
|
|
|
|
|
|
| |
This finishes the removal of register declarations started by
eb578fdb5569b91c28466a4d1939e381ff6ceaf4. It neglected the ones in
function parameter declarations, and didn't include things in dist, ext,
and lib, which this does include
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
By defining NO_TAINT_SUPPORT, all the various checks that perl does for
tainting become no-ops. It's not an entirely complete change: it doesn't
attempt to remove the taint-related interpreter variables, but instead
virtually eliminates access to it.
Why, you ask? Because it appears to speed up perl's run-time
significantly by avoiding various "are we running under taint" checks
and the like.
This change is not in a state to go into blead yet. The actual way I
implemented it might raise some (valid) objections. Basically, I
replaced all uses of the global taint variables (but not PL_taint_warn!)
with an extra layer of get/set macros (TAINT_get/TAINTING_get).
Furthermore, the change is not complete:
- PL_taint_warn would likely deserve the same treatment.
- Obviously, tests fail. We have tests for -t/-T
- Right now, I added a Perl warn() on startup when -t/-T are detected
but the perl was not compiled support it. It might be argued that it
should be silently ignored! Needs some thinking.
- Code quality concerns - needs review.
- Configure support required.
- Needs thinking: How does this tie in with CPAN XS modules that use
PL_taint and friends? It's easy to backport the new macros via PPPort,
but that doesn't magically change all code out there. Might be
harmless, though, because whenever you're running under
NO_TAINT_SUPPORT, any check of PL_taint/etc is going to come up false.
Thus, the only CPAN code that SHOULD be adversely affected is code
that changes taint state.
|
|
|
|
|
|
| |
Commit 78ed4cf4d6 undid the accidental effect of eb578fdb55 on OS2::REXX
but forgot to revert the accompanying VERSION bump, which is not otherwise
required since nothing else has changed.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This removes most register declarations in C code (and accompanying
documentation) in the Perl core. Retained are those in the ext
directory, Configure, and those that are associated with assembly
language.
See:
http://stackoverflow.com/questions/314994/whats-a-good-example-of-register-variable-usage-in-c
which says, in part:
There is no good example of register usage when using modern compilers
(read: last 10+ years) because it almost never does any good and can do
some bad. When you use register, you are telling the compiler "I know
how to optimize my code better than you do" which is almost never the
case. One of three things can happen when you use register:
The compiler ignores it, this is most likely. In this case the only
harm is that you cannot take the address of the variable in the
code.
The compiler honors your request and as a result the code runs slower.
The compiler honors your request and the code runs faster, this is the least likely scenario.
Even if one compiler produces better code when you use register, there
is no reason to believe another will do the same. If you have some
critical code that the compiler is not optimizing well enough your best
bet is probably to use assembler for that part anyway but of course do
the appropriate profiling to verify the generated code is really a
problem first.
|
|
|
|
|
| |
The subdirectory containing the port specific files was purged when 5.000
was released, but changes made to other files were not removed.
|
| |
|
| |
|
| |
|
|
|
|
| |
./perl -Ilib Porting/cmpVERSION.pl -xd . v5.13.8
|