Filewatcher File Search File Search
Catalog
Content Search
» » » » » » perl-5.6.0-17.src.rpm » Content »
pkg://perl-5.6.0-17.src.rpm:4439898/  info  HEADER  downloads

perl - The Perl programming language.…  more info»

perl-5.6.0-errno.patch

--- perl-5.6.0/ext/Errno/Errno_pm.PL.bak	Mon Jul 31 00:22:40 2000
+++ perl-5.6.0/ext/Errno/Errno_pm.PL	Mon Jul 31 00:37:09 2000
@@ -12,38 +12,10 @@
 open OUT, ">Errno.pm" or die "Cannot open Errno.pm: $!";
 select OUT;
 my $file;
-foreach $file (get_files()) {
-    process_file($file);
-}
+get_errors(); 
 write_errno_pm();
 unlink "errno.c" if -f "errno.c";
 
-sub process_file {
-    my($file) = @_;
-
-    return unless defined $file and -f $file;
-
-    local *FH;
-    if (($^O eq 'VMS') && ($Config{vms_cc_type} ne 'gnuc')) {
-	unless(open(FH," LIBRARY/EXTRACT=ERRNO/OUTPUT=SYS\$OUTPUT $file |")) {
-            warn "Cannot open '$file'";
-            return;
-	}     
-    } else {
-	unless(open(FH,"< $file")) {
-	    # This file could be a temporary file created by cppstdin
-	    # so only warn under -w, and return
-            warn "Cannot open '$file'" if $^W;
-            return;
-	}
-    }
-    while(<FH>) {
-	$err{$1} = 1
-	    if /^\s*#\s*define\s+(E\w+)\s+/;
-   }
-   close(FH);
-}
-
 my $cppstdin;
 
 sub default_cpp {
@@ -62,63 +34,23 @@
     return "$cppstdin $Config{cppflags} $Config{cppminus}";
 }
 
-sub get_files {
-    my %file = ();
-    # VMS keeps its include files in system libraries (well, except for Gcc)
-    if ($^O eq 'VMS') {
-	if ($Config{vms_cc_type} eq 'decc') {
-	    $file{'Sys$Library:DECC$RTLDEF.TLB'} = 1;
-	} elsif ($Config{vms_cc_type} eq 'vaxc') {
-	    $file{'Sys$Library:vaxcdef.tlb'} = 1;
-	} elsif ($Config{vms_cc_type} eq 'gcc') {
-	    $file{'gnu_cc_include:[000000]errno.h'} = 1;
-	}
-    } elsif ($^O eq 'os390') {
-	# OS/390 C compiler doesn't generate #file or #line directives
-	$file{'/usr/include/errno.h'} = 1;
-    } elsif ($^O eq 'vmesa') {
-	# OS/390 C compiler doesn't generate #file or #line directives
-	$file{'../../vmesa/errno.h'} = 1;
-    } else {
-	open(CPPI,"> errno.c") or
-	    die "Cannot open errno.c";
-
-	print CPPI "#include <errno.h>\n";
-
-	close(CPPI);
-
-	# invoke CPP and read the output
-	if ($^O eq 'MSWin32') {
-	    open(CPPO,"$Config{cpprun} $Config{cppflags} errno.c |") or
-		die "Cannot run '$Config{cpprun} $Config{cppflags} errno.c'";
-	} else {
-	    my $cpp = default_cpp();
-	    open(CPPO,"$cpp < errno.c |") or
-		die "Cannot exec $cpp";
-	}
+sub get_errors {
+    open(CPPI,"> errno.c") or
+	die "Cannot open errno.c";
+    
+    print CPPI "#include <errno.h>\n";
+    
+    close(CPPI);
+
+    my $cpp = default_cpp();
+    open(CPPO,"$cpp -dM < errno.c |") or
+	die "Cannot exec $cpp";
 
-	my $pat;
-	if ($^O eq 'MSWin32' and $Config{cc} =~ /^bcc/i) {
-	    $pat = '^/\*\s+(.+)\s+\d+\s*:\s+\*/';
-	}
-	else {
-	    $pat = '^#(?:line)?\s*\d+\s+"([^"]+)"';
-	}
-	while(<CPPO>) {
-	    if ($^O eq 'os2' or $^O eq 'MSWin32') {
-		if (/$pat/o) {
-		   my $f = $1;
-		   $f =~ s,\\\\,/,g;
-		   $file{$f} = 1;
-		}
-	    }
-	    else {
-		$file{$1} = 1 if /$pat/o;
-	    }
-	}
-	close(CPPO);
-    }
-    return keys %file;
+    while(<CPPO>) {
+	$err{$1} = 1
+	    if /^\s*#\s*define\s+(E\w+)\s+/;
+   }
+   close(CPPO);
 }
 
 sub write_errno_pm {
Results 1 - 1 of 1
Help - FTP Sites List - Software Dir.
Search over 15 billion files
© 1997-2017 FileWatcher.com