public inbox for java-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Danny Smith <dannysmith@clear.net.nz>
To: java-patches@gcc.gnu.org
Cc: gnustuff@thisiscool.com
Subject: Re: jdwp build failure
Date: Thu, 22 Feb 2007 08:12:00 -0000	[thread overview]
Message-ID: <000001c75659$35c94750$b26d65da@anykey> (raw)

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

             reply	other threads:[~2007-02-22  8:12 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-22  8:12 Danny Smith [this message]
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
  -- strict thread matches above, loose matches on Subject: below --
2007-02-17  1:53 FYI: 2 patches for RH 4.1 branch Mohan Embar
2007-02-17  8:31 ` Marco Trudel
2007-02-21 12:46   ` jdwp build failure Marco Trudel
2007-02-21 18:05     ` Mohan Embar
2007-02-22  2:04       ` Tom Tromey
2007-02-22  2:37         ` Mohan Embar
2007-02-22  8:10           ` Marco Trudel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='000001c75659$35c94750$b26d65da@anykey' \
    --to=dannysmith@clear.net.nz \
    --cc=gnustuff@thisiscool.com \
    --cc=java-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).