Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need to change Cygwin built-in Cwd::cwd #8345

Closed
p5pRT opened this issue Feb 24, 2006 · 17 comments
Closed

Need to change Cygwin built-in Cwd::cwd #8345

p5pRT opened this issue Feb 24, 2006 · 17 comments
Labels

Comments

@p5pRT
Copy link
Collaborator

@p5pRT p5pRT commented Feb 24, 2006

Migrated from rt.perl.org#38628 (status was 'resolved')

Searchable as RT38628$

@p5pRT
Copy link
Collaborator Author

@p5pRT p5pRT commented Feb 24, 2006

From jerry@hedden.us

PathTools 3.16 introduced the following change​:

- Apparently the version of File​::Path that ships with perl 5.8.5
  (and perhaps others) calls Cwd​::getcwd() with an argument (perhaps
  as a method?), which causes it to die with a prototyping error.
  We've eliminated the prototype by using the "(...)" arglist, since
  "PROTOTYPE​: DISABLE" for the function didn't seem to work. [Spotted
  by Eamon Daly and others]

However, the Cygwin version of Perl has its own built-in Cwd​::cwd. The
attached patch modifies this to be consistent with the PathTools change.

@p5pRT
Copy link
Collaborator Author

@p5pRT p5pRT commented Feb 24, 2006

From jerry@hedden.us

cwd_patch.txt
--- perl-5.8.8/cygwin/cygwin.c	2006-01-06 18:04:58.000000000 -0500
+++ perl-5.8.8/cygwin/cygwin.c.fixed	2006-02-24 17:21:34.000000000 -0500
@@ -143,8 +143,6 @@
     dXSARGS;
     char *cwd;
 
-    if(items != 0)
-	Perl_croak(aTHX_ "Usage: Cwd::cwd()");
     if((cwd = getcwd(NULL, -1))) {
 	ST(0) = sv_2mortal(newSVpv(cwd, 0));
 	free(cwd);
@p5pRT
Copy link
Collaborator Author

@p5pRT p5pRT commented Feb 24, 2006

From @ysth

On Fri, Feb 24, 2006 at 02​:32​:58PM -0800, Jerry D. Hedden wrote​:

PathTools 3.16 introduced the following change​:

- Apparently the version of File​::Path that ships with perl 5.8.5
(and perhaps others) calls Cwd​::getcwd() with an argument (perhaps
as a method?), which causes it to die with a prototyping error.
We've eliminated the prototype by using the "(...)" arglist, since
"PROTOTYPE​: DISABLE" for the function didn't seem to work. [Spotted
by Eamon Daly and others]

However, the Cygwin version of Perl has its own built-in Cwd​::cwd. The
attached patch modifies this to be consistent with the PathTools change.

I'd rather see the broken calls, whatever they are, fixed. I don't see
any use of *cwd in File​::Path.

@p5pRT
Copy link
Collaborator Author

@p5pRT p5pRT commented Feb 24, 2006

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Collaborator Author

@p5pRT p5pRT commented Feb 25, 2006

From jerry@hedden.us

On Fri, Feb 24, 2006 at 02​:32​:58PM -0800, Jerry D. Hedden wrote​:

PathTools 3.16 introduced the following change​:

- Apparently the version of File​::Path that ships with perl 5.8.5
(and perhaps others) calls Cwd​::getcwd() with an argument (perhaps
as a method?), which causes it to die with a prototyping error.
We've eliminated the prototype by using the "(...)" arglist, since
"PROTOTYPE​: DISABLE" for the function didn't seem to work. [Spotted
by Eamon Daly and others]

However, the Cygwin version of Perl has its own built-in Cwd​::cwd. The
attached patch modifies this to be consistent with the PathTools change.

Yitzchak Scott-Thoennes replied​:

I'd rather see the broken calls, whatever they are, fixed. I don't see
any use of *cwd in File​::Path.

Since PathTools 3.16 hasn't yet been integrated into blead, my patch may
be premature. I can't say if allowing args to cwd( ) is a good idea or
not.
However, if PathTools 3.16 goes into blead, then my patch should be
applied for consistency sake.

@p5pRT
Copy link
Collaborator Author

@p5pRT p5pRT commented Mar 3, 2006

From @ysth

On Fri, Feb 24, 2006 at 03​:55​:11PM -0700, Jerry D. Hedden wrote​:

On Fri, Feb 24, 2006 at 02​:32​:58PM -0800, Jerry D. Hedden wrote​:

PathTools 3.16 introduced the following change​:

- Apparently the version of File​::Path that ships with perl 5.8.5
(and perhaps others) calls Cwd​::getcwd() with an argument (perhaps
as a method?), which causes it to die with a prototyping error.
We've eliminated the prototype by using the "(...)" arglist, since
"PROTOTYPE​: DISABLE" for the function didn't seem to work. [Spotted
by Eamon Daly and others]

However, the Cygwin version of Perl has its own built-in Cwd​::cwd. The
attached patch modifies this to be consistent with the PathTools change.

Yitzchak Scott-Thoennes replied​:

I'd rather see the broken calls, whatever they are, fixed. I don't see
any use of *cwd in File​::Path.

Since PathTools 3.16 hasn't yet been integrated into blead, my patch may
be premature. I can't say if allowing args to cwd( ) is a good idea or
not.
However, if PathTools 3.16 goes into blead, then my patch should be
applied for consistency sake.

Well, sooner or later, blead should be synched with the CPAN PathTools.
Can you describe how to duplicate the problem that led to the PathTools
change? I'm not seeing it.

@p5pRT
Copy link
Collaborator Author

@p5pRT p5pRT commented Mar 3, 2006

From jerry@hedden.us

Jerry D. Hedden wrote​:

PathTools 3.16 introduced the following change​:

- Apparently the version of File​::Path that ships with perl 5.8.5
(and perhaps others) calls Cwd​::getcwd() with an argument (perhaps
as a method?), which causes it to die with a prototyping error.
We've eliminated the prototype by using the "(...)" arglist, since
"PROTOTYPE​: DISABLE" for the function didn't seem to work. [Spotted
by Eamon Daly and others]

However, the Cygwin version of Perl has its own built-in Cwd​::cwd. The
attached patch modifies this to be consistent with the PathTools change.

Yitzchak Scott-Thoennes replied​:

I'd rather see the broken calls, whatever they are, fixed. I don't see
any use of *cwd in File​::Path.

Jerry D. Hedden replied​:

Since PathTools 3.16 hasn't yet been integrated into blead, my patch may
be premature. I can't say if allowing args to cwd( ) is a good idea or not.
However, if PathTools 3.16 goes into blead, then my patch should be
applied for consistency sake.

Yitzchak Scott-Thoennes replied​:

Well, sooner or later, blead should be synched with the CPAN PathTools.
Can you describe how to duplicate the problem that led to the PathTools
change? I'm not seeing it.

'make test' on PathTools-3.16 fails​:

/usr/bin/perl.exe "-MExtUtils​::Command​::MM" "-e" "test_harness(0,
'blib/lib', 'blib/arch')" t/*.t
t/crossplatform....ok
  7/50 skipped​: Can't load File​::Spec​::VMS
t/cwd..............ok 1/30Usage​: Cwd​::cwd() at t/cwd.t line 132.
# Looks like you planned 30 tests but only ran 18.
# Looks like your test died just after 18.
t/cwd..............dubious
  Test returned status 255 (wstat 65280, 0xff00)
DIED. FAILED tests 19-30
  Failed 12/30 tests, 60.00% okay
t/Functions........ok
t/rel2abs2rel......ok
t/Spec.............ok
  83/473 skipped​: various reasons
t/taint............ok
t/tmpdir...........ok
t/win32............skipped
  all skipped​: this is not win32
Failed Test Stat Wstat Total Fail Failed List of Failed


t/cwd.t 255 65280 30 24 80.00% 19-30
1 test and 90 subtests skipped.
Failed 1/8 test scripts, 87.50% okay. 12/580 subtests failed, 97.93%
okay.

Running the failed test with 'perl -Mblib t/cwd.t'​:

1..30
not ok 1 - Cwd should be loaded from blib/ during testing
# Failed test (t/cwd.t at line 30)
# '/usr/lib/perl5/5.8/cygwin/Cwd.pm'
# doesn't match '(?i-xsm​:blib)'
ok 2 - main->can(...)
ok 3 - chdir() not exported by default
ok 4 - nor abs_path()
ok 5 - nor fast_abs_path()
ok 6 - cwd() shouldn't create spurious entries in %ENV
# native pwd = '/usr/bin/pwd.exe'
ok 7 - cwd()
ok 8 - getcwd()
ok 9 - fastcwd()
ok 10 - fastgetcwd()
ok 11
ok 12 - cwd()
ok 13
ok 14 - getcwd()
ok 15
ok 16 - fastcwd()
ok 17
ok 18 - fastgetcwd()
Usage​: Cwd​::cwd() at t/cwd.t line 132.
# Looks like you planned 30 tests but only ran 18.
# Looks like your test died just after 18.

The 'Usage​:' line indicates the failure. This comes from the newly
added test​:

{
  # Some versions of File​::Path (e.g. that shipped with perl 5.8.5)
  # call getcwd() with an argument (perhaps by calling it as a
  # method?), so make sure that doesn't die.
  is getcwd(), getcwd('foo'), "Call getcwd() with an argument";
}

Hope that helps.

@p5pRT
Copy link
Collaborator Author

@p5pRT p5pRT commented Mar 3, 2006

From @ysth

On Fri, Mar 03, 2006 at 06​:44​:54AM -0700, Jerry D. Hedden wrote​:

Running the failed test with 'perl -Mblib t/cwd.t'​:

1..30
not ok 1 - Cwd should be loaded from blib/ during testing
# Failed test (t/cwd.t at line 30)
# '/usr/lib/perl5/5.8/cygwin/Cwd.pm'
# doesn't match '(?i-xsm​:blib)'

That indicates it didn't find the Cwd from the new PathTools; is that what
you meant to do? Try -Mblib/arch -Mblib/lib if not.

ok 2 - main->can(...)
ok 3 - chdir() not exported by default
ok 4 - nor abs_path()
ok 5 - nor fast_abs_path()
ok 6 - cwd() shouldn't create spurious entries in %ENV
# native pwd = '/usr/bin/pwd.exe'
ok 7 - cwd()
ok 8 - getcwd()
ok 9 - fastcwd()
ok 10 - fastgetcwd()
ok 11
ok 12 - cwd()
ok 13
ok 14 - getcwd()
ok 15
ok 16 - fastcwd()
ok 17
ok 18 - fastgetcwd()
Usage​: Cwd​::cwd() at t/cwd.t line 132.
# Looks like you planned 30 tests but only ran 18.
# Looks like your test died just after 18.

The 'Usage​:' line indicates the failure. This comes from the newly
added test​:

{
# Some versions of File​::Path (e.g. that shipped with perl 5.8.5)
# call getcwd() with an argument (perhaps by calling it as a
# method?), so make sure that doesn't die.
is getcwd(), getcwd('foo'), "Call getcwd() with an argument";
}

Hope that helps.

Blech. So they are specifically testing that a bad call fails.
I still don't see any such call in File​::Path in 5.8.5, so I'm
confused as to what made them introduce that test.

@p5pRT
Copy link
Collaborator Author

@p5pRT p5pRT commented Mar 3, 2006

From @kenahoo

[ysth - Fri Mar 03 12​:18​:48 2006]​:

Blech. So they are specifically testing that a bad call fails.
I still don't see any such call in File​::Path in 5.8.5, so I'm
confused as to what made them introduce that test.

That was me introducing the test. I did it because there's code in the wild that calls cwd()
with arguments (perhaps by doing Cwd->cwd, for example), which in my opinion isn't a
totally crazy thing to do, and it *used* to work with older versions of Cwd, so I wanted to
make sure it continued to work.

In short, I wouldn't call it a "bad call". There's no good reason why such a call should die.

See http​://rt.cpan.org/Ticket/Display.html?id=17175 for one example of cwd() being called
with arguments and dying.

-Ken

@p5pRT
Copy link
Collaborator Author

@p5pRT p5pRT commented Jul 8, 2007

From @rurban

Attached patch fixes this legacy issue, allowing Cwd->cwd().
1st patch for blead.
2nd patch for maint.

There are also documentation updates.
Note​: My 4 new path conversion functions are not in.
--
Reini Urban

@p5pRT
Copy link
Collaborator Author

@p5pRT p5pRT commented Jul 8, 2007

From @rurban

bug#38628-maint.patch
difforig perl-5.8.8/cygwin/cygwin.c perl-5.8.8/t/lib/cygwin.t perl-5.8.8/README.cygwin

2007-07-08  Reini Urban <rurban@x-ray.at>

diff -ub perl-5.8.8/cygwin/cygwin.c.orig perl-5.8.8/cygwin/cygwin.c
--- perl-5.8.8/cygwin/cygwin.c.orig	2007-07-08 11:35:14.289500000 +0000
+++ perl-5.8.8/cygwin/cygwin.c	2007-07-08 13:23:24.570750000 +0000
@@ -143,7 +143,10 @@
     dXSARGS;
     char *cwd;
 
-    if(items != 0)
+    /* See http://rt.perl.org/rt3/Ticket/Display.html?id=38628 
+       There is Cwd->cwd() usage in the wild, and previous versions didn't die.
+     */
+    if(items > 1)
 	Perl_croak(aTHX_ "Usage: Cwd::cwd()");
     if((cwd = getcwd(NULL, -1))) {
 	ST(0) = sv_2mortal(newSVpv(cwd, 0));
@@ -194,7 +197,6 @@
     XSRETURN_UNDEF;
 }
 
-
 void
 init_os_extras(void)
 {
@@ -203,8 +205,8 @@
     dTHX;
 
     newXS("Cwd::cwd", Cygwin_cwd, file);
-    newXS("Cygwin::winpid_to_pid", XS_Cygwin_winpid_to_pid, file);
-    newXS("Cygwin::pid_to_winpid", XS_Cygwin_pid_to_winpid, file);
+    newXSproto("Cygwin::winpid_to_pid", XS_Cygwin_winpid_to_pid, file, "$");
+    newXSproto("Cygwin::pid_to_winpid", XS_Cygwin_pid_to_winpid, file, "$");
  
     if ((cv = get_cv("Win32CORE::bootstrap", 0))) {
         dSP;
diff -ub perl-5.8.8/t/lib/cygwin.t.orig perl-5.8.8/t/lib/cygwin.t
--- perl-5.8.8/t/lib/cygwin.t.orig	2005-02-11 09:58:30.000000000 +0000
+++ perl-5.8.8/t/lib/cygwin.t	2007-07-08 13:22:53.664500000 +0000
@@ -9,7 +9,7 @@
     }
 }
 
-use Test::More tests => 4;
+use Test::More tests => 5;
 
 is(Cygwin::winpid_to_pid(Cygwin::pid_to_winpid($$)), $$,
    "perl pid translates to itself");
@@ -29,3 +29,7 @@
 is(Cygwin::winpid_to_pid($catwinpid), $catpid, "winpid to pid");
 is(Cygwin::pid_to_winpid($catpid), $catwinpid, "pid to winpid");
 close($cat);
+
+use Cwd;
+ok(Cwd->cwd(), "bug#38628 legacy");
+
diff -ub perl-5.8.8/README.cygwin.orig perl-5.8.8/README.cygwin
--- perl-5.8.8/README.cygwin.orig	2005-06-03 08:33:15.000000000 +0000
+++ perl-5.8.8/README.cygwin	2007-07-08 13:39:50.820750000 +0000
@@ -27,11 +27,11 @@
 system calls and environment these programs expect.  More information
 about this project can be found at:
 
-  http://www.cygwin.com/
+  F<http://www.cygwin.com/>
 
 A recent net or commercial release of Cygwin is required.
 
-At the time this document was last updated, Cygwin 1.5.2 was current.
+At the time this document was last updated, Cygwin 1.5.24 was current.
 
 
 =head2 Cygwin Configuration
@@ -143,9 +143,10 @@
 
 BerkeleyDB is available for Cygwin.
 
-NOTE: The BerkeleyDB library only completely works on NTFS partitions.
+NOTE: The BerkeleyDB library only completely works on NTFS partitions 
+and db-4.3 is flawed.
 
-=item * C<-lcygipc> (C<use IPC::SysV>)
+=item * C<cygserver> (C<use IPC::SysV>)
 
 A port of SysV IPC is available for Cygwin.
 
@@ -292,7 +293,7 @@
 wait until the C<make install> process to install the I<ld2> script,
 this is because the remainder of the C<make> refers to I<ld2> without
 fully specifying its path and does this from multiple subdirectories.
-The assumption is that $installbin is in your current C<PATH>.  If this
+The assumption is that I<$installbin> is in your current C<PATH>. If this
 is not the case C<make> will fail at some point.  If this happens,
 just manually copy I<ld2> from the source directory to somewhere in
 your C<PATH>.
@@ -303,7 +304,7 @@
 
   make test 2>&1 | tee log.make-test
 
-  cd t;./perl harness 2>&1 | tee ../log.harness
+  cd t; ./perl harness 2>&1 | tee ../log.harness
 
 The same tests are run both times, but more information is provided when
 running as C<./perl harness>.
@@ -323,8 +324,8 @@
 have a F<.{com,bat,exe}> extension or begin with C<#!>, directories are
 always readable and executable).  On WinNT with the I<ntea> C<CYGWIN>
 setting, the additional mode bits are stored as extended file attributes.
-On WinNT with the I<ntsec> C<CYGWIN> setting, permissions use the standard
-WinNT security descriptors and access control lists.  Without one of
+On WinNT with the default I<ntsec> C<CYGWIN> setting, permissions use the 
+standard WinNT security descriptors and access control lists. Without one of
 these options, these tests will fail (listing not updated yet):
 
   Failed Test           List of failed
@@ -356,7 +357,7 @@
 run Configure with the -Ui_ndbm and -Ui_dbm options to prevent
 NDBM_File and ODBM_File being built.
 
-With NTFS (and CYGWIN=ntsec), there should be no problems even if
+With NTFS (and no CYGWIN=nontsec), there should be no problems even if
 perl was built on FAT.
 
 =head2 C<fork()> failures in io_* tests
@@ -395,12 +396,18 @@
 contains a backslash or drive letter is a Win32 pathname (and not subject
 to the translations applied to POSIX style pathnames).
 
+Pathnames may not contain Unicode characters. C<Cygwin> still uses the
+ANSI API calls and no Unicode calls because of newlib deficiencies.
+There's an unofficial unicode patch for cygwin at 
+F<http://www.okisoft.co.jp/esc/utf8-cygwin/>
+
 =item * Text/Binary
 
 When a file is opened it is in either text or binary mode.  In text mode
 a file is subject to CR/LF/Ctrl-Z translations.  With Cygwin, the default
 mode for an C<open()> is determined by the mode of the mount that underlies
-the file.  Perl provides a C<binmode()> function to set binary mode on files
+the file.
+Perl provides a C<binmode()> function to set binary mode on files
 that otherwise would be treated as text.  C<sysopen()> with the C<O_TEXT>
 flag sets text mode on files that otherwise would be treated as binary:
 
@@ -487,7 +494,7 @@
 
 =item C<Cwd::cwd>
 
-Returns current working directory.
+Returns the current working directory.
 
 =item C<Cygwin::pid_to_winpid>
 
@@ -610,8 +617,9 @@
 Steven Morlock <newspost@morlock.net>,
 Sebastien Barre <Sebastien.Barre@utc.fr>,
 Teun Burgers <burgers@ecn.nl>,
-Gerrit P. Haase <gp@familiehaase.de>.
+Gerrit P. Haase <gp@familiehaase.de>,
+Reini Urban <rurban@x-ray.at>.
 
 =head1 HISTORY
 
-Last updated: 2005-02-11
+Last updated: 2007-07-08
@p5pRT
Copy link
Collaborator Author

@p5pRT p5pRT commented Jul 8, 2007

From @rurban

bug#38628-blead.patch
difforig perl-5.9.5/cygwin/cygwin.c perl-5.9.5/README.cygwin perl-5.9.5/t/lib/cygwin.t

2007-07-08  Reini Urban <rurban@x-ray.at>

diff -ub perl-5.9.5/cygwin/cygwin.c.orig perl-5.9.5/cygwin/cygwin.c
--- perl-5.9.5/cygwin/cygwin.c.orig	2007-07-07 13:40:25.000000000 +0000
+++ perl-5.9.5/cygwin/cygwin.c	2007-07-08 13:48:14.930125000 +0000
@@ -144,7 +144,10 @@
     dXSARGS;
     char *cwd;
 
-    if(items != 0)
+    /* See http://rt.perl.org/rt3/Ticket/Display.html?id=38628 
+       There is Cwd->cwd() usage in the wild, and previous versions didn't die.
+     */
+    if(items > 1)
 	Perl_croak(aTHX_ "Usage: Cwd::cwd()");
     if((cwd = getcwd(NULL, -1))) {
 	ST(0) = sv_2mortal(newSVpv(cwd, 0));
@@ -193,7 +196,6 @@
     XSRETURN_UNDEF;
 }
 
-
 void
 init_os_extras(void)
 {
@@ -202,8 +204,8 @@
     void *handle;
 
     newXS("Cwd::cwd", Cygwin_cwd, file);
-    newXS("Cygwin::winpid_to_pid", XS_Cygwin_winpid_to_pid, file);
-    newXS("Cygwin::pid_to_winpid", XS_Cygwin_pid_to_winpid, file);
+    newXSproto("Cygwin::winpid_to_pid", XS_Cygwin_winpid_to_pid, file, "$");
+    newXSproto("Cygwin::pid_to_winpid", XS_Cygwin_pid_to_winpid, file, "$");
 
     /* Initialize Win32CORE if it has been statically linked. */
     handle = dlopen(NULL, RTLD_LAZY);
diff -ub perl-5.9.5/README.cygwin.orig perl-5.9.5/README.cygwin
--- perl-5.9.5/README.cygwin.orig	2007-07-07 13:40:24.000000000 +0000
+++ perl-5.9.5/README.cygwin	2007-07-08 13:46:53.367625000 +0000
@@ -27,11 +27,11 @@
 system calls and environment these programs expect.  More information
 about this project can be found at:
 
-  http://www.cygwin.com/
+  F<http://www.cygwin.com/>
 
 A recent net or commercial release of Cygwin is required.
 
-At the time this document was last updated, Cygwin 1.5.2 was current.
+At the time this document was last updated, Cygwin 1.5.24 was current.
 
 
 =head2 Cygwin Configuration
@@ -143,9 +143,10 @@
 
 BerkeleyDB is available for Cygwin.
 
-NOTE: The BerkeleyDB library only completely works on NTFS partitions.
+NOTE: The BerkeleyDB library only completely works on NTFS partitions 
+and db-4.3 is flawed.
 
-=item * C<-lcygipc> (C<use IPC::SysV>)
+=item * C<cygserver> (C<use IPC::SysV>)
 
 A port of SysV IPC is available for Cygwin.
 
@@ -276,15 +277,6 @@
 
   make 2>&1 | tee log.make
 
-=head2 Errors on Cygwin
-
-Errors like these are normal:
-
-  ...
-  make: [extra.pods] Error 1 (ignored)
-  ...
-  make: [extras.make] Error 1 (ignored)
-
 =head2 ld2 on Cygwin
 
 During C<make>, I<ld2> will be created and installed in your $installbin
@@ -292,7 +284,7 @@
 wait until the C<make install> process to install the I<ld2> script,
 this is because the remainder of the C<make> refers to I<ld2> without
 fully specifying its path and does this from multiple subdirectories.
-The assumption is that $installbin is in your current C<PATH>.  If this
+The assumption is that I<$installbin> is in your current C<PATH>. If this
 is not the case C<make> will fail at some point.  If this happens,
 just manually copy I<ld2> from the source directory to somewhere in
 your C<PATH>.
@@ -303,7 +295,7 @@
 
   make test 2>&1 | tee log.make-test
 
-  cd t;./perl harness 2>&1 | tee ../log.harness
+  cd t; ./perl harness 2>&1 | tee ../log.harness
 
 The same tests are run both times, but more information is provided when
 running as C<./perl harness>.
@@ -323,8 +315,8 @@
 have a F<.{com,bat,exe}> extension or begin with C<#!>, directories are
 always readable and executable).  On WinNT with the I<ntea> C<CYGWIN>
 setting, the additional mode bits are stored as extended file attributes.
-On WinNT with the I<ntsec> C<CYGWIN> setting, permissions use the standard
-WinNT security descriptors and access control lists.  Without one of
+On WinNT with the default I<ntsec> C<CYGWIN> setting, permissions use the 
+standard WinNT security descriptors and access control lists. Without one of
 these options, these tests will fail (listing not updated yet):
 
   Failed Test           List of failed
@@ -356,7 +348,7 @@
 run Configure with the -Ui_ndbm and -Ui_dbm options to prevent
 NDBM_File and ODBM_File being built.
 
-With NTFS (and CYGWIN=ntsec), there should be no problems even if
+With NTFS (and no CYGWIN=nontsec), there should be no problems even if
 perl was built on FAT.
 
 =head2 C<fork()> failures in io_* tests
@@ -395,12 +387,18 @@
 contains a backslash or drive letter is a Win32 pathname (and not subject
 to the translations applied to POSIX style pathnames).
 
+Pathnames may not contain Unicode characters. C<Cygwin> still uses the
+ANSI API calls and no Unicode calls because of newlib deficiencies.
+There's an unofficial unicode patch for cygwin at 
+F<http://www.okisoft.co.jp/esc/utf8-cygwin/>
+
 =item * Text/Binary
 
 When a file is opened it is in either text or binary mode.  In text mode
 a file is subject to CR/LF/Ctrl-Z translations.  With Cygwin, the default
 mode for an C<open()> is determined by the mode of the mount that underlies
-the file.  Perl provides a C<binmode()> function to set binary mode on files
+the file. 
+Perl provides a C<binmode()> function to set binary mode on files
 that otherwise would be treated as text.  C<sysopen()> with the C<O_TEXT>
 flag sets text mode on files that otherwise would be treated as binary:
 
@@ -475,6 +473,7 @@
     200 [main] perl 377147 sync_with_child: child -395691(0xB8) died before initialization with status code 0x1
    1370 [main] perl 377147 sync_with_child: *** child state child loading dlls
 
+This has been solved since 5.8.7 be using -Wl,--enable-auto-image-base for all shared libraries.
 Use the rebase utility to resolve the conflicting dll addresses.  The
 rebase package is included in the Cygwin netrelease.  Use setup.exe from
 F<http://www.cygwin.com/setup.exe> to install it and run rebaseall.
@@ -487,7 +486,7 @@
 
 =item C<Cwd::cwd>
 
-Returns current working directory.
+Returns the current working directory.
 
 =item C<Cygwin::pid_to_winpid>
 
@@ -610,8 +609,9 @@
 Steven Morlock <newspost@morlock.net>,
 Sebastien Barre <Sebastien.Barre@utc.fr>,
 Teun Burgers <burgers@ecn.nl>,
-Gerrit P. Haase <gp@familiehaase.de>.
+Gerrit P. Haase <gp@familiehaase.de>,
+Reini Urban <rurban@x-ray.at>.
 
 =head1 HISTORY
 
-Last updated: 2005-02-11
+Last updated: 2007-07-08
diff -ub perl-5.9.5/t/lib/cygwin.t.orig perl-5.9.5/t/lib/cygwin.t
--- perl-5.9.5/t/lib/cygwin.t.orig	2007-07-07 13:40:24.000000000 +0000
+++ perl-5.9.5/t/lib/cygwin.t	2007-07-08 13:52:33.195750000 +0000
@@ -9,7 +9,7 @@
     }
 }
 
-use Test::More tests => 4;
+use Test::More tests => 5;
 
 is(Cygwin::winpid_to_pid(Cygwin::pid_to_winpid($$)), $$,
    "perl pid translates to itself");
@@ -29,3 +29,6 @@
 is(Cygwin::winpid_to_pid($catwinpid), $catpid, "winpid to pid");
 is(Cygwin::pid_to_winpid($catpid), $catwinpid, "pid to winpid");
 close($cat);
+
+use Cwd;
+ok(Cwd->cwd(), "bug#38628 legacy");
@p5pRT
Copy link
Collaborator Author

@p5pRT p5pRT commented Nov 7, 2008

From @smpeters

On Sun Jul 08 06​:54​:04 2007, rurban wrote​:

Attached patch fixes this legacy issue, allowing Cwd->cwd().
1st patch for blead.
2nd patch for maint.

There are also documentation updates.
Note​: My 4 new path conversion functions are not in.

Is this patch still needed?

Steve Peters

@p5pRT
Copy link
Collaborator Author

@p5pRT p5pRT commented Nov 7, 2008

From jerry@hedden.us

On Fri, Nov 7, 2008 at 1​:37 PM, Steve Peters via RT
<perlbug-followup@​perl.org> wrote​:

On Sun Jul 08 06​:54​:04 2007, rurban wrote​:

Attached patch fixes this legacy issue, allowing Cwd->cwd().
1st patch for blead.
2nd patch for maint.

There are also documentation updates.
Note​: My 4 new path conversion functions are not in.

Is this patch still needed?

The patches have been applied in blead, 5.10.x and 5.8.x.

@p5pRT
Copy link
Collaborator Author

@p5pRT p5pRT commented Nov 7, 2008

From @smpeters

On Fri Nov 07 11​:03​:49 2008, jerry@​hedden.us wrote​:

On Fri, Nov 7, 2008 at 1​:37 PM, Steve Peters via RT
<perlbug-followup@​perl.org> wrote​:

On Sun Jul 08 06​:54​:04 2007, rurban wrote​:

Attached patch fixes this legacy issue, allowing Cwd->cwd().
1st patch for blead.
2nd patch for maint.

There are also documentation updates.
Note​: My 4 new path conversion functions are not in.

Is this patch still needed?

The patches have been applied in blead, 5.10.x and 5.8.x.

Excellent! This ticket can be closed.

Steve

@p5pRT
Copy link
Collaborator Author

@p5pRT p5pRT commented Nov 7, 2008

@smpeters - Status changed from 'open' to 'resolved'

@p5pRT p5pRT closed this Nov 7, 2008
@p5pRT
Copy link
Collaborator Author

@p5pRT p5pRT commented Nov 9, 2008

From @rurban

2008/11/7 Steve Peters via RT <perlbug-followup@​perl.org>​:

On Fri Nov 07 11​:03​:49 2008, jerry@​hedden.us wrote​:

On Fri, Nov 7, 2008 at 1​:37 PM, Steve Peters via RT
<perlbug-followup@​perl.org> wrote​:

On Sun Jul 08 06​:54​:04 2007, rurban wrote​:

Attached patch fixes this legacy issue, allowing Cwd->cwd().
1st patch for blead.
2nd patch for maint.

There are also documentation updates.
Note​: My 4 new path conversion functions are not in.

Is this patch still needed?

The patches have been applied in blead, 5.10.x and 5.8.x.

Excellent! This ticket can be closed.

Thanks Jerry and Steve.

--
Reini Urban
http​://phpwiki.org/ http​://murbreak.at/

@p5pRT p5pRT added the Severity Low label Oct 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.