squelch some more type mismatch warnings
[p5sagit/p5-mst-13.2.git] / ext / Cwd / Cwd.xs
index a82404f..f53f6ee 100644 (file)
@@ -70,10 +70,10 @@ bsd_realpath(path, resolved)
        char *resolved;
 {
 #ifdef VMS
-       return Perl_rmsexpand((char*)path, resolved, NULL, 0);
+       dTHX;
+       return Perl_rmsexpand(aTHX_ (char*)path, resolved, NULL, 0);
 #else
-       struct stat sb;
-       int n, rootd, serrno;
+       int rootd, serrno;
        char *p, *q, wbuf[MAXPATHLEN];
        int symlinks = 0;
 
@@ -123,9 +123,12 @@ loop:
                p = resolved;
 
 #if defined(HAS_LSTAT) && defined(HAS_READLINK) && defined(HAS_SYMLINK)
+    {
+       struct stat sb;
        /* Deal with the last component. */
        if (lstat(p, &sb) == 0) {
                if (S_ISLNK(sb.st_mode)) {
+                       int n;
                        if (++symlinks > MAXSYMLINKS) {
                                errno = ELOOP;
                                goto err1;
@@ -142,6 +145,7 @@ loop:
                        p = "";
                }
        }
+    }
 #endif
 
        /*
@@ -212,6 +216,7 @@ PROTOTYPES: ENABLE
 
 void
 fastcwd()
+PROTOTYPE: DISABLE
 PPCODE:
 {
     dXSTARG;