From patchwork Thu Nov 24 16:10:26 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 9445981 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C539760235 for ; Thu, 24 Nov 2016 16:13:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B767B2808C for ; Thu, 24 Nov 2016 16:13:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ABCA1280CF; Thu, 24 Nov 2016 16:13:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 4C6DE2808C for ; Thu, 24 Nov 2016 16:13:04 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1c9wcT-0003kI-8k; Thu, 24 Nov 2016 16:11:29 +0000 Received: from mail-wj0-x22f.google.com ([2a00:1450:400c:c01::22f]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1c9wcN-0003Ms-N9 for linux-arm-kernel@lists.infradead.org; Thu, 24 Nov 2016 16:11:25 +0000 Received: by mail-wj0-x22f.google.com with SMTP id mp19so37044597wjc.1 for ; Thu, 24 Nov 2016 08:11:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=UtvpRa4eyhzNQi1mXwQQFzKyq5psJ48LVMvJ8sGzYcc=; b=D3YysaiDHEp5bKcsT3BiKmE4FN9Cu8Lz4XzCpPS/jg2t7sxbrn1lXPPktsvcpjp+Ki eqHkoaOyrNi6AmthBoRtYkvUXQ3tf2kosrdANprCKguDt4XRSGsukRxmXEKlCKnqnlJU EWcH00In5eP5iygxuQjkUkLWI5gXIIGZrO7cI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=UtvpRa4eyhzNQi1mXwQQFzKyq5psJ48LVMvJ8sGzYcc=; b=AN/nYCvvDiJhkGtBi85vySqVOoZFX7UGGKYONUgYDPJPAoBuyrU10jz8Q2WQzHbq5x 9NcNBrRrRzwPFLS9h+e76bNT//nUMeVNY0vlcXkSEKEs+Juxa18bfp5hkHx5aUg7PgVG ggDH/4WiJf+/MzBdzV/5rMsTbo0/C7C90uOgFQlec9fELsvjfYD3Q4ggu71BZldK5q3V yzCM55gG9a8cFwX4sgDUIACcS2DyvesBwaFSbsTJrZHNiZNNvaXvNo/v49Do8WoGY0MZ fGNQZbh3AtwCP3umVc4hA0DPaoYMoG6RnE3OUIeSsH+5gi8SOQMGezJ1qwq1LdyDQM5S blNw== X-Gm-Message-State: AKaTC02iPJ1uxyuKMv7Rq0jcSwYnN0TcnquuXpe2Z/7PBMKjeGInHL35GtVpktnRW9FYlKPs X-Received: by 10.194.22.41 with SMTP id a9mr3452333wjf.30.1480003861270; Thu, 24 Nov 2016 08:11:01 -0800 (PST) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id u17sm8902441wma.24.2016.11.24.08.11.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 24 Nov 2016 08:11:00 -0800 (PST) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 001BD3E0552; Thu, 24 Nov 2016 16:11:00 +0000 (GMT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, christoffer.dall@linaro.org, marc.zyngier@arm.com Subject: [kvm-unit-tests PATCH v7 04/11] libcflat: add PRI(dux)32 format types Date: Thu, 24 Nov 2016 16:10:26 +0000 Message-Id: <20161124161033.11456-5-alex.bennee@linaro.org> X-Mailer: git-send-email 2.10.1 In-Reply-To: <20161124161033.11456-1-alex.bennee@linaro.org> References: <20161124161033.11456-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161124_081123_942963_469FD183 X-CRM114-Status: UNSURE ( 8.55 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mttcg@listserver.greensocs.com, peter.maydell@linaro.org, claudio.fontana@huawei.com, nikunj@linux.vnet.ibm.com, jan.kiszka@siemens.com, mark.burton@greensocs.com, a.rigo@virtualopensystems.com, qemu-devel@nongnu.org, cota@braap.org, serge.fdrv@gmail.com, pbonzini@redhat.com, bobby.prani@gmail.com, rth@twiddle.net, =?UTF-8?q?Alex=20Benn=C3=A9e?= , fred.konrad@greensocs.com Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP So we can have portable formatting of uint32_t types. Signed-off-by: Alex Bennée --- lib/libcflat.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/libcflat.h b/lib/libcflat.h index bdcc561..6dab5be 100644 --- a/lib/libcflat.h +++ b/lib/libcflat.h @@ -55,12 +55,17 @@ typedef _Bool bool; #define true 1 #if __SIZEOF_LONG__ == 8 +# define __PRI32_PREFIX # define __PRI64_PREFIX "l" # define __PRIPTR_PREFIX "l" #else +# define __PRI32_PREFIX "l" # define __PRI64_PREFIX "ll" # define __PRIPTR_PREFIX #endif +#define PRId32 __PRI32_PREFIX "d" +#define PRIu32 __PRI32_PREFIX "u" +#define PRIx32 __PRI32_PREFIX "x" #define PRId64 __PRI64_PREFIX "d" #define PRIu64 __PRI64_PREFIX "u" #define PRIx64 __PRI64_PREFIX "x"