Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: RawIP compile problems

by tachyon (Chancellor)
on Dec 31, 2004 at 06:49 UTC ( [id://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

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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://418480]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (6)
As of 2024-04-18 07:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found