X-Git-Url: http://www.lcore.org/git/lcore.git/blobdiff_plain/51075d051580863ca073aa91883357410b358e40..ba45339b0cda696438a3b1553c829445fd894641:/binipstuff.pas?ds=inline diff --git a/binipstuff.pas b/binipstuff.pas index 227c6f4..1d7a7c2 100644 --- a/binipstuff.pas +++ b/binipstuff.pas @@ -78,8 +78,8 @@ type Adding "4" to non IPv6 record names improves code clarity } {$ifndef mswindows} - {zipplet 20170204: Do we still need to support ver1_0? Perhaps a cleanup is in order. - For now keep supporting it for compatibility. } + //zipplet 20170204: Do we still need to support ver1_0? Perhaps a cleanup is in order. + //For now keep supporting it for compatibility. {$ifdef ver1_0} cuint16 = word; cuint32 = dword; @@ -91,7 +91,7 @@ type family:Word; port :Word; addr :uint32; - pad :array [0..7] of byte; {zipplet 20170204 - originally this was 1..8 for some reason} + pad :array [0..7] of byte; //zipplet 20170204 - originally this was 1..8 for some reason end; {$ifdef ipv6} @@ -104,7 +104,7 @@ type end; {$endif} - {zipplet 20170204: I did not rename the unioned record. We might want to rename this to TLinetSockAddrv } + //zipplet 20170204: I did not rename the unioned record. We might want to rename this to TLinetSockAddrv TinetSockAddrv = packed record case integer of 0: (InAddr:TLInetSockAddr4); @@ -300,7 +300,10 @@ begin {$endif} {try v4} - binip.ip := htonl(longip(s)); + // zipplet: htonl() expects a uint32 but longip() spits out longint. + // Because longip() is deprecated, we do not fix it but typecast. + //binip.ip := htonl(longip(s)); + binip.ip := htonl(uint32(longip(s))); if (binip.ip <> 0) or (s = '0.0.0.0') then begin result := true; binip.family := AF_INET;