From owner-svn-src-projects@FreeBSD.ORG Thu Nov 13 00:37:25 2014 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CE985BF0; Thu, 13 Nov 2014 00:37:25 +0000 (UTC) Received: from mail106.syd.optusnet.com.au (mail106.syd.optusnet.com.au [211.29.132.42]) by mx1.freebsd.org (Postfix) with ESMTP id 92039154; Thu, 13 Nov 2014 00:37:25 +0000 (UTC) Received: from c122-106-147-133.carlnfd1.nsw.optusnet.com.au (c122-106-147-133.carlnfd1.nsw.optusnet.com.au [122.106.147.133]) by mail106.syd.optusnet.com.au (Postfix) with ESMTPS id 803883D4306; Thu, 13 Nov 2014 11:37:16 +1100 (AEDT) Date: Thu, 13 Nov 2014 11:37:15 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Andrew Turner Subject: Re: svn commit: r274428 - projects/arm64/sys/arm64/include In-Reply-To: <201411121319.sACDJJhI070308@svn.freebsd.org> Message-ID: <20141113111122.O1052@besplex.bde.org> References: <201411121319.sACDJJhI070308@svn.freebsd.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=dMCfxopb c=1 sm=1 tr=0 a=7NqvjVvQucbO2RlWB8PEog==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=5MRF5YCavSwMJl3hpNwA:9 a=CjuIK1q_8ugA:10 Cc: svn-src-projects@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Nov 2014 00:37:25 -0000 On Wed, 12 Nov 2014, Andrew Turner wrote: > Log: > Fix the values for __WCHAR_{MIN,MAX} > > Modified: > projects/arm64/sys/arm64/include/_types.h > > Modified: projects/arm64/sys/arm64/include/_types.h > ============================================================================== > --- projects/arm64/sys/arm64/include/_types.h Wed Nov 12 12:46:57 2014 (r274427) > +++ projects/arm64/sys/arm64/include/_types.h Wed Nov 12 13:19:18 2014 (r274428) > @@ -94,8 +94,8 @@ typedef __uint64_t __vm_pindex_t; > typedef __uint64_t __vm_size_t; > typedef unsigned int ___wchar_t; > > -#define __WCHAR_MIN __INT_MIN /* min value for a wchar_t */ > -#define __WCHAR_MAX __INT_MAX /* max value for a wchar_t */ > +#define __WCHAR_MIN __UINT_MIN /* min value for a wchar_t */ > +#define __WCHAR_MAX __UINT_MAX /* max value for a wchar_t */ > > /* > * Unusual type definitions. This looks bad. 3 underscores for ___wchar_t is execessive. All arches have this bug. It is not even needed to give an extra level of obfuscation below __wchar_t, since the usual spelling __wchar_t is never used. UINT_MIN doesn't exist. The minimum for any unsigned type is 0, so there is no need for a macro giving it. __UINT_MIN shouldn't exist either. It doesn't exist for any other arch. The comments on the limits are duplicated ad nauseum, except in the one place where they might be useful -- they are duplicated for each arch in the implementation-detail header , but not in the application header . (The application header has no comments useful to users at all. All of its comments are for implementation details: - First coptright comment - Second copyright comment (not properly merged) - 2 LONGLONG comments (markup for lint) - One comment on an #endif.) In , the spam is a little more uniform. Most definitions at the top level have no comments. However, most definitions aren't at the top level. Most of the STDC definitions are in the included file . This has the duplicated comments, except of course it has no comments for nonstandard macros that need comments most (LONG_BIT, WORD_BIT and MQ_PRIO_MAX; the placement of MQ_PRIO_MAX there is just a bug -- all other POSIX limits are in either or , depending on whether they are implemented used in the kernel; MQ_PRIO_MAX is also under a broken visibility ifdef that makes it visible to all versions of POSIX). Bruce