Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: RawIP compile problems

by tachyon (Chancellor)
on Dec 31, 2004 at 06:49 UTC ( #418480=note: print w/ replies, xml ) Need Help??


in reply to RawIP compile problems

It works for me on linux but I think your compiler may be choking on an extended line in RawIP.xs:

sv_catpvn(ip_opts,SvPV(*av_fetch(opts,i+2,0),l), SvCUR(*av_fetch(opts,i+2,0))); break; default: } /* reported error line 444 */ sv_catpvn(ip_opts,SvPV(*av_fetch(opts,i+2,0),l), SvCUR(*av_fetch(opts,i+2,0))); break; default: } /* reported error line 543 */

Basically the code before the first two errors (which will be fatal unlike the warnings) is just a loop with a switch statement in it. I have a feeling that your compiler does not like the sv_catpvn(...) being on two lines without a \ line continuation. Try changing it to:

sv_catpvn(ip_opts,SvPV(*av_fetch(opts,i+2,0),l),SvCUR(*av_fetch(opts,i ++2,0))); # or sv_catpvn(ip_opts,SvPV(*av_fetch(opts,i+2,0),l), \ SvCUR(*av_fetch(opts,i+2,0)));

cheers

tachyon


Comment on Re: RawIP compile problems
Select or Download Code
Replies are listed 'Best First'.
Re^2: RawIP compile problems
by Anonymous Monk on Dec 31, 2004 at 11:45 UTC
    I have the feeling the compiler doesn't like the default:, with nothing following it. The compiler choking over a newline seems too far fetched - nor does the error message suggest anything like that. On the other hand, error: label at end of compound statement strongly suggests the problem lies with a label at the end of a compound statement. Like default:.

    I'd try default: ;, or default: break;, or if that doesn't work, removing the default lines.

      I had the same problem. '%s/default:/default: ;/g' in vi fixed it. Thanks!

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://418480]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (15)
As of 2015-07-07 20:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (93 votes), past polls