develooper Front page | perl.perl5.porters | Postings from May 2018

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

Thread Previous
From:
Achim Gratz
Date:
May 2, 2018 18:55
Subject:
Re: [perl #133152] Cygwin build failure with v5.27.11-16-g71e845c342
Message ID:
87fu39opjh.fsf@Rainer.invalid
"Tony Cook via RT" writes:
> 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.

For starters, unless you request strict POSIX/ANSI behaviour from the
compiler, that line of argumentation can't be conclusive.  IIRC, you've
been compiling with GNU_SOURCE at least, so that may already poke holes
in the conformance.  Anyway, whether there is a bug or not I can't
really tell myself and will defer to Yaakov or Eric, who are the Cygwin
experts on these topics.

> 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.

What is nostdio.h useful for anyway?  Just asking.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Samples for the Waldorf Blofeld:
http://Synth.Stromeko.net/Downloads.html#BlofeldSamplesExtra

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