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;
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;
p = "";
}
}
+ }
#endif
/*
rootd = 0;
if (*wbuf) {
- if (strlen(resolved) + strlen(wbuf) + rootd + 1 > MAXPATHLEN) {
+ if (strlen(resolved) + strlen(wbuf) + (1 - rootd) + 1 > MAXPATHLEN) {
errno = ENAMETOOLONG;
goto err1;
}
void
fastcwd()
+PROTOTYPE: DISABLE
PPCODE:
{
dXSTARG;
getcwd_sv(TARG);
XSprePUSH; PUSHTARG;
+#ifndef INCOMPLETE_TAINTS
+ SvTAINTED_on(TARG);
+#endif
}
void