Committed as obvious.
This was already in my sources (for another reason) when I tested Kai's patch.
Sorry for not noticing.
Danny
* libgcc2.c [L_trampoline]: Remove unnecessary prototype for
Windows VirtualProtect function.
Index: libgcc2.c
===================================================================
--- libgcc2.c (revision 134329)
+++ libgcc2.c (working copy)
@@ -2058,10 +2058,6 @@
#endif
}
-#ifdef __i386__
-extern int VirtualProtect (char *, int, int, int *) __attribute__((stdcall));
-#endif
-
int
mprotect (char *addr, int len, int prot)
{
> -----Original Message-----
> From: FX [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, 16 April 2008 12:28 a.m.
> To: GCC Development; Danny Smith
> Subject: Bootstrap failure on native mingw32
>
>
> I'm not exactly sure how this one was introduced, but a bootstrap on
> native i686-pc-mingw32 dies in stage1 libgcc with:
>
> ../../../trunk/libgcc/../gcc/libgcc2.c:2052: warning: no previous
> prototype for 'getpagesize'
> ../../../trunk/libgcc/../gcc/libgcc2.c:2062: error: conflicting types
> for 'VirtualProtect'
> c:/MinGW/include/winbase.h:1995: error: previous declaration of
> 'VirtualProtect' was here
> ../../../trunk/libgcc/../gcc/libgcc2.c:2066: warning: no previous
> prototype for 'mprotect'
>
> The prototype for VirtualProtect in libgcc2.c is:
> extern int VirtualProtect (char *, int, int, int *)
> __attribute__((stdcall));
>
> In <winbase.h>, it is:
> BOOL __attribute__((__stdcall__))
> VirtualProtect(PVOID,DWORD,DWORD,PDWORD);
> with:
> typedef unsigned long DWORD;
> typedef int WINBOOL;
> typedef WINBOOL BOOL;
> typedef DWORD *PDWORD;
> typedef void *PVOID;
>
>
> Does that ring a bell to anyone? Any idea why it's showing up now even
> though it looks like this code wasn't modified in the recent past (and
> my winbase.h hasn't changed since my last successful bootstrap, a
> month ago).
>
> Thanks,
> FX
>
>
> PS: My exact configure line is: ../trunk/configure --prefix=/mingw
> --enable-languages=c,fortran --with-gmp=/home/FX/local
> --with-ld=/mingw/bin/ld --with-as=/mingw/bin/as --disable-werror
> --enable-bootstrap --enable-threads --disable-nls
> --build=i586-pc-mingw32 --enable-libgomp --disable-shared
>
> --
> FX Coudert
> http://www.homepages.ucl.ac.uk/~uccafco/