Hello, 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. Regards, Kai
Index: gcc/gcc/ada/g-socthi-mingw.adb =================================================================== --- gcc.orig/gcc/ada/g-socthi-mingw.adb 2010-09-09 16:07:42.000000000 +0200 +++ gcc/gcc/ada/g-socthi-mingw.adb 2011-03-28 09:42:45.039326300 +0200 @@ -277,7 +277,8 @@ package body GNAT.Sockets.Thin is use type C.size_t; 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 Res : C.int; Index: gcc/gcc/ada/s-oscons-tmplt.c =================================================================== --- gcc.orig/gcc/ada/s-oscons-tmplt.c 2010-12-24 11:41:57.000000000 +0100 +++ gcc/gcc/ada/s-oscons-tmplt.c 2011-03-28 09:15:39.683932300 +0200 @@ -1084,6 +1084,10 @@ CND(MSG_PEEK, "Peek at incoming data") CND(MSG_EOR, "Send end of record") #ifndef MSG_WAITALL +#ifdef __MINWGW32__ +/* We use it on windows native targets, so set to flag value. */ +# define MSG_WAITALL (1 << 3) +#else # define MSG_WAITALL -1 #endif CND(MSG_WAITALL, "Wait for full reception")