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

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

Thread Next
Peter Prymmer
April 25, 2001 16:18
[PATCH: perl@9841] fix a typo for Cwd.xs
Message ID:

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-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);
-      PerlDir_close(dir);
+      PerlDir_close(parent);
       if (PerlDir_close(parent) < 0) {
         warn("abs_path: closedir(\"%s\"): %s", dotdots, Strerror(errno));
End of Patch.

Peter Prymmer

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About