On Sat, Jun 19, 2010 at 01:20:12PM +1000, Sisyphus wrote:

> The problem is this piece of code in ExtUtils::ParseXS:
> 
> #################################
> /* prototype to pass -Wmissing-prototypes */
> STATIC void
> S_croak_xs_usage(pTHX_ const CV *const cv, const char *const params);
> 
> STATIC void
> S_croak_xs_usage(pTHX_ const CV *const cv, const char *const params)
> {
> .................
> ################################
> 
> That code gets copied verbatim into PerlNatives.c but, according to the 
> MinGW port of gcc-3.4.5, it contains the above syntax errors. It seems that 
> 'STATIC void' is a syntax error - which can be fixed by removing the 
> 'STATIC' in both places in ParseXS.pm. But I haven't yet found a solution 
> to the syntax errors in "S_croak_xs_usage(pTHX_ const CV *const cv, const 
> char *const params)". (These are the "syntax error before "const"" errors.)
> 
> Anyone here know what's needed ?

perl.h:#define STATIC static

Likewise, pTHX_ is defined in perl's headers.

The errors are consistent with not including (at least) perl.h
Or the *right* perl.h

Does this code compile cleanly on other systems?

Nicholas Clark

Reply via email to