PATCH mingw32 Another change to allow mainline to bootstrap.
Aaron W. LaFramboise
aaronblue6@cox-internet.com
Mon May 31 21:14:00 GMT 2004
Zack Weinberg wrote:
>"Aaron W. LaFramboise" <aaronblue6@cox-internet.com> writes:
>
>
>>Sorry, I missed one.
>>
>>Fixes this warning. While PCH does not yet work on mingw, it's
>>probably worth making this warning go away anyhow so we can
>>bootstrap with -Werror.
>>
>>
>
>If we must have this, don't put it here; put it in system.h, and write
>a proper autoconf check (NEED_DECLARATION_GETPAGESIZE). Better, fix
>the mingw headers (it's supposed to be prototyped in unistd.h).
>
>
Actually, the getpagesize() this is referring to is in libgcc. Adding
the prototype to libgcc2.h did not work, because including libgcc2.h
from ggc.c caused some other compile problems. MinGW itself presently
does not define have a getpagesize() at all.
So, would this be acceptable?
2004-05-31 Aaron W. LaFramboise <aaronraolete36@aaronwl.com>
* system.h: Prototype getpagesize on Windows.
Index: gcc/gcc/system.h
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/system.h,v
retrieving revision 1.213
diff -c -3 -p -r1.213 system.h
*** gcc/gcc/system.h 24 May 2004 10:50:40 -0000 1.213
--- gcc/gcc/system.h 31 May 2004 17:36:08 -0000
*************** typedef char _Bool;
*** 534,539 ****
--- 534,544 ----
#define TRUE true
#define FALSE false
+ /* Windows: prototype getpagesize, defined in libgcc2.c */
+ #if defined(WINNT) && ! defined(__CYGWIN__) && ! defined (_UWIN)
+ extern long getpagesize (void);
+ #endif /* WINNT && ! __CYGWIN__ && ! _UWIN */
+
/* As the last action in this file, we poison the identifiers that
shouldn't be used. Note, luckily gcc-3.0's token-based integrated
preprocessor won't trip on poisoned identifiers that arrive from
Aaron W. LaFramboise
More information about the Gcc-patches
mailing list