summaryrefslogtreecommitdiff
path: root/os2
diff options
context:
space:
mode:
authorIlya Zakharevich <ilya@math.berkeley.edu>2003-09-13 13:20:30 -0700
committerJarkko Hietaniemi <jhi@iki.fi>2003-09-14 06:46:26 +0000
commit5723cfe4740ef994c304e24ebce30a66f58eefb9 (patch)
tree56a21cba84bd3cd598350c2b9ab2dda8dfb1b7a0 /os2
parent0aa703b2c59d48c747246ec784dec6c97b8d77be (diff)
downloadperl-5723cfe4740ef994c304e24ebce30a66f58eefb9.tar.gz
Re: [PATCH 5.8.1 @20218] OS/2 API
Message-ID: <20030914032030.GA17822@math.berkeley.edu> p4raw-id: //depot/perl@21219
Diffstat (limited to 'os2')
-rw-r--r--os2/os2.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/os2/os2.c b/os2/os2.c
index bf8891bfc6..ddb5895a8f 100644
--- a/os2/os2.c
+++ b/os2/os2.c
@@ -2949,11 +2949,11 @@ XS(XS_Cwd_sys_cwd)
XS(XS_Cwd_sys_abspath)
{
dXSARGS;
- if (items < 1 || items > 2)
- Perl_croak_nocontext("Usage: Cwd::sys_abspath(path, dir = NULL)");
+ if (items > 2)
+ Perl_croak_nocontext("Usage: Cwd::sys_abspath(path = '.', dir = NULL)");
{
STRLEN n_a;
- char * path = (char *)SvPV(ST(0),n_a);
+ char * path = items ? (char *)SvPV(ST(0),n_a) : ".";
char * dir, *s, *t, *e;
char p[MAXPATHLEN];
char * RETVAL;
@@ -3073,6 +3073,10 @@ XS(XS_Cwd_sys_abspath)
*t = 0;
SvCUR_set(sv, t - SvPVX(sv));
}
+#ifndef INCOMPLETE_TAINTS
+ if (!items)
+ SvTAINTED_on(ST(0));
+#endif
}
XSRETURN(1);
}