| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adds a new experimental warning, feature, keywords and enough parsing to
implement basic classes with an empty `new` constructor method.
Inject a $self lexical into method bodies; populate it with the object instance, suitably shifted
Creates a new OP_METHSTART opcode to perform method setup
Define an aux flag to remark which stashes are classes
Basic implementation of fields.
Basic anonymous methods.
|
|
|
|
|
|
|
|
| |
All of the other rename commands in win32/Makefile and win32/GNUmakefile
are guarded by a del statement. This does the equivalent for the
rename command that creates config.sh.
Fixes #20749.
|
| |
|
| |
|
| |
|
|
|
|
| |
Fixes #20533
|
|
|
|
|
|
|
|
|
|
|
|
| |
Windows, or at least NTFS, doesn't appear to follow symlinks
where the target contains the POSIX directory separator "/".
To fix that translate any / to \ in symlink targets. This may
break code that checks the symlink target macthes a value set,
but I think it's more likely to fix code that blindly uses /
than break code that looks at the symlink target they just set.
Fixes #20506
|
|
|
|
|
|
|
|
| |
This is reflected in the result of lstat() in perl.
This matches POSIX behaviour.
Fixed #20476
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In GH 20435 many typos in our C code were corrected. However, this pull
request was not applied to blead and developed merge conflicts. I
extracted diffs for the individual modified files and applied them with
'git apply', excepting four files where patch conflicts were reported.
Those files were:
handy.h
locale.c
regcomp.c
toke.c
We can handle these in a subsequent commit. Also, had to run these two
programs to keep 'make test_porting' happy:
$ ./perl -Ilib regen/uconfig_h.pl
$ ./perl -Ilib regen/regcomp.pl regnodes.h
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This splits a bunch of the subcomponents of the regex engine into
smaller files.
regcomp_debug.c
regcomp_internal.h
regcomp_invlist.c
regcomp_study.c
regcomp_trie.c
The only real change besides to the build machine to achieve the split
is to also adds some new defines which can be used in embed.fnc to control
exports without having to enumerate /every/ regex engine file. For
instance all of regcomp*.c defines PERL_IN_REGCOMP_ANY, and this is used
in embed.fnc to manage exports.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
These macros were defined in perl.h using preprocessor conditionals,
but determining wheter I32 is "int" or "long" is pretty hard with
preprocessor, when INTSIZE == LONGSIZE. The Configure script
should know exact underlying type of I32, so it should be able to
determine whether %d or %ld shall be used to format I32 value
more robustly.
Various pre-configured files, such as uconfig.h, are updated to
align with this.
|
|
|
|
|
|
|
| |
Win32 has had TEST_SWITCHES and TEST_FILES for ages. Unix has
TEST_ARGS. This extends Win32 to support TEST_ARGS as well. I
havent made the contrary change to the unix code, anyone using
TEST_SWITCHES is already using it on Win32.
|
|
|
|
|
|
|
|
|
|
| |
While debugging socket stat()ing I noticed that sometimes the
name returned by win32_readlink() was a full pathname rather than
the name that the link was created as.
Changing this to use the PrintName values changed win32_readlink()
to return the create as name, which seems closer to the POSIX
readlink.
|
|
|
|
|
|
|
|
|
|
| |
Unfortunately both symbolic links and sockets can only be
"statted" by opening with FILE_FLAG_OPEN_REPARSE_POINT which
obviously doesn't follow symbolic links.
So to find if a chain of symbolic links points to a socket,
is a broken chain, or loops, we need to follow the chain
ourselves.
|
| |
|
| |
|
|
|
|
| |
These could have races.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When `config_sh.PL` failed then it created an empty '..\config.sh' file.
This is unwanted since if make is then re-run it detects a '..\config.sh'
file and skips the target which leads to completely different errors.
After adding a `die "Foobar";` in win32/config_sh.PL:
$ gmake INST_TOP=... CCHOME=...
...
..\miniperl.exe -I..\lib config_sh.PL ... > ..\config.sh
Foobar at config_sh.PL line 5.
gmake: *** [GNUmakefile:1175: ..\config.sh] Error 255
Re-running the make command:
$ gmake INST_TOP=... CCHOME=...
..\miniperl.exe -I..\lib ..\configpm --chdir=..
Use of uninitialized value $t in string eq at ..\configpm line 345.
...
written lib/Config.pod
updated lib/Config.pm
updated lib/Config_heavy.pl
syntax error at lib/Config_heavy.pl line 165, near "x;"
Compilation failed in require at ..\configpm line 1144.
gmake: *** [GNUmakefile:1190: ..\lib\Config.pm] Error 255
When `gmake` was re-run it started with the '$(CONFIGPM)' target instead
of the '..\config.sh' target.
The fix: instead of creating '..\config.sh' it now first creates
'..\config.sh.tmp' and then renames[^1] it to '..\config.sh'
Tested the GNUmakefile on Windows 10 using GNU Make v4.2.1,
I did *not* test the Makefile (no nmake installed).
[^1]: `rename` on windows only takes a path in the first argument.
That is: `rename ..\config.sh.tmp config.sh` can be considered
the same as `move ..\config.sh.tmp ..\config.sh`.
|
|
|
|
| |
This reverts commit 64a9c780950becebc7326a31d067801ec9b187a2.
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes #20136.
Building on Windows 11 with the Strawberry 5.32.1 (gcc 8.3.0) toolchain,
multiple errors in the tests are seen. Worse, building on Windows 10
no test errors crop up, but the resulting perl will still crash and die
when run the tests manually on Windows 11.
Changing the optimization level to -Os as found in #20024, the build now
and tests now succeed.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When `INST_TOP` contains a trailing backslash then things go horribly wrong.
Example (output slightly altered for readability):
C:\...> gmake INST_TOP=C:\Perl\blead\perl\
...
..\miniperl.exe -I..\lib config_sh.PL
"INST_TOP=C:\Perl\blead\perl\"
"INST_VER="
"INST_ARCH="
"archname=MSWin32-x64-multi-thread"
"cc=gcc"
"ld=g++"
"ccflags= -DWIN32 -DWIN64 ...."
...
Use of uninitialized value $opt{"static_ext"} in split at config_sh.PL line 57.
...
Can't open -DWIN32: No such file or directory at config_sh.PL line 335.
...
..\miniperl.exe -I..\lib ..\configpm --chdir=..
Use of uninitialized value $t in string eq at ..\configpm line 345.
...
written lib/Config.pod
syntax error at lib/Config_heavy.pl line 165, near "x;"
Compilation failed in require at ..\configpm line 1144.
gmake: *** [GNUmakefile:1195: ..\lib\Config.pm] Error 255
-> The trailing backslash in 'INST_TOP' caused the double quote (in
`miniperl.exe config_sh.PL`) to be escaped which messes up the
rest of the arguments/the argument parsing leading to the errors.
Avoid the errors by removing the trailing backslash.
(Tested on Windows 10 with GNU Make v4.2.1)
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When building on Windows one must provide a value for 'CCHOME'.
The value of 'CCHOME' is used to set the value of 'CCLIBDIR' and 'CCINCDIR'.
(These eventually become `$Config{libpth}` and `$Config{incpath}`.)
When 'CCHOME' is incorrectly set the build mostly works; what fails
is building cpan/Win32 and this then fails with non-obvious errors such as:
Warning (mostly harmless): No library found for -luserenv
Warning (mostly harmless): No library found for -lwinhttp
...
g++ Win32.def -o ....
C:/.../ld.exe: ... undefined reference to `WinHttpCrackUrl'
...
collect2.exe: error: ld returned 1 exit status
gmake[1]: *** [Makefile:472: ..\..\lib\auto\Win32\Win32.dll] Error 1
gmake[1]: Leaving directory 'C:/Perl/perl5/cpan/Win32'
Unsuccessful make(cpan/Win32): code=512 at ..\make_ext.pl line 584.
Make this a bit more obvious by checking if the path(s) specified in
'CCLIBDIR' and 'CCINCDIR' actually exist.
If these do not exist then stop the build process at an early stage with
a clear(er) error.
Example error:
..\miniperl.exe -I..\lib config_sh.PL ...
'CCLIBDIR' contains the following non-existing paths:
C:\MinGW\lib
C:\MinGW\x86_64-w64-mingw32\lib
C:\MinGW\lib\gcc\x86_64-w64-mingw32\8.3.0
Did you provide a correct value for the 'CCHOME' option?
(This check can be skipped by using the SKIP_CCHOME_CHECK=1 option)
gmake: *** [GNUmakefile:1176: ..\config.sh] Error 1
Some notes:
- This check can be skipped/overridden by adding 'SKIP_CCHOME_CHECK=1'
on the make cmd line. (I added this because I don't know if there are
valid use cases for having a non-existing path in 'libpth'/'incpath')
- My first idea was to do this in the Makefile/GNUmakefile at a very early
stage but that is more complex to do and the resulting code is messy/ugly.
So instead I opted to do it in 'config_sh.PL' since this is the
first(/only) place that uses these vars.
- I (only) tested on Windows 10 using GNU Make and gcc
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The `$(CONFIGPM}` target depends on the 'lib/Config_git.pl' file which
is created by the '..\git_version.h' target (this runs `make_patchnum.pl`
which creates both files).
Build log when dependency is missing:
..\miniperl.exe -I..\lib ..\configpm --chdir=..
written lib/Config.pod
updated lib/Config.pm
updated lib/Config_heavy.pl
Warning: failed to load Config_git.pl, something strange about this perl...
..\miniperl.exe -I..\lib config_h.PL "ARCHPREFIX="
Running config_h.PL
Writing config.h
Warning: failed to load Config_git.pl, something strange about this perl...
config.h has changed
(....)
..\miniperl.exe -I..\lib ..\make_patchnum.pl
Updating 'git_version.h' and 'lib/Config_git.pl'
-> It first ran `configpm` and only later it ran `make_patchnum.pl`
Build log with the dependency:
..\miniperl.exe -I..\lib ..\make_patchnum.pl
Updating 'git_version.h' and 'lib/Config_git.pl'
(...)
..\miniperl.exe -I..\lib ..\configpm --chdir=..
written lib/Config.pod
updated lib/Config.pm
updated lib/Config_heavy.pl
..\miniperl.exe -I..\lib config_h.PL "ARCHPREFIX="
Running config_h.PL
Writing config.h
config.h has changed
Notes:
- in ./Makefile.SH the same dependency was added in
commit 744ac0eac539aead596d9fa09cc15a20b09a5884 (and later updated in
commit 0f13ebd5d71f81771c1044e2c89aff29b408bfec)
- in ./win32/Makefile the same dependency was added in
commit 680b2c5ee3b53c627074192b3cf14416a24da6ea (the dependency fix
however was not mentioned in the commit message)
|
|
|
|
|
|
|
| |
Conversion to local time seems unnecessary and it apparently causes
issues with DST.
Fixes #20018, #20061
|
| |
|
| |
|
|
|
|
| |
Add comment & refer to https://github.com/Perl/perl5/issues/19824
|
| |
|
|
|
|
|
| |
This attempted to change sv_inline.h, but those were clearly
wrong!
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* Create a new `peep.c` file
* Move the functions related to optree optimisation and finalisation
out of `op.c` into this new file
* Several previously-static functions now have to be non-static and
declared as internal API in order to be shared between these two
files.
|
|
|
|
|
|
|
|
| |
This allows us to enforce API boundaries and potentially enables
compiler optimisations.
We've been always hiding non-public symbols on Windows. This commit
brings that to the other platforms.
|
|
|
|
|
| |
As mentioned in https://lists.llvm.org/pipermail/llvm-dev/2015-July/088122.html
and https://github.com/llvm/llvm-project/issues/24625 building with clang-cl currently fails due to the declaration of __PL_nan_u.
By declaring it like this, cl and clang-cl are happy to parse it.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|