question about perl -i bug

Ralf Habacker
Mon Nov 19 11:27:00 GMT 2001

this patch fixes the "permission denied error for cygwin when inplace editing".
It provides an internal backup extension, if the -i option is set without a backup extension,
so this may be more a pracmatical workaround as a real bug fix, but it works and costs only 1
hour instead an "ideal" fix would cost about 5-8 hours. So this is very economical.  :-)

[  ????] By: ????                                 on 2001/11/29  13:37:00
        Log: fixed permission denied error for cygwin when inplace editing
           ! perl.c


$ diff -ubBp perl.c
---  Wed Nov 28 09:34:24 2001
+++ perl.c      Thu Nov 29 12:35:36 2001
@@ -2135,6 +2135,12 @@ Perl_moreswitches(pTHX_ char *s)
     case 'i':
        if (PL_inplace)
+#if defined(__CYGWIN__)
+  if (*(s+1) == '\0') {
+      PL_inplace = savepv(".bak");
+      return s+1;
+       }
        PL_inplace = savepv(s+1);
        /*SUPPRESS 530*/
        for (s = PL_inplace; *s && !isSPACE(*s); s++) ;


> I use this kind of script to build bleadperl:

Hmmh, I have done the foolowing like described in the INSTALL file and it works for 99%

        rm -f
        sh Configure -de
        make test
        make install

The "make install" fails with an "install is up to date" error I don't know why
so I have choosed "make install-silent" or "install-verbose" and it goes.

After that I have tried preparing a kde package from cvs for configureing and it worked
(except another bug in make (.PHONY:cvs need in admin/Makefile.common ), but this will be
fixed next.

One question: Can anyone verify this patch ?

Second question: When this fix is okay, can someone tell me when an updated perl package will
be available on cygwin ?
I'm asking because we like to open the kde2 cvs archive in the next time and for that we need
an updated perl.

Regards Ralf

More information about the Cygwin-apps mailing list