Steve Hay writes:
We are elated to announce version 21.10, the eleventh development
release of version 21 of Perl 5.
I've recently taken over maintainership for Cygwin Perl from Reini
Urban. I've not yet set up for smoke testing, mainly since I don't know
how to set things up so that the test results don't need to be sent from
the machine I'm testing on. If that#s not possible I may have to create
a mail account just to be able to get the test results sent away, but
I'd like to avoid that if possible.

In anticipation of the 5.22 release in May I've built this release. It
is passing all tests with a few changes to the Cygwin hint file and
patches to Win32 tests. The first of these is necessary since the drive
I build on has no short/DOS names enabled on its file system. The test
should probably check for that, although I've not yet found out how.
The Unicode patch probably hints at a bug in the Win32 module, it seems
to make some assumptions about the standard encoding that aren't true on
Cygwin. The file stat tests must be run without administrator
privileges on Cygwin (likely on Windows, too) to pass, but I've yet to
find a way to do that automatically for just that one test (other tests
would fail if I wasn't administrator, so I can't run the full testsuite
without administrative privileges).

--8<---------------cut here---------------start------------->8---
diff -u buildperl/hints/cygwin.sh.orig buildperl/hints/cygwin.sh
--- buildperl/hints/cygwin.sh.orig 2011-09-19 08:18:22.000000000 -0500
+++ buildperl/hints/cygwin.sh 2012-03-23 09:33:16.687500000 -0500
@@ -31,6 +31,8 @@
  test -z "$use64bitint" && use64bitint='define'
-test -z "$useithreads" && useithreads='define'
+test -z "$useithreads" && useithreads='undef'
+test -z "$usethreads" && usethreads='define'
+test -z "$usemymalloc" && usemymalloc='undef'
  ccflags="$ccflags -DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__"
  # - otherwise i686-cygwin
--- origsrc/Win32-0.51/t/GetShortPathName.t 2013-11-08 21:42:25.000000000 +0100
+++ src/Win32-0.51/t/GetShortPathName.t 2015-03-08 19:46:49.706174300 +0100
@@ -2,18 +2,21 @@ use strict;
  use Test;
  use Win32;

-my $path = "Long Path $$";
+my $path = "C:\\Long Path $$";
  END { unlink $path }

-plan tests => 5;
+plan tests => 7;

  ok(-f $path);

  my $short = Win32::GetShortPathName($path);
-ok($short, qr/^\S{1,8}(\.\S{1,3})?$/);
+ok($short, qr/^C:\\\S{1,8}(\.\S{1,3})?$/);
  ok(-f $short);
+my $long = Win32::GetLongPathName($short);
+ok($long, $path);
+ok(-f $long);

  ok(!-f $path);
--- origsrc/Win32-0.51/t/Unicode.t 2013-11-08 21:42:25.000000000 +0100
+++ src/Win32-0.51/t/Unicode.t 2015-03-08 19:46:49.706174300 +0100
@@ -1,8 +1,9 @@
  use strict;
-use Test;
+use utf8;
+use Test::More;
  use Config qw(%Config);
  use Cwd qw(cwd);
-use Encode qw();
+use Encode qw(encode decode);
  use Win32;

@@ -20,10 +21,13 @@ BEGIN {

-my $home = Win32::GetCwd();
-my $cwd = cwd(); # may be a Cygwin path
-my $dir = "Foo \x{394}\x{419} Bar \x{5E7}\x{645} Baz";
-my $file = "$dir\\xyzzy \x{394}\x{419} plugh \x{5E7}\x{645}";
+my $home = Win32::GetCwd();
+my $cwd = cwd(); # may be a Cygwin path
+my $dir8 = "Foo ΔЙ Bar קم Baz"; #Foo \x{394}\x{419} Bar \x{5E7}\x{645} Baz";
+my $file8 = "$dir8\\xyzzy ΔЙ plugh קم"; #xyzzy \x{394}\x{419} plugh \x{5E7}\x{645}";
+my $dir = encode("UTF-8", $dir8);
+my $file = encode("UTF-8", $file8);

  sub cleanup {
@@ -36,32 +40,29 @@ sub cleanup {
  END { cleanup() }

-plan test => 12;
+plan tests => 12;

  # Create Unicode directory
  ok(-d Win32::GetANSIPathName($dir));

  # Create Unicode file
  ok(-f Win32::GetANSIPathName($file));

  # readdir() returns ANSI form of Unicode filename
  ok(opendir(my $dh, Win32::GetANSIPathName($dir)));
  while ($_ = readdir($dh)) {
      next if /^\./;
- # On Cygwin 1.7 readdir() returns the utf8 representation of the
- # filename but doesn't turn on the SvUTF8 bit
- Encode::_utf8_on($_) if $^O eq "cygwin" && $Config{osvers} !~ /^1.5/;
      ok($file, Win32::GetLongPathName("$dir\\$_"));

  # Win32::GetLongPathName() of the absolute path restores the Unicode dir name
-my $full = Win32::GetFullPathName($dir);
+my $full = Win32::GetFullPathName($dir8);
  my $long = Win32::GetLongPathName($full);

-ok($long, Win32::GetLongPathName($home)."\\$dir");
+ok($long, Win32::GetLongPathName($home)."\\".$dir);

  # We can Win32::SetCwd() into the Unicode directory
@@ -80,7 +81,7 @@ ok(Win32::GetLongPathName($w32dir), $lon
  # cwd() on Cygwin returns a mapped path that we need to translate
  # back to a Windows path. Invoking `cygpath` on $subdir doesn't work.
  if ($^O eq "cygwin") {
- $subdir = Cygwin::posix_to_win_path($subdir, 1);
+ $subdir = decode "UTF-8", Cygwin::posix_to_win_path($subdir, 1);
  $subdir =~ s,/,\\,g;
  ok(Win32::GetLongPathName($subdir), $long);
--8<---------------cut here---------------end--------------->8---

+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Factory and User Sound Singles for Waldorf rackAttack:

Search Discussions

Discussion Posts

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 3 | next ›
Discussion Overview
groupperl5-porters @
postedMar 29, '15 at 12:20p
activeMar 29, '15 at 6:05p



site design / logo © 2021 Grokbase