Ticket #518 (closed patch: fixed)

Opened 8 years ago

Last modified 8 years ago

[PATCH] Add some constants for sockets

Reported by: bacek Owned by:
Priority: normal Milestone:
Component: none Version:
Severity: medium Keywords:
Cc: Language:
Patch status: applied Platform:



Attached patch adds few constants to use with Socket API.

-- Bacek


socket5.patch Download (3.9 KB) - added by bacek 8 years ago.
Better patch

Change History

Changed 8 years ago by Infinoid

  • patch set to new

Hi! Thanks for the patch.

Your use of magic numbers in the Socket_Protocol_Family enum (and possibly the other enums) will compile cleanly everywhere, but those numbers are very unlikely to all be the same on all platforms. For instance, PF_INET6 is not 10 on mingw32, it's 23.

I would eventually like to add support for lots of other protocols (like sctp, netlink and tipc) which are only available on specific platforms. So I think we're probably going to have to keep a big list of constants and probe to see which ones are available at configure time...

Changed 8 years ago by bacek

Better patch

Changed 8 years ago by bacek


I've updated patch to clearly separate Parrot's PIO_PF_* constants and system-specific PF_* constants.

-- Bacek

Changed 8 years ago by Infinoid

  • status changed from new to closed
  • resolution set to fixed
  • patch changed from new to applied

Thanks, applied in r37827. I fixed some build issues, warnings and documentation stuff related to this in r37829.

Note: See TracTickets for help on using tickets.