-
Notifications
You must be signed in to change notification settings - Fork 138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add getprotobyname to Socket PMCs #606
Comments
4974 byte attachment from ocharles [malformed patch deleted, read the patch link above or the Git commit below] |
5626 byte attachment from ocharles [malformed patch deleted, read the patch link above] |
Adds getprotobyname to Socket |
Attached is a version of getprotobyname using the "socket_ops" dynop library - I think this is considerably better than adding it the PMC |
Hello. Second patch it really good. We just need someone on Win32 to complete it. -- Bacek. |
It looks like the new file src/dynoplibs/socket.ops is missing from the second patch. But I think the first approach is also OK. |
Looks like this patch never made it in. @ocharles any way you can provide an updated patch? We really would like get_proto_by_name ! We are on Git now, so it should be less painful :) |
Thanks for the ping @leto, I'll see what I can do... leave this open, but no promises until the new year :) |
Just ported over the slightly bitrotten patch. Not sure if the code works. It needs some tests and some platform-specific bits for Windows and other non-Unixy flavors. |
Looks like netdb.h doesn't get included early enough:
|
The first is solved with
Now the macro PIO_GET_PROTO_BY_NAME is missing . I'll rewrite it, the layout is suboptimal. |
Put it into platform/generic/socket.c
I couldn't see any implementation of getprotobyname which seems like a standard function that should be available. This adds it to Socket PMCs.
I'm not entirely sure this is the correct approach - because normally you'd call this before creating a socket object. For PIR this is OK, but in something like Perl 6 this will create a Socket object to call getprotobyname, then destroy it, then probably create another one straight after.
Anyway, this is the best I could come up with given my extremely limited knowledge of Parrot - please advise!
Originally http://trac.parrot.org/parrot/ticket/1724
The text was updated successfully, but these errors were encountered: