develooper Front page | perl.perl5.porters | Postings from July 2001

AIX 4.3.3 w/ vac 5.0 [ FATAL in B ]

Thread Next
From:
H . Merijn Brand
Date:
July 6, 2001 06:51
Subject:
AIX 4.3.3 w/ vac 5.0 [ FATAL in B ]
Message ID:
20010706153658.BAAF.H.M.BRAND@hccnet.nl
I might be the guy to find out, but I've just upgraded to 4.3.3 with vac 5.0.2
and thought it was a good idea to just run a trial Conf for perl before the
smoke starts, and the build passes for perl itself, but crashes for B:

Mksymlists("NAME" => "B", "DL_FUNCS" => {  }, "FUNCLIST" => [], "DL_VARS" =>
[]);'
../../miniperl -I../../lib -I../../lib ../../lib/ExtUtils/xsubpp  -typemap ../../lib/ExtUtils/typemap -typemap typemap  B.xs > B.xsc && mv B.xsc B.c
../../miniperl -I../../lib -I../../lib -I../../lib -I../../lib defsubs_h.PL defsubs.h
Extracting defsubs.h...
xlc -c  -DDEBUGGING -D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=16384 -DUSE_NATIVE_DLOPEN -I/pro/local/include -q32 -D_LARGE_FILES -qlonglong -O2   -DVERSION=\"a5\" -DXS_VERSION=\"a5\"  -I../..  B.c
"B.c", line 2308.41: 1506-099 (S) Unexpected argument.
"B.c", line 2484.41: 1506-099 (S) Unexpected argument.
"B.c", line 3303.41: 1506-099 (S) Unexpected argument.
make[1]: *** [B.o] Error 1
make[1]: Leaving directory `/pro/3gl/CPAN/perl-5.7.1/ext/B'
make: *** [lib/auto/B/B.so] Error 2

line 2308 is the last sv_setpv in the code below

XS(XS_B__MAGIC_TYPE); /* prototype to pass -Wmissing-prototypes */
XS(XS_B__MAGIC_TYPE)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: B::MAGIC::TYPE(mg)");
    {
	B__MAGIC	mg;
	char	RETVAL;
	dXSTARG;

	if (SvROK(ST(0))) {
	    IV tmp = SvIV((SV*)SvRV(ST(0)));
	    mg = INT2PTR(B__MAGIC,tmp);
	}
	else
	    croak("mg is not a reference");

	RETVAL = MgTYPE(mg);
	sv_setpv(TARG, (char *)&RETVAL, 1); XSprePUSH; PUSHTARG;
    }
    XSRETURN(1);
}

IIRC, sv_setpv () requires two arguments, and sv_setpvn requires three. I'm no
XS expert, but this is wrong, and has nothing to do with AIX or vac

-- 
H.Merijn Brand    Amsterdam Perl Mongers (http://www.amsterdam.pm.org/)
using perl-5.6.1, 5.7.1 & 626 on HP-UX 10.20 & 11.00, AIX 4.2, AIX 4.3,
     WinNT 4, Win2K pro & WinCE 2.11 often with Tk800.022 &/| DBD-Unify
ftp://ftp.funet.fi/pub/languages/perl/CPAN/authors/id/H/HM/HMBRAND/


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