[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] include/types: move stdlib.h-kind types to common header


  • To: Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 12 Jan 2023 16:04:42 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=cON83jzL3+W5FDpvJD3UKo0qwkEWtPsnqG2BWdw41YE=; b=YumPUN26mEpJgNJYNPP2X12mQlJtgLIMU1hGWiUCw4Rgs9j1Qpuph4/eqG3a51wDelBt/2NFxjaROqDoFQY5loTtcYfmYUZFN0FREr+gq1pWkgnx5oeT5EPyYpUKrw6m3fR2da0hgD2F0S/OEAzZpqBMRDWWR59g//FcNnI1O3hRoIZAXZpBDYnjz1JoA9LGKdP3FnrA5IW+PIRqn0MwhBLtMzYyWwO690OUIofam5xj9KZt7t7SZRxU638eYcg+7hMN2kn39UtoiEOgO37EbJI79WLwfGPJzUi2Jzzk4KKByjofmRfwGz2bxwqvSk1cdSg6+qdXxNg6fxyH81Dz7A==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KuldrY+qPLuZXonB87KKYRWXovbNal9Dwf3+kMZUVlxsHTiaV+wdkVsuzQCrof+NmNl/r/ECYLumwc14S8EkIIfcnF7vbib5Q+1aeFqje/WyE09e06t9vr+4GEy6lXhR/reDKHJYr35ti2dYRytaWWuQ7Fp6YqUHivNb5odtzBaWx7w6vGfCdfwLNHtgY/P+OT3qDrWO5alBtliYu+Oo7bEk8o3ah9adfPgThdj9N0QKBHmHrbUR+QA6EGn/Ab/udsMWC8txPBTC2GhiaFKXY339iwdmU0ui6UxkL2VX1YfSpAA8LlXVX0zLyT/BWH5+jkzXKjpIbGlgGa3jgNjmZg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: George Dunlap <George.Dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Roger Pau Monne <roger.pau@xxxxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <volodymyr_babchuk@xxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Thu, 12 Jan 2023 15:04:53 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 12.01.2023 15:22, Andrew Cooper wrote:
> On 12/01/2023 2:01 pm, Jan Beulich wrote:
>> size_t, ssize_t, and ptrdiff_t are all expected to be uniformly defined
>> on any ports Xen might gain. In particular I hope new ports can rely on
>> __SIZE_TYPE__ and __PTRDIFF_TYPE__ being made available by the compiler.
>>
>> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
> 
> Acked-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>

Thanks.

>> ---
>> This is just to start with some hopefully uncontroversial low hanging fruit.
> 
> However, I'd advocate going one step further and making real a
> xen/stddef.h header to match our existing stdboot and stdarg, now that
> we have fully divorced ourselves from the compiler-provided freestanding
> headers.

Hmm, to be honest I'm not convinced. It'll be interesting to see what
other maintainers think about such further moving away from Linux'es
basic model.

> This way, the type are declared in the usual place in a C environment.
> 
> I was then also going to use this approach to start breaking up
> xen/lib.h which is a dumping ground of far too much stuff.  In
> particular, when we have a stddef.h, I think it is entirely reasonable
> to move things like ARRAY_SIZE/count_args()/etc into it, because they
> are entirely standard in the Xen codebase.

Yet these aren't what people would expect to live there. If we
introduce further std*.h, then I think these would better strictly
conform to what the C standard expects to be put there.

Jan



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.