Adding "4" to non IPv6 record names improves code clarity }\r
\r
{$ifndef mswindows}\r
- {zipplet 20170204: Do we still need to support ver1_0? Perhaps a cleanup is in order.\r
- For now keep supporting it for compatibility. }\r
+ //zipplet 20170204: Do we still need to support ver1_0? Perhaps a cleanup is in order.\r
+ //For now keep supporting it for compatibility.\r
{$ifdef ver1_0}\r
cuint16 = word;\r
cuint32 = dword;\r
family:Word;\r
port :Word;\r
addr :uint32;\r
- pad :array [0..7] of byte; {zipplet 20170204 - originally this was 1..8 for some reason}\r
+ pad :array [0..7] of byte; //zipplet 20170204 - originally this was 1..8 for some reason\r
end;\r
\r
{$ifdef ipv6}\r
end;\r
{$endif}\r
\r
- {zipplet 20170204: I did not rename the unioned record. We might want to rename this to TLinetSockAddrv }\r
+ //zipplet 20170204: I did not rename the unioned record. We might want to rename this to TLinetSockAddrv\r
TinetSockAddrv = packed record\r
case integer of\r
0: (InAddr:TLInetSockAddr4);\r
{$endif}\r
\r
{try v4}\r
- binip.ip := htonl(longip(s));\r
+ // zipplet: htonl() expects a uint32 but longip() spits out longint.\r
+ // Because longip() is deprecated, we do not fix it but typecast.\r
+ //binip.ip := htonl(longip(s));\r
+ binip.ip := htonl(uint32(longip(s)));\r
if (binip.ip <> 0) or (s = '0.0.0.0') then begin\r
result := true;\r
binip.family := AF_INET;\r