build: Probe MSG_DONTWAIT in the same way as MSG_NOSIGNAL
Instead of the WIN32-specific workaround, detect lack of MSG_DONTWAIT
in the build system. This allows other platforms without MSG_DONTWAIT
to work too.
build: cleanup: define MSG_DONTWAIT/MSG_NO_SIGNAL locall
Define MSG_DONTWAIT and MSG_NO_SIGNAL in the implementation files that use them (net.cpp
and netbase.cpp
), instead of compat.h which is included all over the place.
This avoids putting them in the global namespace, as defining them as 0 is a hack that works for our specific usage, but it is not a general solution.
Also makes sure they are defined only once so the !defined(MSG_x)
guard can go.
compat: use unsigned int
instead of u_int
u_int
(without size specifier) is not available on some platforms (not sure what standard it’s supposed to be part of), we don’t use it anywhere else, and it doesn’t hurt to simply write unsigned int
out here.