From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42119) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W4WFL-0003F9-Sn for qemu-devel@nongnu.org; Sat, 18 Jan 2014 08:47:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W4WFH-0001Lu-2h for qemu-devel@nongnu.org; Sat, 18 Jan 2014 08:47:35 -0500 Received: from mail.duskware.de ([91.199.88.144]:65225) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W4WFG-0001KK-Sp for qemu-devel@nongnu.org; Sat, 18 Jan 2014 08:47:31 -0500 Date: Sat, 18 Jan 2014 14:47:23 +0100 From: Martin Husemann Message-ID: <20140118134723.GA20716@mail.duskware.de> References: <20131217085540.GA7891@mail.duskware.de> <52B02428.20306@redhat.com> <52D68012.8090603@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <52D68012.8090603@redhat.com> Subject: [Qemu-devel] [PATCH v2] qemu 1.7.0 does not build on NetBSD List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Do not rely on int8_t (and friends) not being preprocessor symbols (or symbols expanding to themselves). On NetBSD (for example) the glue(u, SDATA_TYPE) results in u__int8_t, which is undefined. There is no way to stop cpp expanding inner macros, so just add the few lines explicitly and get rid of the magic. Signed-off-by: Martin Husemann --- include/exec/softmmu_template.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/exec/softmmu_template.h b/include/exec/softmmu_template.h index c6a5440..8712dcd 100644 --- a/include/exec/softmmu_template.h +++ b/include/exec/softmmu_template.h @@ -30,23 +30,26 @@ #define SUFFIX q #define LSUFFIX q #define SDATA_TYPE int64_t +#define DATA_TYPE uint64_t #elif DATA_SIZE == 4 #define SUFFIX l #define LSUFFIX l #define SDATA_TYPE int32_t +#define DATA_TYPE uint32_t #elif DATA_SIZE == 2 #define SUFFIX w #define LSUFFIX uw #define SDATA_TYPE int16_t +#define DATA_TYPE uint16_t #elif DATA_SIZE == 1 #define SUFFIX b #define LSUFFIX ub #define SDATA_TYPE int8_t +#define DATA_TYPE uint8_t #else #error unsupported data size #endif -#define DATA_TYPE glue(u, SDATA_TYPE) /* For the benefit of TCG generated code, we want to avoid the complication of ABI-specific return type promotion and always return a value extended -- 1.8.5.3