This is the mail archive of the gcc@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: Combined tree builds for mingw32


On Mon, May 07, 2007 at 07:25:25PM +0200, Paolo Carlini wrote:
> Hi,
> 
> > The #undef min / #undef max in c++config.h do not work if c++config.h
> > is included before windows.h, which happens during a build of the PCH;
> >  
> I'm not sure to understand. Can you explain in better detail? Proviously, we 
> had those undefs in the middle of stl_algobase.h, I don't see why that was 
> better. Also, I don't understand what the PCHs have to do with windows.h

The failing command is trying to compile the PCH.  This means that
we're including a large number of libstdc++ headers in a row.  One of
the first ones pulls in c++config.h, which has #undef max; but so far,
nothing has included <windows.h>.  Later, something includes
gthr-default.h; on this platform that pulls in <windows.h>, which
eventually #define's min.  Then later we get <limits>, which now sees
the definition.

> > with that hacked around, I still get:
> >
> > /space/fsf/mingw/obj/i586-mingw32msvc/libstdc++-v3/include/i586-mingw32msvc/bits/ctype_base.h:59:
> > error: '_N' was not declared in this scope
> >
> > Nothing pulls in the definition of _U, _N, etc before that point.
> >  
> Before *which* point? AFAICS, the only place where ctype_base.h is included is 
> in bits/locale_facets.h, *after* <cctype>...

Hmm, there are three <ctype.h>'s in the src repository:

/space/fsf/commit/src/newlib/libc/include/ctype.h
/space/fsf/commit/src/winsup/cygwin/include/ctype.h
/space/fsf/commit/src/winsup/mingw/include/ctype.h

That third one does not define _U.  It uses _UPPER instead.  Does this
mean --with-newlib does not work for mingw32?  (Note, you can't build
without it either.)

-- 
Daniel Jacobowitz
CodeSourcery


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