Change 16142 by jhi@alpha on 2002/04/24 18:30:14

        Integrate #16136, #16137, #16138 from macperl;
        
        Silly fix for the SC compiler's fixation with "comp" as a type
        
        Skip more PerlIO symbols for sfio
        
        Play nicely in miniperl

Affected files ...

.... //depot/perl/ext/Unicode/Normalize/Normalize.xs#9 integrate
.... //depot/perl/lib/File/Copy.pm#28 integrate
.... //depot/perl/lib/File/Spec/Mac.pm#18 integrate
.... //depot/perl/makedef.pl#112 integrate

Differences ...

==== //depot/perl/ext/Unicode/Normalize/Normalize.xs#9 (text) ====
Index: perl/ext/Unicode/Normalize/Normalize.xs
--- perl/ext/Unicode/Normalize/Normalize.xs.~1~ Wed Apr 24 12:45:05 2002
+++ perl/ext/Unicode/Normalize/Normalize.xs     Wed Apr 24 12:45:05 2002
@@ -553,10 +553,10 @@
     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
 

==== //depot/perl/lib/File/Copy.pm#28 (text) ====
Index: perl/lib/File/Copy.pm
--- perl/lib/File/Copy.pm.~1~   Wed Apr 24 12:45:05 2002
+++ perl/lib/File/Copy.pm       Wed Apr 24 12:45:05 2002
@@ -33,6 +33,13 @@
 
 $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 @@
            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 @@
 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,

==== //depot/perl/lib/File/Spec/Mac.pm#18 (text) ====
Index: perl/lib/File/Spec/Mac.pm
--- perl/lib/File/Spec/Mac.pm.~1~       Wed Apr 24 12:45:05 2002
+++ perl/lib/File/Spec/Mac.pm   Wed Apr 24 12:45:05 2002
@@ -9,6 +9,10 @@
 @ISA = qw(File::Spec::Unix);
 
 use Cwd;
+my $macfiles;
+if ($^O eq 'MacOS') {
+       $macfiles = eval { require Mac::Files };
+}
 
 =head1 NAME
 
@@ -339,6 +343,8 @@
 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 @@
 #  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;
 }

==== //depot/perl/makedef.pl#112 (text) ====
Index: perl/makedef.pl
--- perl/makedef.pl.~1~ Wed Apr 24 12:45:05 2002
+++ perl/makedef.pl     Wed Apr 24 12:45:05 2002
@@ -769,6 +769,29 @@
                         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 {
End of Patch.

Reply via email to