This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: GNAT building fails on MinGW wiith gcc-4.6.020100904 weekly snapshot
- From: Florian Weimer <fw at deneb dot enyo dot de>
- To: koala01 <koala01 at free dot fr>
- Cc: gcc at gcc dot gnu dot org
- Date: Sun, 12 Sep 2010 10:47:15 +0200
- Subject: Re: GNAT building fails on MinGW wiith gcc-4.6.020100904 weekly snapshot
- References: <4C898AC2.3050707@free.fr> <8762ybicex.fsf@mid.deneb.enyo.de>
* Florian Weimer:
> Can you look at the generated s-soscons.ads file? I suspect that the
> default
>
> #ifndef MSG_WAITALL
> # define MSG_WAITALL -1
> #endif
> CND(MSG_WAITALL, "Wait for full reception")
>
> kicks in and sets MSG_WAITALL to -1.
>
> Debian's mingw hasn't got the MSG_WAITALL #define, either. It seems
> that "8" would be the correct value.
It turns out that MSG_WAITALL is not actually available on older
Windows (it was introduced in Windows Server 2003). That's why mingw
and cygwin do not include the #define; it would break application
compatibility with Windows XP.
Does the following patch help?
diff --git a/gcc/ada/g-socthi-mingw.adb b/gcc/ada/g-socthi-mingw.adb
index 727a69d..697425e 100644
--- a/gcc/ada/g-socthi-mingw.adb
+++ b/gcc/ada/g-socthi-mingw.adb
@@ -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;