develooper Front page | perl.perl5.porters | Postings from April 2014

[perl #121739] [PATCH] Coverity: don't try using O_BINARY and O_TEXT in non-Windows platforms

Thread Previous
From:
Tony Cook via RT
Date:
April 28, 2014 00:53
Subject:
[perl #121739] [PATCH] Coverity: don't try using O_BINARY and O_TEXT in non-Windows platforms
Message ID:
rt-4.0.18-7175-1398646392-1875.121739-15-0@perl.org
On Sat Apr 26 12:01:06 2014, jhi wrote:
> In non-Windows platforms the O_BINARY and O_TEXT are defined, but with 
> both probably as zeros, which is not very useful if they are being 
> tested with bit-and.  Leads into unreachable code.
> 
> Attached.

I suspect this patch is incorrect, at least for Cygwin.

O_TEXT and O_BINARY on Cygwin do have a meaning, but PERLIO_USING_CRLF is explicitly undefined.

I think a better check would be that O_BINARY or O_TEXT is non-zero.

I can't think of a perl level check to demonstrate the incorrectness.

Tony

---
via perlbug:  queue: perl5 status: new
https://rt.perl.org/Ticket/Display.html?id=121739

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About