develooper Front page | perl.perl5.porters | Postings from April 2001

[PATCH: perl@9841] fix a typo for Cwd.xs

Thread Next
From:
Peter Prymmer
Date:
April 25, 2001 16:18
Subject:
[PATCH: perl@9841] fix a typo for Cwd.xs
Message ID:
Pine.OSF.4.10.10104251614200.257877-100000@aspara.forte.com

This one too seemed to slip through the cracks.  The problem 
was first noted by me on VMS with the 9830 kit and the message:

 CC/DECC
 /Include=[]/Standard=Relaxed_ANSI/Prefix=All/Obj=.obj/NoList/NOANSI_ALI

       PerlDir_close(dir);
 ......^
 %CC-W-PTRMISMATCH, In this statement, the referenced type of the
 pointer value "(dir)" is "char", which is not compatible with
 "struct _dirdesc".
 at line number 195 in file DKA500:[PERL.EXT.CWD]CWD.XS;1

Which is more than a little disconcerting (where is a C<char * dir;> 
coming from???)  At any rate here is a fix:

--- perl_9841/ext/Cwd/Cwd.xs.orig	Wed Apr 25 16:11:15 2001
+++ perl_9841/ext/Cwd/Cwd.xs	Wed Apr 25 16:11:45 2001
@@ -205,7 +205,7 @@
       Move(cwd, cwd + namelen + 1, strlen(cwd), char);
       Copy(dp->d_name, cwd + 1, namelen, char);
 #ifdef VOID_CLOSEDIR
-      PerlDir_close(dir);
+      PerlDir_close(parent);
 #else
       if (PerlDir_close(parent) < 0) {
         warn("abs_path: closedir(\"%s\"): %s", dotdots, Strerror(errno));
End of Patch.

Peter Prymmer



Thread Next


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