From owner-freebsd-ports@FreeBSD.ORG Fri Jul 18 04:46:52 2003 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AA7B437B401; Fri, 18 Jul 2003 04:46:52 -0700 (PDT) Received: from tuebingen.mpg.de (connect.tuebingen.mpg.de [192.124.26.250]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2766D43F3F; Fri, 18 Jul 2003 04:46:48 -0700 (PDT) (envelope-from peter.kadau@tuebingen.mpg.de) Received: from [10.38.19.68] ([10.38.19.68] verified) by tuebingen.mpg.de (CommuniGate Pro SMTP 4.0.6) with ESMTP-TLS id 4972306; Fri, 18 Jul 2003 13:46:47 +0200 From: Peter Kadau To: Kris Kennaway In-Reply-To: <20030718025200.GA36893@rot13.obsecurity.org> References: <20030718025200.GA36893@rot13.obsecurity.org> Content-Type: text/plain Message-Id: <1058528806.31379.6.camel@skeeve> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.3 Date: 18 Jul 2003 13:46:46 +0200 Content-Transfer-Encoding: 7bit cc: ports@freebsd.org cc: current@freebsd.org Subject: Re: Fixing gcc 3.3 compile failures X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jul 2003 11:46:53 -0000 OK, here is one for graphics/svgalib: --- src/vga.c.orig Fri Jul 18 13:27:40 2003 +++ src/vga.c Fri Jul 18 13:32:58 2003 @@ -3846,7 +3846,7 @@ #define ML_GETINT(x) \ ptr = strtok(NULL, " "); if(!ptr) break; \ - mmt.##x = atoi(ptr); + mmt.x = atoi(ptr); ML_GETINT(HDisplay); ML_GETINT(HSyncStart); Just abused concatenation... But I'm pretty sure that the following is what was intended, thusly the better patch: --- src/vga.c.orig Fri Jul 18 13:27:40 2003 +++ src/vga.c Fri Jul 18 13:34:38 2003 @@ -3845,8 +3845,9 @@ mmt.pixelClock = atof(ptr) * 1000; #define ML_GETINT(x) \ - ptr = strtok(NULL, " "); if(!ptr) break; \ - mmt.##x = atoi(ptr); + do { ptr = strtok(NULL, " "); if(!ptr) break; \ + mmt.x = atoi(ptr); } \ + while (0) ML_GETINT(HDisplay); ML_GETINT(HSyncStart);