httpd-apreq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Schaefer <joe+gm...@sunstarsys.com>
Subject Re: libapreq2-2.04-dev release candidate #2
Date Sun, 29 Aug 2004 01:05:57 GMT
Stas Bekman <stas@stason.org> writes:

> why does it fail on configure:
> 
> Can't locate ExtUtils/XSBuilder.pm in @INC (@INC contains:
> /home/stas/perl/5.8.5-ithread/lib/5.8.5/i686-linux-thread-multi
> /home/stas/perl/5.8.5-ithread/lib/5.8.5
> /home/stas/perl/5.8.5-ithread/lib/site_perl/5.8.5/i686-linux-thread-multi
> /home/stas/perl/5.8.5-ithread/lib/site_perl/5.8.5
> /home/stas/perl/5.8.5-ithread/lib/site_perl .) at build/version_check.pl line
> 14.
> configure: error: Bad ExtUtils::XSBuilder version
> 
> I wonder, is it possible to have the release package have all the xs code
> pre-generated? why requiring users to have something they don't really need.

Stas, it's listed as a prerequisite in the PREREQUISITES file.
So is Apache::Test, which is something most users don't need either.
It would be great if someone fixed this also before 2.05.

[...]

> 
> in the argument:
> 
>    name ? strlen(name) : 0
> 
> for some reason the compiler tries to pass NULL to strlen (I suppose a
> compile timeoptimization). Hence the warning of a non-null argument.

Right.

> 
> I'm not sure how to fix that, besides dropping that macro or making a
> special case for MAKE:

[...]

>   #define apreq_xs_table2sv(t,class,parent,name,tainted)          \
> -     apreq_xs_table_c2perl(aTHX_ t, name, name ? strlen(name) : 0, class,
> parent, tainted)
> +    apreq_xs_table_c2perl(aTHX_ t, name, strlen(name), class, parent, tainted)
> +#define apreq_xs_table2sv2(t,class,parent,tainted)                      \
> +    apreq_xs_table_c2perl(aTHX_ t, NULL, 0, class, parent, tainted)
> 
> 
>   #define APREQ_XS_DEFINE_TABLE_MAKE(attr,pkg)                            \
> @@ -112,7 +114,7 @@
>       parent = SvRV(ST(1));                                               \
>       env = (void *)SvIVX(parent);                                        \
>       t = apr_table_make(apreq_env_pool(env), APREQ_NELTS);               \
> -    sv = apreq_xs_table2sv(t, class, parent, pkg, SvTAINTED(parent));   \
> +    sv = apreq_xs_table2sv2(t, class, parent, SvTAINTED(parent));       \


No, that won't work- pkg is usually not NULL here.  If anything, try
convincing the compiler to get it right by rewriting the conditional 
in the macro to *look* more like a conditional:

#define apreq_xs_table2sv(t,class,parent,name,tainted)            \
        apreq_xs_table_c2perl(aTHX_ t, name,                      \
                             ((name != NULL) ? strlen(name) : 0), \
                              class, parent, tainted)

-- 
Joe Schaefer


Mime
View raw message