Subject: consting Cwd and ExtUtils::ParseXS
From: "Robin Barker" <Robin.Barker@npl.co.uk>
Message-ID: <
46A0F33545E63740BC7563DE59CA9C6D0939A0@exchsvr2.npl.ad.local>
lib/ExtUtils/ParseXS.pm had changes already made with change
#32691.
p4raw-id: //depot/perl@32710
return Perl_rmsexpand(aTHX_ (char*)path, resolved, NULL, 0);
#else
int rootd, serrno;
- char *p, *q, wbuf[MAXPATHLEN];
+ const char *p;
+ char *q, wbuf[MAXPATHLEN];
int symlinks = 0;
/* Save the starting point. */
loop:
q = strrchr(resolved, '/');
if (q != NULL) {
+ const char *dir;
p = q + 1;
if (q == resolved)
- q = "/";
+ dir = "/";
else {
do {
--q;
} while (q > resolved && *q == '/');
q[1] = '\0';
- q = resolved;
+ dir = resolved;
}
- if (chdir(q) < 0)
+ if (chdir(dir) < 0)
goto err1;
} else
p = resolved;