develooper Front page | perl.perl5.porters | Postings from February 2015

c3890f9 'add $B::OP::does_parent variable' breaks os390

Thread Next
From:
Karl Williamson
Date:
February 3, 2015 16:18
Subject:
c3890f9 'add $B::OP::does_parent variable' breaks os390
Message ID:
54D0F4B7.1020205@khwilliamson.com
Apparently the 'c99' compiler doesn't like preprocessor stuff (at least 
in xs) in the middle of an argument list:

     sv_setsv(sv,
#ifdef PERL_OP_PARENT
         &PL_sv_yes
#else
         &PL_sv_no
#endif
     );

yields

ERROR CCN3191 B.xs:826   The character # is not a valid C source character.
ERROR CCN3191 B.xs:828   The character # is not a valid C source character.
ERROR CCN3191 B.xs:830   The character # is not a valid C source character.
ERROR CCN3276 B.xs:826   Syntax error: possible missing ')'?
ERROR CCN3045 B.xs:826   Undeclared identifier ifdef.
ERROR CCN3098 B.xs:825   Missing argument(s).
CCN0793(I) Compilation failed for file ./B.c.  Object file not created.


I'm going to try it, changed to:

#ifdef PERL_OP_PARENT
     sv_setsv(sv, &PL_sv_yes);
#else
     sv_setsv(sv, &PL_sv_no);
#endif
}


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