From: John E. Malmberg [mailto:[EMAIL PROTECTED]
> The script 03examples.t is failing at test 1 because the includes seem
> to be set wrong for VMS.
>
> --- ext/compress/zlib/t/03examples_t.blead Sun Jul 31 22:54:06 2005
> +++ ext/compress/zlib/t/03examples.t Sun Jul 31 22:54:12 2005
> @@ -42,7 +42,7 @@
>
> my $Inc = '' ;
> if ($^O eq 'VMS') {
> - $Inc = '-"I[.blib.lib]" -"I[.blib.arch]"';
> + $Inc = '-"I[-.lib]" -"I[-.arch]"';
> }
> elsif ($^O eq 'MSWin32') {
> foreach (@INC)
Is this the layout needed for running these tests when Compress::Zlib is in
the core only? Is the use of blib still valid for the case when C::Z is
built on VMS away from the core?
> This gets the script passing up to test 10 which causes the subsequent
> tests to fail.
Test 10 triggers the perl interface to the zlib function gzdopen. This is
one of the non-portable hot-spots in Compress::Zlib (and is reworked
completely in the next version of Compress::Zlib).
> DB<5> x `$Perl $Inc ${examples}/gzstream <$file1 >$file2 2>$stderr`
>
> The error captured in the file $stderr is:
>
> EAGLE> type err.out
> Cannot open stdout: invalid argument
> %C-F-EINVAL, invalid argument
>
> The value for stdout should have been the filename hello2.gz, and there
> should be nothing illegal about that. I will need to chase that down
> later, if someone else does not find the fix before this.
Unless VMS works completely differently to Unix-land, that isn't the case.
The code that is triggering the error is this:
my $gz = gzopen(\*STDOUT, "wb")
or die "Cannot open stdout: $gzerrno\n" ;
I'm passing the STDOUT filehandle into gzopen, not the "hello2.gz" filename.
That in turn calls this code in Zlib.pm (where $file is the STDOUT
filehandle)
IO::Handle::flush($file) ;
my $offset = tell($file) ;
gzdopen_(fileno($file), $mode, $offset) ;
The gzdopen_ call is where I interface to the zlib gzdopen 'C' function.
Does VMS allow this messing with the STDOUT filehandle?
Paul
___________________________________________________________
To help you stay safe and secure online, we've developed the all new Yahoo!
Security Centre. http://uk.security.yahoo.com