Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

Re: Re: fcntl() madness with C and perl

by Anonymous Monk
on Jan 19, 2003 at 04:41 UTC ( [id://228121]=note: print w/replies, xml ) Need Help??

in reply to Re: fcntl() madness with C and perl
in thread fcntl() madness with C and perl

I think you're right that the pack is the problem and wanted to add that even a link to 's s l l l' working won't be useful since the lengths of the data types of a struct flock are not standard. Some systems use 64 bits for file offsets and those definitely won't work with 'l' in pack (which is always 32 bits), but 'q' might.
  • Comment on Re: Re: fcntl() madness with C and perl

Replies are listed 'Best First'.
Re: Re: Re: fcntl() madness with C and perl
by pg (Canon) on Jan 19, 2003 at 05:46 UTC
    I agree with you on this, but if the perl and c program are compiled under the same setting, most likely this is not a problem. But you are right, this is definitely something should be taken care of.

    The original perl code actually does not import constants defined in FCntl properly. That is a big problem, and messed up the values he tried to set in the lock structure. You can not simply say "use FCntl", as FCntl does not export those contants by default.

    His pack format might be wrong, but I cannot say that for sure. Although his pack format is different from mine, but as you said, that might matches the lock structure on his computer. That's up to darkomen to check.

Log In?

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (3)
As of 2024-06-12 19:10 GMT
Find Nodes?
    Voting Booth?

    No recent polls found

    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.