develooper Front page | perl.perl5.porters | Postings from November 2000

Re: [ID 20001109.006] [ failure notice]

Thread Previous
Nick Ing-Simmons
November 10, 2000 02:17
Re: [ID 20001109.006] [ failure notice]
Message ID:
Jens Hamisch <jens@Strawberry.COM> writes:
>Sun Forte C 6.0  compiler ...
>The problem is present on Sparc with 64 bit enabled. I cannot
>reproduce the problem on Intel 32 bit Solaris using the same
>version of that compiler! Unfortunatelly my SOCKS lib is 64 bit
>only, so i cannot try Perl + Socks + 32bit on Sparc.
>SOCKS uses the real getc for non-socket operations and read(2) for
>sockets. So if everything is ANSI, read(2) also should take care
>of things put back to the stream using ungetc, right?

Wrong. read() knows nothing at all about stdio level.

You can fake 'ungetc' at the unix read level if you can lseek
the stream (which is what PerlIO_unix attempts) but you cannot seek a 
socket. One may be able to do something clever with STREAMS module 

The "plan" (as yet unimplemented) for perlio is to have a temporary
"layer" with the un-gotten chars push itself into the stack - which is 
a better fix for this case.

Nick Ing-Simmons <>
Via, but not speaking for: Texas Instruments Ltd.

Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About