summaryrefslogtreecommitdiff
path: root/ext/Errno
diff options
context:
space:
mode:
authorGraham Barr <gbarr@pobox.com>1998-09-28 04:41:49 -0500
committerGurusamy Sarathy <gsar@cpan.org>1998-10-02 02:21:52 +0000
commit6ad8d9a8419883f07cb9bb1b592427ebd1ee0ef4 (patch)
tree88e9a847205aafa1402ae4c336c25b71476521bc /ext/Errno
parent5e5f18aa0018db0d2a1a3299ac5c782f513cdf40 (diff)
downloadperl-6ad8d9a8419883f07cb9bb1b592427ebd1ee0ef4.tar.gz
applied patches, but retained old behavior for win32 (where compilers
can't read from stdin at all) Date: Mon, 28 Sep 1998 09:41:49 -0500 Message-ID: <19980928094149.B26576@asic.sc.ti.com> Subject: Re: 5.005_51 Errno invokes cpprun incorrectly -- Date: Tue, 29 Sep 1998 12:35:43 -0500 Message-ID: <19980929123543.Z26576@asic.sc.ti.com> Subject: Re: 5.005_51 Errno invokes cpprun incorrectly p4raw-id: //depot/perl@1907
Diffstat (limited to 'ext/Errno')
-rw-r--r--ext/Errno/Errno_pm.PL26
1 files changed, 16 insertions, 10 deletions
diff --git a/ext/Errno/Errno_pm.PL b/ext/Errno/Errno_pm.PL
index f4d50206b5..0d3ca75085 100644
--- a/ext/Errno/Errno_pm.PL
+++ b/ext/Errno/Errno_pm.PL
@@ -4,7 +4,7 @@ use strict;
use vars qw($VERSION);
-$VERSION = "1.09";
+$VERSION = "1.111";
my %err = ();
@@ -31,7 +31,9 @@ sub process_file {
}
} else {
unless(open(FH,"< $file")) {
- warn "Cannot open '$file'";
+ # This file could be a temporay file created by cppstdin
+ # so only warn under -w, and return
+ warn "Cannot open '$file'" if $^W;
return;
}
}
@@ -65,9 +67,14 @@ sub get_files {
close(CPPI);
# invoke CPP and read the output
-
- open(CPPO,"$Config{cpprun} $Config{cppflags} errno.c |") or
- die "Cannot exec $Config{cpprun}";
+ 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 = "$Config{cppstdin} $Config{cppflags} $Config{cppminus}";
+ open(CPPO,"$cpp < errno.c |") or
+ die "Cannot exec $cpp";
+ }
my $pat;
if ($^O eq 'MSWin32' and $Config{cc} =~ /^bcc/i) {
@@ -107,14 +114,13 @@ sub write_errno_pm {
$cpp =~ s/sys\$input//i;
open(CPPO,"$cpp errno.c |") or
die "Cannot exec $Config{cppstdin}";
- } elsif(!$Config{'cpprun'} or $^O eq 'next') {
- # NeXT will do syntax checking unless it is reading from stdin
+ } elsif ($^O eq 'MSWin32') {
+ open(CPPO,"$Config{cpprun} $Config{cppflags} errno.c |") or
+ die "Cannot run '$Config{cpprun} $Config{cppflags} errno.c'";
+ } else {
my $cpp = "$Config{cppstdin} $Config{cppflags} $Config{cppminus}";
open(CPPO,"$cpp < errno.c |")
or die "Cannot exec $cpp";
- } else {
- open(CPPO,"$Config{cpprun} $Config{cppflags} errno.c |") or
- die "Cannot exec $Config{cpprun}";
}
%err = ();