Closed komh closed 11 months ago
Yes, this is intentional, see https://github.com/bitwiseworks/libc/issues/63. The current definition is expected by POSIX and many modern software. The (in)compatibility with the very old OS/2 TCP/IP headers is really not a big issue, see also #137.
I'm worrying about binary compatibility. If a value of socklen_t is larger than 2^31 - 1, OS/2 TCP/IP will accept it as a negative value. Is this not a problem?
This isn't actually a problem. The OS/2 TCP/IP stack is 16-bit, so the largest possible number it can operates is 2^16-1 (65535). Also, even if it were 32-bit, it's impossible to imagine it operating a 2GB buffer (2^31-1) — you will rarely (if at all) get a single memory region from OS/2 that large.
Hi/2.
OS/2 TCP/IP uses
int
forsocklen_t
. However, LIBCn typedefssocklen_t
asunsigned int
here:https://github.com/bitwiseworks/libc/blob/b246be5f6d3d9ff751e1d527dc3a945fbaf1ed76/src/emx/include/sys/_types.h#L71
Is this mismatch intentional ?