On Mon, 12 May 2014, Marco van de Voort wrote:
In our previous episode, Michael Van Canneyt said:
HostToNet is only defined for in_addr and longint, and s_addr is cuint32.
On all platforms ?
Strange then that this error didn't happen before.
Well, a simple typecast will solve this.
They are old, and carry this comment:
{ these for are for netdb legacy compat}
IIRC they were kept for 1.0.x compatibility, and the 32-bit unsigned support
of that was not so great. Moreover I didn't care enough to deprecate them,
but maybe we should.
Eh, what are you talking about ? HostToNet ?
The 'On all platforms' was referring to 's_addr is cuint32'.
The newer (1.9.2+) htons etc functions (introduced with that name for Kylix
compat) are unsigned.
We could deprecate HostToNet and let it call htons.
Michael.
_______________________________________________
fpc-devel maillist - [email protected]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel