From: Gurusamy Sarathy Date: Mon, 6 Jul 1998 03:18:34 +0000 (+0000) Subject: added Errno-1.09 from CPAN X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=dcbf900d7d1e3acbd42fd197ca43b0503d541efd;p=p5sagit%2Fp5-mst-13.2.git added Errno-1.09 from CPAN p4raw-id: //depot/perl@1332 --- diff --git a/ext/Errno/ChangeLog b/ext/Errno/ChangeLog index a1d36e2..2bfa003 100644 --- a/ext/Errno/ChangeLog +++ b/ext/Errno/ChangeLog @@ -1,3 +1,19 @@ +Change 170 on 1998/07/05 by (Graham Barr) + + Fixed three problems reported by Hans Mulder for NeXT + + - Errno_pm.PL does not recognize #define lines because they have + whitespace before the '#'. ANSI does not allow that in portable + code; that didn't stop the author of NeXT's . + + - Cpp output lines look like this: #1 "errno.c" + Errno_pm.PL does not recognize that format; it wants whitespace + before the line number. + + - Cpp does a syntax check on files with names ending in ".c"; it + reports fatal errors on input lines like: "ENOSYS" [[ENOSYS]] + Workaround: use $Config{cppstdin}, like Errno 1.04 did. + Change 160 on 1998/06/27 by (Graham Barr) - Added patch from Sarathy to support Win32 diff --git a/ext/Errno/Errno_pm.PL b/ext/Errno/Errno_pm.PL index dc17b45..1cb55e1 100644 --- a/ext/Errno/Errno_pm.PL +++ b/ext/Errno/Errno_pm.PL @@ -5,7 +5,7 @@ use strict; use vars qw($VERSION); -$VERSION = "1.08"; +$VERSION = "1.09"; my %err = (); @@ -38,7 +38,7 @@ sub process_file { } while() { $err{$1} = 1 - if /^\s*#\s*define\s+(E\w+)\s+/; + if /^\s*#\s*define\s+(E\w+)\s+/; } close(FH); } @@ -99,14 +99,17 @@ sub write_errno_pm { close(CPPI); # invoke CPP and read the output + if ($^O eq 'VMS') { my $cpp = "$Config{cppstdin} $Config{cppflags} $Config{cppminus}"; $cpp =~ s/sys\$input//i; open(CPPO,"$cpp errno.c |") or die "Cannot exec $Config{cppstdin}"; - } elsif ($^O eq 'next') { + } elsif($^O eq 'next') { + # NeXT will do syntax checking unless it is reading from stdin my $cpp = "$Config{cppstdin} $Config{cppflags} $Config{cppminus}"; - open(CPPO,"$cpp < errno.c |") or die "Cannot exec $cpp"; + 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}";