void close_dir portability fix for Cwd.xs
Peter Prymmer [Thu, 19 Apr 2001 12:02:40 +0000 (05:02 -0700)]
Message-ID: <Pine.OSF.4.10.10104191158490.348917-100000@aspara.forte.com>

p4raw-id: //depot/perl@9758

ext/Cwd/Cwd.xs

index 31e408f..0f2fde0 100644 (file)
@@ -85,10 +85,14 @@ _cwdxs_fastcwd(void)
     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);