diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2002-02-10 21:07:20 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2002-02-10 21:07:20 +0000 |
commit | d835d33024e82f22ed1dd999cf6bd616a6eec9e9 (patch) | |
tree | b827a46a0801553123cbfdd43b9429d8aee07723 /djgpp | |
parent | 80feea457bd9e3b1b615d0abcd55aebb2e140fd6 (diff) | |
download | perl-d835d33024e82f22ed1dd999cf6bd616a6eec9e9.tar.gz |
DJGPP tweaks from Laszlo Molnar.
p4raw-id: //depot/perl@14627
Diffstat (limited to 'djgpp')
-rw-r--r-- | djgpp/djgpp.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/djgpp/djgpp.c b/djgpp/djgpp.c index 4c53eb09c8..6aa290ec53 100644 --- a/djgpp/djgpp.c +++ b/djgpp/djgpp.c @@ -366,6 +366,24 @@ XS(dos_UseLFN) XSRETURN_IV (_USE_LFN); } +XS(XS_Cwd_sys_cwd) +{ + dXSARGS; + if (items != 0) + Perl_croak_nocontext("Usage: Cwd::sys_cwd()"); + { + char p[MAXPATHLEN]; + char * RETVAL; + RETVAL = getcwd(p, MAXPATHLEN); + ST(0) = sv_newmortal(); + sv_setpv((SV*)ST(0), RETVAL); +#ifndef INCOMPLETE_TAINTS + SvTAINTED_on(ST(0)); +#endif + } + XSRETURN(1); +} + void Perl_init_os_extras(pTHX) { @@ -375,6 +393,7 @@ Perl_init_os_extras(pTHX) newXS ("Dos::GetCwd",dos_GetCwd,file); newXS ("Dos::UseLFN",dos_UseLFN,file); + newXS ("Cwd::sys_cwd",XS_Cwd_sys_cwd,file); /* install my File System Extension for globbing */ __FSEXT_add_open_handler (glob_handler); |