From: Jarkko Hietaniemi Date: Wed, 14 Feb 2001 03:29:01 +0000 (+0000) Subject: More MacOS Classic fixes from Chris Nandor. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=4aecb5b5cac31fffe9c189363ef05e3582c40547;p=p5sagit%2Fp5-mst-13.2.git More MacOS Classic fixes from Chris Nandor. p4raw-id: //depot/perl@8805 --- diff --git a/doop.c b/doop.c index 1495953..a760a78 100644 --- a/doop.c +++ b/doop.c @@ -187,6 +187,10 @@ S_do_trans_complex(pTHX_ SV *sv)/* SPC - NOT OK */ d = s; dstart = d; +#ifdef MACOS_TRADITIONAL +#define comp CoMP /* "comp" is a keyword in some compilers ... */ +#endif + if (PL_op->op_private & OPpTRANS_SQUASH) { U8* p = send; UV pch = 0xfeedface; diff --git a/lib/Cwd.pm b/lib/Cwd.pm index 4a263cd..f27bd3a 100644 --- a/lib/Cwd.pm +++ b/lib/Cwd.pm @@ -91,7 +91,7 @@ sub _backtick_pwd { unless(defined &cwd) { # The pwd command is not available in some chroot(2)'ed environments - if(grep { -x "$_/pwd" } split(':', $ENV{PATH})) { + if($^O eq 'MacOS' || grep { -x "$_/pwd" } split(':', $ENV{PATH})) { *cwd = \&_backtick_pwd; } else { @@ -198,6 +198,9 @@ sub chdir { if ($^O eq 'VMS') { return $ENV{'PWD'} = $ENV{'DEFAULT'} } + elsif ($^O eq 'MacOS') { + return $ENV{'PWD'} = cwd(); + } elsif ($^O eq 'MSWin32') { $ENV{'PWD'} = Win32::GetFullPathName($newdir); return 1; @@ -417,6 +420,12 @@ sub _epoc_cwd { *fastcwd = \&_epoc_cwd; *abs_path = \&fast_abs_path; } + elsif ($^O eq 'MacOS') { + *getcwd = \&cwd; + *fastgetcwd = \&cwd; + *fastcwd = \&cwd; + *abs_path = \&fast_abs_path; + } } # package main; eval join('',) || die $@; # quick test