Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S262499AbTIHPg7 (ORCPT ); Mon, 8 Sep 2003 11:36:59 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S262491AbTIHPga (ORCPT ); Mon, 8 Sep 2003 11:36:30 -0400 Received: from smtprelay02.ispgateway.de ([62.67.200.157]:60114 "EHLO smtprelay02.ispgateway.de") by vger.kernel.org with ESMTP id S262499AbTIHPev (ORCPT ); Mon, 8 Sep 2003 11:34:51 -0400 From: Ingo Oeser To: Andreas Schwab Subject: Re: [PATCH] use size_t for the broken ioctl numbers Date: Mon, 8 Sep 2003 15:10:34 +0200 User-Agent: KMail/1.5.3 Cc: Linus Torvalds , Matthew Wilcox , References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200309081510.34883.ingo@oeser-vu.de> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 813 Lines: 27 On Sunday 07 September 2003 19:34, Andreas Schwab wrote: > Linus Torvalds writes: > > ({ 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] ) It would, if you did this #define RNDGETPOOL _IOR('R', 0x02, struct { int x[2];}) I would vote for simply forbidding arrays in this situation (which the compile error will handle as well ;-)). Just another case of "Doctor it hurts!" Regards Ingo Oeser - 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/