From: Jarkko Hietaniemi Date: Sun, 10 Feb 2002 21:07:20 +0000 (+0000) Subject: DJGPP tweaks from Laszlo Molnar. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d835d33024e82f22ed1dd999cf6bd616a6eec9e9;p=p5sagit%2Fp5-mst-13.2.git DJGPP tweaks from Laszlo Molnar. p4raw-id: //depot/perl@14627 --- diff --git a/djgpp/djgpp.c b/djgpp/djgpp.c index 4c53eb0..6aa290e 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); diff --git a/lib/File/Spec.pm b/lib/File/Spec.pm index 3ac1060..529e34f 100644 --- a/lib/File/Spec.pm +++ b/lib/File/Spec.pm @@ -11,6 +11,7 @@ my %module = (MacOS => 'Mac', VMS => 'VMS', epoc => 'Epoc', NetWare => 'Win32', # Yes, File::Spec::Win32 works on NetWare. + dos => 'OS2', # Yes, File::Spec::OS2 works on DJGPP. cygwin => 'Cygwin');