This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH mingw32 Another change to allow mainline to bootstrap.


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]