From owner-freebsd-java@FreeBSD.ORG Sun Jul 27 07:41:00 2003 Return-Path: Delivered-To: freebsd-java@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2DC1D37B401 for ; Sun, 27 Jul 2003 07:41:00 -0700 (PDT) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5CBB843F93 for ; Sun, 27 Jul 2003 07:40:59 -0700 (PDT) (envelope-from eischen@vigrid.com) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mail.pcnet.com (8.12.8/8.12.1) with ESMTP id h6REeuax004708; Sun, 27 Jul 2003 10:40:56 -0400 (EDT) Date: Sun, 27 Jul 2003 10:40:56 -0400 (EDT) From: Daniel Eischen X-Sender: eischen@pcnet5.pcnet.com To: Mike Bristow In-Reply-To: <1059315714.47363.4.camel@lir.urgle.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: Yamada Ken Takeshi cc: Dag-Erling =?ISO-8859-1?Q?Sm=F8rgrav?= cc: freebsd-java@freebsd.org Subject: Re: Q) jdk1.4.1 compile on -current X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: deischen@freebsd.org List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Jul 2003 14:41:00 -0000 On 27 Jul 2003, Mike Bristow wrote: > On Sun, 2003-07-27 at 14:23, Sheldon Hearn wrote: > > On (2003/07/27 15:05), Sheldon Hearn wrote: > > > > > > It's not a GCC bug, it's a JDK bug which GCC used to silently ignore. > > > > The ## operator should only be used to paste together parts of what is > > > > meant to be a single token, but apparently a lot of people use it > > > > between tokens in macro definitions (which is not only incorrect but > > > > also completely unnecessary). > > > > > > So name##_t is supposed to be name_t? Any idea what the original > > > programmer wanted to achieve or avoid by doing this? > > > > Ah, wait. Those are bad examples (and don't produce errors). > > > > I've just looked at the standard and seen what you're talking about. > > It's easy to imagine the author of the failing code thinking this was > > necessary. > > I've been looking at this problem too, and while the patch you have is > neccessary, it isn't complete. You'll blow up in the same way later. > > The attached patch touches all the problems I've found, but the first > time the built java is used (in the build process) it dumps core, so > I've obviously done something stupid. > > > --- ../../hotspot/src/share/vm/runtime/mutexLocker.cpp.orig Sat Jul 26 > 19:49:23 2003 > +++ ../../hotspot/src/share/vm/runtime/mutexLocker.cpp Sat Jul 26 > 19:48:45 2003 > @@ -95,7 +95,7 @@ > #endif > > #define def(var, type, pri, vm_block) \ > - var = new type(Mutex::##pri, #var, vm_block) > + var = new type(Mutex::pri, #var, vm_block) Anyone know what "#var" does? -- Dan Eischen