From owner-freebsd-ports@FreeBSD.ORG Tue Aug 19 17:42:03 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 01F221065672 for ; Tue, 19 Aug 2008 17:42:03 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.9.129]) by mx1.freebsd.org (Postfix) with ESMTP id C28438FC1B for ; Tue, 19 Aug 2008 17:42:02 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id 5D8AB73098; Tue, 19 Aug 2008 19:26:31 +0200 (CEST) Date: Tue, 19 Aug 2008 19:26:31 +0200 From: Luigi Rizzo To: ports@freebsd.org Message-ID: <20080819172631.GA25160@onelab2.iet.unipi.it> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.3i Cc: Subject: 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 17:42:03 -0000 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 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