From owner-svn-src-all@freebsd.org Tue Nov 10 16:35:39 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EBBD7A2B4D5; Tue, 10 Nov 2015 16:35:39 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail105.syd.optusnet.com.au (mail105.syd.optusnet.com.au [211.29.132.249]) by mx1.freebsd.org (Postfix) with ESMTP id AE2BF1893; Tue, 10 Nov 2015 16:35:39 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from c211-30-166-197.carlnfd1.nsw.optusnet.com.au (c211-30-166-197.carlnfd1.nsw.optusnet.com.au [211.30.166.197]) by mail105.syd.optusnet.com.au (Postfix) with ESMTPS id DFB6E1043142; Wed, 11 Nov 2015 03:35:29 +1100 (AEDT) Date: Wed, 11 Nov 2015 03:35:29 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Hans Petter Selasky cc: Bruce Evans , "Conrad E. Meyer" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r290613 - head/sys/compat/linuxkpi/common/include/linux In-Reply-To: <5641A056.2040805@selasky.org> Message-ID: <20151111033159.O2914@besplex.bde.org> References: <201511091650.tA9Gog7d061645@repo.freebsd.org> <20151110080516.M4088@besplex.bde.org> <5641A056.2040805@selasky.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=R4L+YolX c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=PO7r1zJSAAAA:8 a=JzwRw_2MAAAA:8 a=kj9zAlcOel0A:10 a=W74xX4CpOI2vpzQXT_kA:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Nov 2015 16:35:40 -0000 On Tue, 10 Nov 2015, Hans Petter Selasky wrote: > On 11/09/15 22:17, Bruce Evans wrote: >> ... >> This shouldn't compile either. > >> static int >> -sysctl_root_handler_locked(struct sysctl_oid *oid, void *arg1, intptr_t >> arg2, >> +sysctl_root_handler_locked(struct sysctl_oid *oid, void *arg1, intmax_t >> arg2, >> struct sysctl_req *req, struct rm_priotracker *tracker) > > Given that the second argument is sometimes used for pointers, maybe we > should keep it intptr_t. Or add a compile time assert that sizeof(intmax) >= > sizeof(intptr_t) which I think doesn't hold? Then it wouldn't be large enough to hold int64_t on i386 or intmax_t on all arches. intmax_t is already not large enough to hold uintmax_t. intmax_t can hold more than intptr_t, but its size and rank may be smaller. See another reply. Bruce