The enclosed patch, derived from similar code in pp_sys.c, allows
for the compilation of the Cwd extension on VMS.  A full patch for
that entails mods to configure.com and vms/descrip_mms.template and
is currently under discussion on the vmsperl list.  Since parts
of that proposed patch are contingent upon acceptance of this patch,
and since this patch ought to help platfroms other than VMS that have
VOID_CLOSEDIR #defined I've pulled this out to send in separately.

diff -ru perl.9742/ext/Cwd/Cwd.xs perl/ext/Cwd/Cwd.xs
--- perl.9742/ext/Cwd/Cwd.xs    Tue Apr 17 16:24:36 2001
+++ perl/ext/Cwd/Cwd.xs Thu Apr 19 11:56:05 2001
@@ -85,10 +85,14 @@
     pathlen += (namelen + 1);
     ++i;
 
+#ifdef VOID_CLOSEDIR
+    PerlDir_close(dir);
+#else
     if (PerlDir_close(dir) < 0) {
       Safefree(names);
       return FALSE;
     }
+#endif
   }
 
   Newz(0, path, pathlen + 1, char);
End of Patch.

Peter Prymmer



Reply via email to