From owner-freebsd-ports@FreeBSD.ORG Tue Aug 19 18:12:26 2008 Return-Path: Delivered-To: ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EC9F51065686 for ; Tue, 19 Aug 2008 18:12:26 +0000 (UTC) (envelope-from mezz7@cox.net) Received: from eastrmmtao103.cox.net (eastrmmtao103.cox.net [68.230.240.9]) by mx1.freebsd.org (Postfix) with ESMTP id AEE9D8FC16 for ; Tue, 19 Aug 2008 18:12:26 +0000 (UTC) (envelope-from mezz7@cox.net) Received: from eastrmimpo03.cox.net ([68.1.16.126]) by eastrmmtao103.cox.net (InterMail vM.7.08.02.01 201-2186-121-102-20070209) with ESMTP id <20080819181225.VOGZ22820.eastrmmtao103.cox.net@eastrmimpo03.cox.net>; Tue, 19 Aug 2008 14:12:25 -0400 Received: from mezz.mezzweb.com ([24.255.149.218]) by eastrmimpo03.cox.net with bizsmtp id 4JCR1a00A4iy4EG02JCReF; Tue, 19 Aug 2008 14:12:25 -0400 Date: Tue, 19 Aug 2008 13:12:37 -0500 To: "Luigi Rizzo" From: "Jeremy Messenger" Content-Type: text/plain; format=flowed; delsp=yes; charset=utf-8 MIME-Version: 1.0 References: <20080819172631.GA25160@onelab2.iet.unipi.it> Content-Transfer-Encoding: 7bit Message-ID: In-Reply-To: <20080819172631.GA25160@onelab2.iet.unipi.it> User-Agent: Opera Mail/9.51 (Linux) Cc: ports@freebsd.org Subject: Re: best way to work around vs ? X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Aug 2008 18:12:27 -0000 On Tue, 19 Aug 2008 12:26:31 -0500, Luigi Rizzo wrote: > A fair amount of third party software in ports still uses > which in our system is like this: > > /* $FreeBSD: src/include/malloc.h,v 1.5 2001/11/07 23:14:31 obrien Exp > $ */ > #if __STDC__ > #error " has been replaced by " > #else > #include > #endif > > What is the best way to disable the error without an > explicit patch (there are over 200 patchfiles in ports > just doing that) ? I think patch it is best, because if I understand it corrects is that malloc() in stdlib.h is standard of ANSI C. Correct me if I am wrong. However, I don't see anything wrong with patch. You can simple use wildcard (*.c) or use find(1) to find files to replace the malloc.h -> stdlib.h by use REINPLACE_CMD without have to create multi-file patch. Cheers, Mezz > I tried the following > > + CPPFLAGS += -U__STDC__ > seems to work, though it gives some warnings because a > built-in define is undefined. Also i am not sure if there > are other parts of the system that are affected; > > + CPPFLAGS += -traditional-cpp > is also reported to unset __STDC__, but it generates an > independent set of warnings and errors; > > Any other ideas ? > > cheers > luigi -- mezz7@cox.net - mezz@FreeBSD.org FreeBSD GNOME Team http://www.FreeBSD.org/gnome/ - gnome@FreeBSD.org