ws2_32: Include inttypes.h for UINT32_MAX.

Bruno Jesus 00cpxxx at gmail.com
Wed Apr 29 07:13:03 CDT 2015


On Wed, Apr 29, 2015 at 7:22 AM, Francois Gouget <fgouget at free.fr> wrote:
> On Wed, 29 Apr 2015, Henri Verbeet wrote:
> [...]
>> Arguably it shouldn't be using UINT32_MAX at all, since it isn't
>> actually used with uint32_t. I guess it should be using e.g. unsigned
>> int with UINT_MAX instead.
>
> The timeout receives a 64 bit value so using an unsigned int would not
> work. But using UINT_MAX plus the native limits.h can work.

Hi all, I don't really understand why this change was made, windows
uses 4 byte to set and get the value. It's not possible to set a value
higher than 0xffffffff, actually I don't even now if that value is
valid, only tests can tell the truth. Unless this is a very specific
broken application that uses the mysterious unixism hack from
socket.c:

5295             } else if (optlen == sizeof(struct timeval)) {
5296                 WARN("SO_SND/RCVTIMEO for %d bytes: assuming
unixism\n", optlen);

Best wishes,
Bruno



More information about the wine-devel mailing list