[patch ada]: Fix MSG_WAITALL handling for windows native targets
Arnaud Charlet
charlet@adacore.com
Mon Mar 28 11:06:00 GMT 2011
Kai,
Here are Thomas comments on your patch:
--
> Split submitted patch from thread "[patch ada]: Fix issues about
> multilib build of native windows and handle MSG_WAITALL for windows
> native targets"
> into separate ones.
>
> ChangeLog gcc/ada (ada_wt.txt)
>
> 2011-03-28 Kai Tietz
>
> * g-socthi-mingw.adb (C_Recvmsg): Handle MSG_WAITALL for
> windows native targets.
> * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows
> targets to flag value.
> Fill : constant Boolean :=
> - (C.unsigned (Flags) and SOSC.MSG_WAITALL) /= 0;
> + SOSC.MSG_WAITALL /= -1
> + and then (C.unsigned (Flags) and SOSC.MSG_WAITALL) /= 0;
> -- Is the MSG_WAITALL flag set? If so we need to fully fill all vectors
Not sure about this. The other change (to s-oscons-tmplt.c) causes
SOSC.MSG_WAITALL to always be defined to 8 in the Windows case, so the
new test against -1 (which would have been relevant without the other
change) now becomes redundant.
> #ifndef MSG_WAITALL
> +#ifdef __MINWGW32__
> +/* We use it on windows native targets, so set to flag value. */
> +# define MSG_WAITALL (1 << 3)
> +#else
The comment is completely meaningless and should be rewritten. In
particular a note should be added to explain why this will work even
though MSG_WAITALL is not defined in the Winsock header files.
More information about the Gcc-patches
mailing list