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

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

Thread Previous | Thread Next
From:
Stefan Tauner
Date:
December 28, 2016 05:59
Subject:
Re: [perl #130393] h2xs: Support for _Bool/stdbool.h?
Message ID:
20161227194710.051966de@tauner-w510
On Sun, 25 Dec 2016 11:21:10 -0800
"Dave Mitchell via RT" <perlbug-followup@perl.org> 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);

booltest.h:

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

With a trivial implementation in booltest.c:

    #include "booltest.h"
    void h2xs(bool b) {
        (void)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

KR
-- 
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
E: stefan.tauner@technikum-wien.at
I: embsys.technikum-wien.at
I: www.technikum-wien.at

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