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

Re: [perl #133152] Cygwin build failure with v5.27.11-16-g71e845c342

Thread Previous | Thread Next
From:
Dave Mitchell
Date:
April 23, 2019 15:23
Subject:
Re: [perl #133152] Cygwin build failure with v5.27.11-16-g71e845c342
Message ID:
20190423152354.GI6612@iabyn.com
On Tue, May 01, 2018 at 06:50:13PM -0700, Tony Cook via RT wrote:
> There's two issues here:
> 
> 1) cygwin declares fgetws() when stdlib.h is included, but that name isn't reserved to the implementation unless wchar.h is included (C11 7.1.3)
> 
> So a C program that defines a fgetws() function but doesn't include wchar.h would be conforming, but this would break if stdlib.h is included, making cygwin non-conforming.
> 
> But I wouldn't be too surprised to find other implementations leak in similar ways.
> 
> 2) Perl includes wchar.h which uses the FILE type (you're meant to #include stdio.h to use the I/O functions with the C standard[2], but POSIX requires wchar.h to define the FILE type), but nostdio.h defines a macro FILE, using a named reserved to the implementation[1].
> 
> I think the real fix is probably to eliminate nostdio.h - its use of reserved names leads to random issues as we update perl and as platforms update their implementations.
> 
> The attached patch doesn't remove nostdio.h, it just prevents perlio.h from including it.
> 

I propose that this ticket be moved from the 5.30.0 to the 5.32.0 blockers
list.


-- 
This email is confidential, and now that you have read it you are legally
obliged to shoot yourself. Or shoot a lawyer, if you prefer. If you have
received this email in error, place it in its original wrapping and return
for a full refund. By opening this email, you accept that Elvis lives.

Thread Previous | Thread Next


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