diff options
-rw-r--r-- | ext/Unicode/Normalize/Normalize.xs | 6 | ||||
-rw-r--r-- | lib/File/Copy.pm | 13 | ||||
-rw-r--r-- | lib/File/Spec/Mac.pm | 12 | ||||
-rw-r--r-- | makedef.pl | 23 |
4 files changed, 46 insertions, 8 deletions
diff --git a/ext/Unicode/Normalize/Normalize.xs b/ext/Unicode/Normalize/Normalize.xs index 3cb221fd75..93cb471a5d 100644 --- a/ext/Unicode/Normalize/Normalize.xs +++ b/ext/Unicode/Normalize/Normalize.xs @@ -553,10 +553,10 @@ getComposite(uv, uv2) UV uv2 PROTOTYPE: $$ PREINIT: - UV comp; + UV composite; CODE: - comp = composite_uv(uv, uv2); - RETVAL = comp ? newSVuv(comp) : &PL_sv_undef; + composite = composite_uv(uv, uv2); + RETVAL = composite ? newSVuv(composite) : &PL_sv_undef; OUTPUT: RETVAL diff --git a/lib/File/Copy.pm b/lib/File/Copy.pm index 31fad2ac5d..08da5e5d31 100644 --- a/lib/File/Copy.pm +++ b/lib/File/Copy.pm @@ -33,6 +33,13 @@ require Exporter; $Too_Big = 1024 * 1024 * 2; +my $macfiles; +if ($^O eq 'MacOS') { + $macfiles = eval { require Mac::MoreFiles }; + warn 'Mac::MoreFiles could not be loaded; using non-native syscopy' + if $^W; +} + sub _catname { my($from, $to) = @_; if (not defined &basename) { @@ -230,8 +237,7 @@ unless (defined &syscopy) { return 0 unless @_ == 2; return Win32::CopyFile(@_, 1); }; - } elsif ($^O eq 'MacOS') { - require Mac::MoreFiles; + } elsif ($macfiles) { *syscopy = sub { my($from, $to) = @_; my($dir, $toname); @@ -338,6 +344,9 @@ VMS systems, this calls the C<rmscopy> routine (see below). For OS/2 systems, this calls the C<syscopy> XSUB directly. For Win32 systems, this calls C<Win32::CopyFile>. +On Mac OS (Classic), C<syscopy> calls C<Mac::MoreFiles::FSpFileCopy>, +if available. + =head2 Special behaviour if C<syscopy> is defined (OS/2, VMS and Win32) If both arguments to C<copy> are not file handles, diff --git a/lib/File/Spec/Mac.pm b/lib/File/Spec/Mac.pm index c3ae7aff6b..000da91b1a 100644 --- a/lib/File/Spec/Mac.pm +++ b/lib/File/Spec/Mac.pm @@ -9,6 +9,10 @@ $VERSION = '1.3'; @ISA = qw(File::Spec::Unix); use Cwd; +my $macfiles; +if ($^O eq 'MacOS') { + $macfiles = eval { require Mac::Files }; +} =head1 NAME @@ -339,6 +343,8 @@ concept, although other volumes aren't rooted there. The name has a trailing ":", because that's the correct specification for a volume name on Mac OS. +If Mac::Files could not be loaded, the empty string is returned. + =cut sub rootdir { @@ -346,9 +352,9 @@ sub rootdir { # There's no real root directory on Mac OS. The name of the startup # volume is returned, since that's the closest in concept. # - require Mac::Files; - my $system = Mac::Files::FindFolder(&Mac::Files::kOnSystemDisk, - &Mac::Files::kSystemFolderType); + return '' unless $macfiles; + my $system = Mac::Files::FindFolder(&Mac::Files::kOnSystemDisk, + &Mac::Files::kSystemFolderType); $system =~ s/:.*\Z(?!\n)/:/s; return $system; } diff --git a/makedef.pl b/makedef.pl index 330d6a23dc..4ee99f3552 100644 --- a/makedef.pl +++ b/makedef.pl @@ -769,6 +769,29 @@ if ($define{'USE_PERLIO'}) { PerlIO_ungetc PerlIO_vprintf PerlIO_write + PerlIO_perlio + Perl_PerlIO_clearerr + Perl_PerlIO_close + Perl_PerlIO_eof + Perl_PerlIO_error + Perl_PerlIO_fileno + Perl_PerlIO_fill + Perl_PerlIO_flush + Perl_PerlIO_get_base + Perl_PerlIO_get_bufsiz + Perl_PerlIO_get_cnt + Perl_PerlIO_get_ptr + Perl_PerlIO_read + Perl_PerlIO_seek + Perl_PerlIO_set_cnt + Perl_PerlIO_set_ptrcnt + Perl_PerlIO_setlinebuf + Perl_PerlIO_stderr + Perl_PerlIO_stdin + Perl_PerlIO_stdout + Perl_PerlIO_tell + Perl_PerlIO_unread + Perl_PerlIO_write )]; } } else { |