X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=ext%2FCwd%2FCwd.xs;h=039adb93f6e9f9419213e6414cdff7512fbb7a8e;hb=2a5d9b1d41e4bafaa26126c5dea2f6ff0b72b6a7;hp=00ebcc79b8eb0746922e28e38eff61d696ef4029;hpb=99f36a739b86a289062066efb312754683ab485a;p=p5sagit%2Fp5-mst-13.2.git diff --git a/ext/Cwd/Cwd.xs b/ext/Cwd/Cwd.xs index 00ebcc7..039adb9 100644 --- a/ext/Cwd/Cwd.xs +++ b/ext/Cwd/Cwd.xs @@ -70,9 +70,7 @@ static char *rcsid = "$OpenBSD: realpath.c,v 1.4 1998/05/18 09:55:19 deraadt Exp */ static char * -bsd_realpath(path, resolved) - const char *path; - char *resolved; +bsd_realpath(const char *path, char *resolved) { #ifdef VMS dTHX; @@ -270,7 +268,7 @@ int Perl_getcwd_sv(pTHX_ register SV *sv) } #else - + { Stat_t statbuf; int orig_cdev, orig_cino, cdev, cino, odev, oino, tdev, tino; int namelen, pathlen=0; @@ -382,6 +380,7 @@ int Perl_getcwd_sv(pTHX_ register SV *sv) } return TRUE; + } #endif #else @@ -410,6 +409,19 @@ PPCODE: } void +getcwd(...) +PROTOTYPE: DISABLE +PPCODE: +{ + dXSTARG; + getcwd_sv(TARG); + XSprePUSH; PUSHTARG; +#ifndef INCOMPLETE_TAINTS + SvTAINTED_on(TARG); +#endif +} + +void abs_path(pathsv=Nullsv) SV *pathsv PROTOTYPE: DISABLE @@ -419,7 +431,7 @@ PPCODE: char *path; char buf[MAXPATHLEN]; - path = pathsv ? SvPV_nolen(pathsv) : "."; + path = pathsv ? SvPV_nolen(pathsv) : (char *)"."; if (bsd_realpath(path, buf)) { sv_setpvn(TARG, buf, strlen(buf)); @@ -435,7 +447,7 @@ PPCODE: #endif } -#ifdef WIN32 +#if defined(WIN32) && !defined(UNDER_CE) void getdcwd(...)