On Wed, Jul 30, 2008 at 03:06:54PM -0700, Julien Lerouge
wrote:> On Wed, Jul 30, 2008 at 11:32:18AM -0700, Bill Wendling wrote:
> > On Jul 30, 2008, at 11:17 AM, Julien Lerouge wrote:
> >> ../../../llvm-gcc4.2-src/gcc/libgcc2.c:2095: error: conflicting
types
> >> for 'VirtualProtect'
> >>
> >>
c:/cygwin/home/jlerouge/buildbot/llvm/lib/../include/winbase.h:1998:
> >> error: previous declaration of 'VirtualProtect' was here
> >>
> > This is weird. Why is it #including this header during the bootstrap?
>
> Not sure, I'll take a look. This is not a real bootstrap anyway.
>
> Thanks,
> Julien
>
It took me a while... sorry.
Rev 54193 seems to cause that failure doing a non bootstrap build on
MingW.
$ svn diff -r 54192:54193 libgcc2.c
Index: libgcc2.c
==================================================================--- libgcc2.c
(revision 54192)
+++ libgcc2.c (revision 54193)
@@ -2091,6 +2091,10 @@
#endif
}
+#ifdef __i386__
+extern int VirtualProtect (char *, int, int, int *) __attribute__((stdcall));
+#endif
+
int
mprotect (char *addr, int len, int prot)
{
The attached patch fixes it for me, it just checks that winbase has not
already been included.
Hope this helps,
Julien
--
Julien Lerouge
PGP Key Id: 0xB1964A62
PGP Fingerprint: 392D 4BAD DB8B CE7F 4E5F FA3C 62DB 4AA7 B196 4A62
PGP Public Key from: keyserver.pgp.com
-------------- next part --------------
Index: gcc/libgcc2.c
==================================================================---
gcc/libgcc2.c (revision 54654)
+++ gcc/libgcc2.c (working copy)
@@ -2091,7 +2091,7 @@
#endif
}
-#ifdef __i386__
+#if defined(__i386__) && ! defined(_WINBASE_H)
extern int VirtualProtect (char *, int, int, int *) __attribute__((stdcall));
#endif