From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=pass header.i=@linaro.org header.s=google header.b=oWFNPVpJ; spf=pass (domain: linaro.org, ip: 209.85.221.45, mailfrom: leif.lindholm@linaro.org) Received: from mail-wr1-f45.google.com (mail-wr1-f45.google.com [209.85.221.45]) by groups.io with SMTP; Thu, 26 Sep 2019 12:28:22 -0700 Received: by mail-wr1-f45.google.com with SMTP id a11so109483wrx.1 for ; Thu, 26 Sep 2019 12:28:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=UYxdaKe8I0cBinfSkEcQiycoHdnRiU/Jh17U4tqVOsY=; b=oWFNPVpJAb+bZgVURqiYToVRoXxn484SUTec18NdAPbZXVid/n5nmfFD8n4iPNosQ2 /F+4hppX1oeFCCJbDjacdStGzGiaaMEhaFBw7QxYbBWFZajvq9+tXvxqfVOm+ryVVkT2 LmqcOKMNYlLMgzKtbIXrD4JAQDdO3pPKEAzOePSTCN+THck4NV5qmNHkpav+ZQDQ8GSN 0nlU3yATMT8eSfF/xfF6MixQ/ezqdWGph6n163GIqwjSIphHhWwV/77tEtN11CaHHpD6 rvOvYC8+t4TDDNsTWRDD+yz70/L4kz8jqH3YabIS8sVm2VYHEQ58L+DknK29jX0IBvOl rb6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=UYxdaKe8I0cBinfSkEcQiycoHdnRiU/Jh17U4tqVOsY=; b=D2SjWnKmCXJXWsjAjII3J+6k+yYrNb2iD2qNjdEN+2CK0v9ElcvVhZr8abDZMQXBe6 QT+SJshGFJDtMJkZ0PhPDDmmtzws5lvxN/Ssnyc84K3VclyxGVfBkcFwFgYi6CGAsMvh EDz4tpqdrUMjbguinkTu6MqF51O7xWvjIA7DlHlpmGtxKi0+nf9FVqIKSiMJlDHdex8/ dr1dfBrUEG5t8kvUpVlaSdP46GfwrRbA6zWp3XwaqoNO4yD8rHIBt+7OwLvvFE2Yand3 VykM4GqdYdRQ98HJxVV3J1w6uWTEnSQhwdukJMZ3GcRVliS/snqRWC9aM5C5upCk4YIr czng== X-Gm-Message-State: APjAAAXlI4VdwHYtBMuXxJ6Bu641khVD4nLS6mbvuikxR2gBNI0x9T2C 8v5Oup+vkOZk7oUFIhaiMVJmaZyCwkCwgUjf X-Google-Smtp-Source: APXvYqwMCZSkpZz/oWPnZmdbbqY0gyh/ZNsm6JLUdQ01Jhk/amImvBYoz7MhLMOw8bdx2AdrCUISyQ== X-Received: by 2002:a5d:4c48:: with SMTP id n8mr81635wrt.192.1569526100193; Thu, 26 Sep 2019 12:28:20 -0700 (PDT) Return-Path: Received: from vanye.hemma.eciton.net (cpc92302-cmbg19-2-0-cust304.5-4.cable.virginm.net. [82.1.209.49]) by smtp.gmail.com with ESMTPSA id t6sm6747202wmf.8.2019.09.26.12.28.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Sep 2019 12:28:19 -0700 (PDT) From: "Leif Lindholm" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Bob Feng , Liming Gao , Laszlo Ersek Subject: [PATCH 1/1] BaseTools: use stdint.h for GCC ProcessorBind.h typedefs Date: Thu, 26 Sep 2019 20:28:18 +0100 Message-Id: <20190926192818.31119-1-leif.lindholm@linaro.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit The AArch64 definitions of UINT64/INT64 differ from the X64 ones. Since this is on the tool side, doing like X64 and picking the definitions from stdint.h feels like a better idea than hardcoding them. So copy the pattern from X64/ProcesorBind.h. Cc: Ard Biesheuvel Cc: Bob Feng Cc: Liming Gao Cc: Laszlo Ersek Signed-off-by: Leif Lindholm --- This was triggered by one of the Risc-V patches which may need to end up being modified to the point where this issue goes away, but the current situation seems suboptimal. (Do you use %llx or %lx to print an Elf64_Addr on a 64-bit LP architecture?) BaseTools/Source/C/Include/AArch64/ProcessorBind.h | 26 ++++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/BaseTools/Source/C/Include/AArch64/ProcessorBind.h b/BaseTools/Source/C/Include/AArch64/ProcessorBind.h index bfaf1e28e446..dfa725b2e363 100644 --- a/BaseTools/Source/C/Include/AArch64/ProcessorBind.h +++ b/BaseTools/Source/C/Include/AArch64/ProcessorBind.h @@ -41,21 +41,21 @@ typedef signed char INT8; #else // - // Assume standard AARCH64 alignment. + // Use ANSI C 2000 stdint.h integer width declarations // - typedef unsigned long long UINT64; - typedef long long INT64; - typedef unsigned int UINT32; - typedef int INT32; - typedef unsigned short UINT16; - typedef unsigned short CHAR16; - typedef short INT16; - typedef unsigned char BOOLEAN; - typedef unsigned char UINT8; - typedef char CHAR8; - typedef signed char INT8; + #include + typedef uint8_t BOOLEAN; + typedef int8_t INT8; + typedef uint8_t UINT8; + typedef int16_t INT16; + typedef uint16_t UINT16; + typedef int32_t INT32; + typedef uint32_t UINT32; + typedef int64_t INT64; + typedef uint64_t UINT64; + typedef char CHAR8; + typedef uint16_t CHAR16; - #define UINT8_MAX 0xff #endif /// -- 2.20.1