Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

perlio.c breaks on Solaris/gcc when > 256 FDs are available

3 views
Skip to first unread message

Alan Burlison

unread,
Apr 5, 2006, 10:52:14 AM4/5/06
to Perl 5 Porters, Casper Dik
Hi,

I've already discussed this on #p5p, but here's a brief recap:

An upcoming change in Solaris will allow 32-bit processes to use more
than 256 stdio filehandles. However with the stdio change in place and
when Solaris is built with gcc, perlio fails to build.

The offending block in PerlIOStdio_invalidate_fileno() is guarded with
"defined(__sun__)". Forte doesn't actually define that symbol, so for
any perl built with Forte the result returned by
PerlIOStdio_invalidate_fileno() is always zero. When built with gcc the
block won't work in any case when FDs > 256 are available.

There are a number of other issues in this code and also in
PerlIOStdio_close(). I'll send a detailed follow-up mail with a list of
issues, but for the meantime here is the proposed patch.

Ta,

--
Alan Burlison
--

perlio.patch

Rafael Garcia-Suarez

unread,
Apr 5, 2006, 10:44:54 AM4/5/06
to Alan Burlison, Perl 5 Porters, Casper Dik
Alan Burlison wrote:
> Hi,
>
> I've already discussed this on #p5p, but here's a brief recap:
>
> An upcoming change in Solaris will allow 32-bit processes to use more
> than 256 stdio filehandles. However with the stdio change in place and
> when Solaris is built with gcc, perlio fails to build.
>
> The offending block in PerlIOStdio_invalidate_fileno() is guarded with
> "defined(__sun__)". Forte doesn't actually define that symbol, so for
> any perl built with Forte the result returned by
> PerlIOStdio_invalidate_fileno() is always zero. When built with gcc the
> block won't work in any case when FDs > 256 are available.

Thanks, applied as change #27722 to bleadperl.

0 new messages