ws2_32: Include inttypes.h for UINT32_MAX.

Jacek Caban jacek at codeweavers.com
Wed Apr 29 09:20:50 CDT 2015


On 04/29/15 15:50, Bruno Jesus wrote:
> On Wed, Apr 29, 2015 at 10:44 AM, Jacek Caban <jacek at codeweavers.com> wrote:
>> When setting the timeout, the value may be rounded. If it's rounded up
>> from 0xffffffff, the value will not fit in 32-bit unsigned type. It's
>> not theoretical, I've seen this happening.
> Hi, Jacek. Thanks for the reply, so why can't we take care of the
> overflow inside the helper function and still return an ULONG to
> callers?

Its callers accept different types. getsockopt uses unsigned type, so it
may handle all values up to 0xffffffff. In case of sendto and recv_base,
we need to pass it to poll, which accepts signed types. That's why I
left handling overflows to callers.

Jacek



More information about the wine-devel mailing list