Branch: refs/heads/smoke-me/tonyc/win32-symlink
  Home:   https://github.com/Perl/perl5
  Commit: aa2a66aabb5c87079033e4ce8849614f259bca7c
      
https://github.com/Perl/perl5/commit/aa2a66aabb5c87079033e4ce8849614f259bca7c
  Author: Tony Cook <[email protected]>
  Date:   2020-11-11 (Wed, 11 Nov 2020)

  Changed paths:
    M MANIFEST
    M dosish.h
    M t/op/stat.t
    A t/win32/stat.t
    M win32/config.gc
    M win32/config.vc
    M win32/config_H.gc
    M win32/config_H.vc
    M win32/perlhost.h
    M win32/win32.c
    M win32/win32.h
    M win32/win32iop.h

  Log Message:
  -----------
  Win32: add lstat(), fetch st_dev and st_ino and fetch st_nlink for fstat

We need lstat() for various modules to work well with symlinks,
and the same modules often want to check for matches on the device
and inode number.

The values we're using for st_ino match those that the Python and Rust
libraries use, and Go uses the same volume and file index values for
testing if two stat objects refer to the same file.

They aren't entirely unique, given ReFS uses 128-bit file ids, but
the API used to check for this (GetFileInformationByHandleEx() for
FileIdInfo) is only available on server operating systems, so I can't
directly test it anyway.


  Commit: a347351d4e2735c51b008e62d8195cb887bbd05f
      
https://github.com/Perl/perl5/commit/a347351d4e2735c51b008e62d8195cb887bbd05f
  Author: Tony Cook <[email protected]>
  Date:   2020-11-11 (Wed, 11 Nov 2020)

  Changed paths:
    M MANIFEST
    M iperlsys.h
    M pod/perlport.pod
    M pp_sys.c
    M t/op/stat.t
    A t/win32/symlink.t
    M win32/Makefile
    M win32/config.gc
    M win32/config.vc
    M win32/config_H.gc
    M win32/config_H.vc
    M win32/perlhost.h
    M win32/win32.c
    M win32/win32iop.h

  Log Message:
  -----------
  Win32: implement symlink() and readlink()

The API used requires Windows Vista or later.

The API itself requires either elevated privileges or a sufficiently
recent version of Windows 10 running in "Developer Mode", so some
tests require updates.


  Commit: e26d4127d5a7d3fd574d2d8babd3946b7ac99f75
      
https://github.com/Perl/perl5/commit/e26d4127d5a7d3fd574d2d8babd3946b7ac99f75
  Author: Tony Cook <[email protected]>
  Date:   2020-11-11 (Wed, 11 Nov 2020)

  Changed paths:
    M pod/perlport.pod
    M t/win32/stat.t
    M win32/win32.c

  Log Message:
  -----------
  Win32: implement our own stat(), and hence our own utime

This fixes at least two problems:

- unlike UCRT, the MSVCRT used for gcc builds has a bug converting
  a FILETIME in an unlike current DST state, returning a time
  offset by an hour.  Fixes GH #6080

- the MSVCRT apparently uses FindFirstFile() to fetch file
  information, but this doesn't follow symlinks(), so stat()
  ends up returning information about the symlink(), not the
  underlying file.  This isn't an issue with the UCRT which
  opens the file as this implementation does.

Currently this code calculates the time_t for st_*time, and the
other way for utime() using a simple multiplication and offset
between time_t and FILETIME values, but this may be incorrect
if leap seconds are enabled.

This code also requires Vista or later.

Some of this is based on code by Tomasz Konojacki (xenu).


  Commit: 9aab241793845ae31f473f84edaaca7f9440c8f5
      
https://github.com/Perl/perl5/commit/9aab241793845ae31f473f84edaaca7f9440c8f5
  Author: Tony Cook <[email protected]>
  Date:   2020-11-11 (Wed, 11 Nov 2020)

  Changed paths:
    M dist/PathTools/Cwd.xs
    M dist/PathTools/t/cwd.t

  Log Message:
  -----------
  PathTools: use PerlLIO_*() functions and chdir() on a symlink differences

Use PerlLIO_lstat() and PerlLIO_readlink() instead of directly calling
the POSIX names, so our Win32 overrides work.

For the test, unlike POSIX, changing directory via a symlink on Win32
appears to store the symlink as part of the current directory rather
so GetCurrentDirectory() fetches that rather than the hardlinked path.


  Commit: 38ae8aef960ab380d7a2ea2245b1dd8d496e813d
      
https://github.com/Perl/perl5/commit/38ae8aef960ab380d7a2ea2245b1dd8d496e813d
  Author: Tony Cook <[email protected]>
  Date:   2020-11-11 (Wed, 11 Nov 2020)

  Changed paths:
    M ext/File-Find/t/find.t

  Log Message:
  -----------
  File::Find find.t: switch to done_testing()


  Commit: 895100b0e0485fa74f0f9f20db53b168e672895e
      
https://github.com/Perl/perl5/commit/895100b0e0485fa74f0f9f20db53b168e672895e
  Author: Tony Cook <[email protected]>
  Date:   2020-11-11 (Wed, 11 Nov 2020)

  Changed paths:
    M ext/File-Find/lib/File/Find.pm
    M ext/File-Find/t/find.t
    M ext/File-Find/t/lib/Testing.pm
    M ext/File-Find/t/taint.t

  Log Message:
  -----------
  File::Find: support Win32 symlinks

find.t, taint.t: check that symlink() works under the current
permissions/filesystem rather than assuming it will work

find.t: since symlinks are now available, an earlier test block
set $FileFileTests_OK, and the tests in this Win32 block don't use
either of the follow options, which is required for fast file tests.

taint.t: ensure we get "/" separated names to match File::Find's output


  Commit: c887b66acff368a9b95c6797fbb64a10e948fbc1
      
https://github.com/Perl/perl5/commit/c887b66acff368a9b95c6797fbb64a10e948fbc1
  Author: Tony Cook <[email protected]>
  Date:   2020-11-11 (Wed, 11 Nov 2020)

  Changed paths:
    M lib/File/Copy.pm
    M lib/File/Copy.t

  Log Message:
  -----------
  File::Copy: support symlinks on Win32


  Commit: 9d970495262621d9ff2565aa49cbc5fd74893de0
      
https://github.com/Perl/perl5/commit/9d970495262621d9ff2565aa49cbc5fd74893de0
  Author: Tony Cook <[email protected]>
  Date:   2020-11-11 (Wed, 11 Nov 2020)

  Changed paths:
    M win32/win32.c

  Log Message:
  -----------
  Win32: re-work FILETIME <=> time_t conversions

Current versions of Windows claim to support leap seconds, but the
time conversion I was using ignores that possibility.

Switch to using APIs (FileTimeToSystemTime() and SystemTimeToFileTime())
that are documented to support leap seconds that might be included
in a FILETIME.


  Commit: 60de1413f274c35fcbfdf87e973cc6217c6bb50e
      
https://github.com/Perl/perl5/commit/60de1413f274c35fcbfdf87e973cc6217c6bb50e
  Author: Tony Cook <[email protected]>
  Date:   2020-11-11 (Wed, 11 Nov 2020)

  Changed paths:
    M win32/win32.c

  Log Message:
  -----------
  win32 symlink: only use the unprivileged flag if windows is new enough


  Commit: 72fb38d31fe25d9bc5d2bf864f61e694fee3df36
      
https://github.com/Perl/perl5/commit/72fb38d31fe25d9bc5d2bf864f61e694fee3df36
  Author: Tony Cook <[email protected]>
  Date:   2020-11-11 (Wed, 11 Nov 2020)

  Changed paths:
    M mg.c
    M pod/perlvar.pod
    M win32/win32.c
    M win32/win32.h

  Log Message:
  -----------
  remove ${^WIN32_SLOPPY_STAT}

The new implementation, like the UCRT implementation, always
opens the specified file.


  Commit: d97eb1774f074d73f1e17d6ba4f93522b2b67faa
      
https://github.com/Perl/perl5/commit/d97eb1774f074d73f1e17d6ba4f93522b2b67faa
  Author: Tony Cook <[email protected]>
  Date:   2020-11-11 (Wed, 11 Nov 2020)

  Changed paths:
    M pod/perlport.pod
    M t/win32/stat.t
    M t/win32/symlink.t
    M win32/win32.c

  Log Message:
  -----------
  lstat(), readlink() and unlink() treat directory junctions as symlinks


  Commit: da8b113304b2100bdf418f45f0d01a89d1c64a2b
      
https://github.com/Perl/perl5/commit/da8b113304b2100bdf418f45f0d01a89d1c64a2b
  Author: Tony Cook <[email protected]>
  Date:   2020-11-11 (Wed, 11 Nov 2020)

  Changed paths:
    M win32/GNUmakefile
    M win32/Makefile
    M win32/config_H.gc
    M win32/config_H.vc
    M win32/config_sh.PL
    M win32/makefile.mk

  Log Message:
  -----------
  Win32: don't include version specific config for prebuilt config_h.*

This fixes the problem where doing a regen_config_h with a compiler
that supports stdbool.h would generate a config_h.* that would
result in a build failure on older compilers that didn't support
stdbool.h.


  Commit: b375cf945bfcf490c903aa18cd3887049f332083
      
https://github.com/Perl/perl5/commit/b375cf945bfcf490c903aa18cd3887049f332083
  Author: Tony Cook <[email protected]>
  Date:   2020-11-11 (Wed, 11 Nov 2020)

  Changed paths:
    M win32/win32.c

  Log Message:
  -----------
  pre-vista support for win32_symlink


  Commit: fb8784a10b883dff087bd3d3463830ec56b52d5a
      
https://github.com/Perl/perl5/commit/fb8784a10b883dff087bd3d3463830ec56b52d5a
  Author: Tony Cook <[email protected]>
  Date:   2020-11-11 (Wed, 11 Nov 2020)

  Changed paths:
    M win32/win32.c

  Log Message:
  -----------
  Win32: try to make the new stat pre-Vista compatible

the win32\stat.t execute flag test will still fail

This is intended mostly for allowing the Win2000 smoker to build and
test.  If we end up dropping pre-Vista support this commit can be
removed (or reverted if it ends up in blead)


  Commit: b6b725b588563cecf60986f6d19b07969780d0a8
      
https://github.com/Perl/perl5/commit/b6b725b588563cecf60986f6d19b07969780d0a8
  Author: Tony Cook <[email protected]>
  Date:   2020-11-11 (Wed, 11 Nov 2020)

  Changed paths:
    M t/op/taint.t

  Log Message:
  -----------
  t/op/taint.t: handle symlink requiring anything unavailable

like privileges, or a filesystem without symlink support


  Commit: 53830b5d0e8e3c2ec0d0a22a35abe3b6082e751e
      
https://github.com/Perl/perl5/commit/53830b5d0e8e3c2ec0d0a22a35abe3b6082e751e
  Author: Tony Cook <[email protected]>
  Date:   2020-11-11 (Wed, 11 Nov 2020)

  Changed paths:
    M Porting/Maintainers.pl
    M cpan/Test-Harness/t/source.t
    M t/porting/customized.dat

  Log Message:
  -----------
  Test-Harness: don't assume symlink succeeds

https://github.com/Perl-Toolchain-Gang/Test-Harness/pull/103
upstream which has been applied but not released.


  Commit: 1db2433463aa98b8eade3e82622d76cb908a6fdf
      
https://github.com/Perl/perl5/commit/1db2433463aa98b8eade3e82622d76cb908a6fdf
  Author: Tony Cook <[email protected]>
  Date:   2020-11-11 (Wed, 11 Nov 2020)

  Changed paths:
    M t/win32/symlink.t
    M win32/win32.c

  Log Message:
  -----------
  win32 symlink: treats paths that look like directories as directories


  Commit: f824eb5b2e775ae2e4d187e841b58f6952229ae4
      
https://github.com/Perl/perl5/commit/f824eb5b2e775ae2e4d187e841b58f6952229ae4
  Author: Tony Cook <[email protected]>
  Date:   2020-11-11 (Wed, 11 Nov 2020)

  Changed paths:
    M win32/win32.c

  Log Message:
  -----------
  win32 symlink: reindent


Compare: https://github.com/Perl/perl5/compare/6fbcba6143fa...f824eb5b2e77

Reply via email to