From owner-freebsd-arch@FreeBSD.ORG Thu Feb 5 08:46:43 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D85FC16A4CE for ; Thu, 5 Feb 2004 08:46:43 -0800 (PST) Received: from laika.ifs.tuwien.ac.at (laika.ifs.tuwien.ac.at [128.131.167.43]) by mx1.FreeBSD.org (Postfix) with ESMTP id E0A7443D1F for ; Thu, 5 Feb 2004 08:46:42 -0800 (PST) (envelope-from stefan@fafoe.narf.at) Received: from fafoe.narf.at (unknown [212.186.3.235]) by laika.ifs.tuwien.ac.at (Postfix) with ESMTP id 2D07D2087 for ; Thu, 5 Feb 2004 17:48:33 +0100 (CET) Received: from wombat.fafoe.narf.at (wombat.fafoe.narf.at [192.168.1.42]) by fafoe.narf.at (Postfix) with ESMTP id EE7DA40ED for ; Thu, 5 Feb 2004 17:46:40 +0100 (CET) Received: by wombat.fafoe.narf.at (Postfix, from userid 1001) id C21DB1D4; Thu, 5 Feb 2004 17:46:40 +0100 (CET) Date: Thu, 5 Feb 2004 17:46:40 +0100 From: Stefan Farfeleder To: arch@freebsd.org Message-ID: <20040205164639.GC602@wombat.fafoe.narf.at> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.5.1i Subject: C99 variadic macros X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Feb 2004 16:46:44 -0000 Hi, I went through the source tree and converted all occurrences of GNU-style variadic macros to C99 compliant ones in !contrib code. For macros that (ab)use string concatenation like #define foo(fmt, args...) printf("%s: " fmt "\n", __func__, ##args) three printf's must be used. As almost all variadic macros are used for debugging, this shouldn't matter much. Two occurrences (src/lib/libypclnt/ypclnt.h and src/sys/dev/ichsmb/ichsmb.c) remain since they can't be converted easily and are already protected by defined(__GNUC__). http://www.ten15.org/~stefanf/FreeBSD/vamacro.diff Cheers, Stefan Farfeleder