From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex =?utf-8?Q?Benn=C3=A9e?= Subject: Re: [kvm-unit-tests PATCH 1/6] libcflat: add PRI(dux)32 format types Date: Thu, 12 Jan 2017 18:01:49 +0000 Message-ID: <87eg082m42.fsf@linaro.org> References: <20170111162841.15569-1-alex.bennee@linaro.org> <20170111162841.15569-2-alex.bennee@linaro.org> <4286b719-ff75-d2cd-68b5-cb9d9bb89553@redhat.com> <20170112165629.nbczamlqlpsqaauh@hawk.localdomain> <87fuko2o4e.fsf@linaro.org> <144fdce4-ddd4-0c93-296b-44aeec57c664@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Return-path: Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 24FC8402AF for ; Thu, 12 Jan 2017 13:00:08 -0500 (EST) Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id WnkBOQSjUpS5 for ; Thu, 12 Jan 2017 13:00:06 -0500 (EST) Received: from mail-wm0-f48.google.com (mail-wm0-f48.google.com [74.125.82.48]) by mm01.cs.columbia.edu (Postfix) with ESMTPS id 9F97840194 for ; Thu, 12 Jan 2017 13:00:06 -0500 (EST) Received: by mail-wm0-f48.google.com with SMTP id c85so30659359wmi.1 for ; Thu, 12 Jan 2017 10:01:52 -0800 (PST) In-reply-to: <144fdce4-ddd4-0c93-296b-44aeec57c664@redhat.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kvmarm-bounces@lists.cs.columbia.edu Sender: kvmarm-bounces@lists.cs.columbia.edu To: Paolo Bonzini Cc: marc.zyngier@arm.com, linux-arm-kernel@lists.infradead.org, kvm@vger.kernel.org, kvmarm@lists.cs.columbia.edu List-Id: kvmarm@lists.cs.columbia.edu ClBhb2xvIEJvbnppbmkgPHBib256aW5pQHJlZGhhdC5jb20+I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iAgIyAgZGVmaW5lIF9fU1REQ19M SU1JVF9NQUNST1MKICAjICB1bmRlZiBfX1NURENfQ09OU1RBTlRfTUFDUk9TCiAgIyAgZGVmaW5l IF9fU1REQ19DT05TVEFOVF9NQUNST1MKICAjIGVuZGlmCiAgIyBpbmNsdWRlX25leHQgPHN0ZGlu dC5oPgogICNlbHNlCiAgIyBpbmNsdWRlICJzdGRpbnQtZ2NjLmgiCiAgI2VuZGlmCiAgI2RlZmlu ZSBfR0NDX1dSQVBfU1RESU5UX0gKICAjZW5kaWYKClNvIHVzaW5nIGludHR5cGVzIHdlIHdvdWxk IGdldDoKCj5hcm0tbm9uZS1lYWJpLWdjYyAuL3Rlc3QuYyAtRSB8IGdyZXAgdHlwZWRlZiB8IGdy ZXAgdWludDMyCnR5cGVkZWYgbG9uZyB1bnNpZ25lZCBpbnQgX191aW50MzJfdDsKdHlwZWRlZiBf X3VpbnQzMl90IHVpbnQzMl90IDsKCgotLQpBbGV4IEJlbm7DqWUKX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX18Ka3ZtYXJtIG1haWxpbmcgbGlzdAprdm1hcm1A bGlzdHMuY3MuY29sdW1iaWEuZWR1Cmh0dHBzOi8vbGlzdHMuY3MuY29sdW1iaWEuZWR1L21haWxt YW4vbGlzdGluZm8va3ZtYXJtCg== From mboxrd@z Thu Jan 1 00:00:00 1970 From: alex.bennee@linaro.org (Alex =?utf-8?Q?Benn=C3=A9e?=) Date: Thu, 12 Jan 2017 18:01:49 +0000 Subject: [kvm-unit-tests PATCH 1/6] libcflat: add PRI(dux)32 format types In-Reply-To: <144fdce4-ddd4-0c93-296b-44aeec57c664@redhat.com> References: <20170111162841.15569-1-alex.bennee@linaro.org> <20170111162841.15569-2-alex.bennee@linaro.org> <4286b719-ff75-d2cd-68b5-cb9d9bb89553@redhat.com> <20170112165629.nbczamlqlpsqaauh@hawk.localdomain> <87fuko2o4e.fsf@linaro.org> <144fdce4-ddd4-0c93-296b-44aeec57c664@redhat.com> Message-ID: <87eg082m42.fsf@linaro.org> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Paolo Bonzini writes: > On 12/01/2017 18:18, Alex Benn?e wrote: >>> Although I feel there should be a compiler macro way to do this without >>> a need for configure/makefile trickery at all... >> >> I did ask our toolchain bods. They started going on about potential >> solutions using _Generic but I fear that might be worse in this case! > > I don't think _Generic can do string concatenation, can it? > > inttypes.h is not part of the set of freestanding headers, only stdint.h > is. Who is providing stdint.h in your case? /usr/lib/gcc/arm-none-eabi/5.4.1/include/stdint.h is part of the compiler package although it can just include the lib stdint.h if it is there: #ifndef _GCC_WRAP_STDINT_H #if __STDC_HOSTED__ # if defined __cplusplus && __cplusplus >= 201103L # undef __STDC_LIMIT_MACROS # define __STDC_LIMIT_MACROS # undef __STDC_CONSTANT_MACROS # define __STDC_CONSTANT_MACROS # endif # include_next #else # include "stdint-gcc.h" #endif #define _GCC_WRAP_STDINT_H #endif So using inttypes we would get: >arm-none-eabi-gcc ./test.c -E | grep typedef | grep uint32 typedef long unsigned int __uint32_t; typedef __uint32_t uint32_t ; -- Alex Benn?e