develooper Front page | perl.perl5.porters | Postings from December 2016

Re: [perl #130393] h2xs: Support for _Bool/stdbool.h?

Thread Previous | Thread Next
Stefan Tauner
December 28, 2016 05:59
Re: [perl #130393] h2xs: Support for _Bool/stdbool.h?
Message ID:
On Sun, 25 Dec 2016 11:21:10 -0800
"Dave Mitchell via RT" <> wrote:

> On Fri, Dec 23, 2016 at 07:10:27AM -0800, Stefan Tauner wrote:
> > I have used h2xs for the first time today to start the creation of a
> > Perl package based on a small C library. make failed to build it
> > apparently due to the usage of a bool type for a parameter in one of
> > the library's exported functions resulting in
> > 
> > error: ‘arg1’ undeclared (first use in this function)  
> Can you show us:
> 1) the command-line your are invoking h2xs with;

h2xs -x booltest.h
So this might be a bug in C::Scan (which I have installed via cpanm
from HVDS/C-Scan-0.74)?

> 2) the relevant declarations(s) from the .h file (or even better,
> attach a short stripped down and self-contained .h file that
> reproduces the problem);


    #include <stdbool.h>
    void h2xs(bool b);

With a trivial implementation in booltest.c:

    #include "booltest.h"
    void h2xs(bool b) {

However, the same thing works fine with _Bool instead of bool+stdbool.h.

> 2) attach the output of 'perl -V' for the perl used to execute h2xs.

See attached perl.V

Dipl.-Ing. Stefan Tauner
Research and Development
Embedded Systems Department

University of Applied Sciences Technikum Wien
Hoechstaedtplatz 6, 1200 Vienna, Austria
T: +43 1 333 40 77-316

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