develooper Front page | perl.perl5.changes | Postings from October 2020

[Perl/perl5] 692667: add lstat(), fetch st_dev and st_ino and fetchst_...

From:
Tony Cook via perl5-changes
Date:
October 12, 2020 00:17
Subject:
[Perl/perl5] 692667: add lstat(), fetch st_dev and st_ino and fetchst_...
Message ID:
Perl/perl5/push/refs/heads/tonyc/win32-symlink/000000-73b93f@github.com
  Branch: refs/heads/tonyc/win32-symlink
  Home:   https://github.com/Perl/perl5
  Commit: 692667688d79b4e7fb3cace6cf3663e8dda69335
      https://github.com/Perl/perl5/commit/692667688d79b4e7fb3cace6cf3663e8dda69335
  Author: Tony Cook <tony@develop-help.com>
  Date:   2020-10-07 (Wed, 07 Oct 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:
  -----------
  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: d564e313575d3fa8744611125d2149273f296fd1
      https://github.com/Perl/perl5/commit/d564e313575d3fa8744611125d2149273f296fd1
  Author: Tony Cook <tony@develop-help.com>
  Date:   2020-10-07 (Wed, 07 Oct 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/config_h.PL
    M win32/perlhost.h
    M win32/win32.c
    M win32/win32iop.h

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

The API used requires Windows Vista or later, but is called in such
a way that perl can still be used on older Windows.

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

# Conflicts:
#	win32/win32.c


  Commit: aa16caf37a9fc5ca9c7efd706060638ff4f1f61e
      https://github.com/Perl/perl5/commit/aa16caf37a9fc5ca9c7efd706060638ff4f1f61e
  Author: Tony Cook <tony@develop-help.com>
  Date:   2020-10-07 (Wed, 07 Oct 2020)

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

  Log Message:
  -----------
  Win32 behaviour with chdir() to a symlink isn't POSIX-like

So we skip it.


  Commit: 393fff58e55aa3282931dc2f2f237fba3d07c13f
      https://github.com/Perl/perl5/commit/393fff58e55aa3282931dc2f2f237fba3d07c13f
  Author: Tony Cook <tony@develop-help.com>
  Date:   2020-10-07 (Wed, 07 Oct 2020)

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

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


  Commit: 766ce00d767af82ee4eba11e55b179c2d5e5301f
      https://github.com/Perl/perl5/commit/766ce00d767af82ee4eba11e55b179c2d5e5301f
  Author: Tony Cook <tony@develop-help.com>
  Date:   2020-10-07 (Wed, 07 Oct 2020)

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

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

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: a902dbdbe740a360a3018bd7abd68212a04f5d1e
      https://github.com/Perl/perl5/commit/a902dbdbe740a360a3018bd7abd68212a04f5d1e
  Author: Tony Cook <tony@develop-help.com>
  Date:   2020-10-07 (Wed, 07 Oct 2020)

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

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


  Commit: 73b93f343191202d476d621860dbb9002c0cb6a5
      https://github.com/Perl/perl5/commit/73b93f343191202d476d621860dbb9002c0cb6a5
  Author: Tony Cook <tony@develop-help.com>
  Date:   2020-10-07 (Wed, 07 Oct 2020)

  Changed paths:
    M dist/PathTools/Cwd.pm
    M dist/PathTools/Cwd.xs

  Log Message:
  -----------
  update to use PerlLIO_*


Compare: https://github.com/Perl/perl5/compare/692667688d79%5E...73b93f343191



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About