From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6662 invoked by alias); 22 Feb 2007 08:21:50 -0000 Received: (qmail 6654 invoked by uid 22791); 22 Feb 2007 08:21:49 -0000 X-Spam-Check-By: sourceware.org Received: from mail.gmx.net (HELO mail.gmx.net) (213.165.64.20) by sourceware.org (qpsmtpd/0.31) with SMTP; Thu, 22 Feb 2007 08:21:45 +0000 Received: (qmail invoked by alias); 22 Feb 2007 08:21:43 -0000 Message-ID: <45DD528F.90103@gmx.ch> Date: Thu, 22 Feb 2007 08:21:00 -0000 From: Marco Trudel User-Agent: Thunderbird 1.5.0.9 (Windows/20061207) MIME-Version: 1.0 To: Danny Smith CC: java-patches@gcc.gnu.org, gnustuff@thisiscool.com Subject: Re: jdwp build failure References: <000001c75659$35c94750$b26d65da@anykey> In-Reply-To: <000001c75659$35c94750$b26d65da@anykey> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-IsSubscribed: yes Mailing-List: contact java-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-patches-owner@gcc.gnu.org X-SW-Source: 2007-q1/txt/msg00602.txt.bz2 Danny Smith wrote: > Hello Mohan > > Another comment from unsubscribed lurker. > Mohan wrote at > http://gcc.gnu.org/ml/java-patches/2007-q1/msg0 > > >> Hi All, > >>> Mohan> I haven't looked into this much, but if the Linux folks aren't >>> Mohan> having a problem with this, I'm suspecting a Win32 macro >>> Mohan> which is colliding with OUT. Just a guess, though. >>> It would be nice to know where this conflict comes from. >>> Sometimes a '#undef OUT' in win32.h can help... >>> But if we have to we can rename the field. >> I had already tried that, but it didn't work. I had even put an >> #undef OUT in the offending .cc file with no luck. Still, if it >> only happens on Win32, it has to be a macro, right?. >> I've only made half-hearted attempts here. Marco? Otherwise, I'll >> try to look at it sometime tomorrow. >> > > #undef OUT > should work if done _after_ including > > maybe here > > Index: natVMVirtualMachine.cc > =================================================================== > --- natVMVirtualMachine.cc (revision 122101) > +++ natVMVirtualMachine.cc (working copy) > @@ -56,6 +56,8 @@ > #include > #include > > +#undef OUT > + > using namespace java::lang; > using namespace gnu::classpath::jdwp::event; > using namespace gnu::classpath::jdwp::util; > > OUT is a macro in windef.h, which gets included by windows.h > With newer versons of mingw's w32api, we have this in windef.h In old versions we have it in windef.h and in new too? I have it in windef.h... > /* Pseudo modifiers for parameters > We don't use these unnecessary defines in the w32api headers. Define > them by default since that is what people expect, but allow users > to avoid the pollution. */ > #ifndef _NO_W32_PSEUDO_MODIFIERS > #define IN > #define OUT > #ifndef OPTIONAL > #define OPTIONAL > #endif > #endif > > so you could just #define _NO_W32_PSEUDO_MODIFIERS before including > anything and > humbly-pie request that win32 developers upgrade to newer w32api Since the build should work without having to change anything manually and commit an "#define _NO_W32_PSEUDO_MODIFIERS" into the code seems inappropriate, I think we should just rename the "OUT". Also "OUT" is a common widespread word and might lead to conflicts in future too. Marco