Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261493AbTIGV2r (ORCPT ); Sun, 7 Sep 2003 17:28:47 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261508AbTIGV2r (ORCPT ); Sun, 7 Sep 2003 17:28:47 -0400 Received: from natsmtp01.webmailer.de ([192.67.198.81]:51093 "EHLO post.webmailer.de") by vger.kernel.org with ESMTP id S261493AbTIGV2q (ORCPT ); Sun, 7 Sep 2003 17:28:46 -0400 Message-Id: <200309072128.h87LScJZ009118@post.webmailer.de> From: Arnd Bergmann Subject: Re: [PATCH] use size_t for the broken ioctl numbers To: Andreas Schwab , linux-kernel@vger.kernel.org, Matthew Wilcox , Linus Torvalds Date: Sun, 07 Sep 2003 23:28:55 +0200 References: User-Agent: KNode/0.7.2 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 725 Lines: 17 Andreas Schwab wrote: > Linus Torvalds writes: >> Ie, change the (sizeof(x)) to something like >> >> ({ x __dummy; sizeof(__dummy); }) >> >> which should work with all compiler versions. > > This won't work with array types, eg. in : > > #define RNDGETPOOL _IOR( 'R', 0x02, int [2] ) How about changing (sizeof(x)) to (sizeof(x[1]))? It will result in "parse error before `['" when x is not a type or an array type. Arnd <>< - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/