public inbox for java-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: jdwp build failure
@ 2007-02-22  8:12 Danny Smith
  2007-02-22  8:21 ` Marco Trudel
  0 siblings, 1 reply; 4+ messages in thread
From: Danny Smith @ 2007-02-22  8:12 UTC (permalink / raw)
  To: java-patches; +Cc: gnustuff

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 <windows.h>

maybe here

Index: natVMVirtualMachine.cc
===================================================================
--- natVMVirtualMachine.cc	(revision 122101)
+++ natVMVirtualMachine.cc	(working copy)
@@ -56,6 +56,8 @@
 #include <gnu/gcj/jvmti/Breakpoint.h>
 #include <gnu/gcj/jvmti/BreakpointManager.h>
 
+#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

/* 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 

Danny

>-- Mohan

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-02-22 14:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-22  8:12 jdwp build failure Danny Smith
2007-02-22  8:21 ` Marco Trudel
2007-02-22 14:18   ` Patch [MinGW] FYI: #undef OUT (was Re: jdwp build failure) Mohan Embar
2007-02-22 14:25     ` Marco Trudel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).