From a33ba8e646cbee4f66b99f2d11124c24f6493fb8 Mon Sep 17 00:00:00 2001 From: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com> Date: Mon, 24 Jul 2023 18:03:49 +0530 Subject: [PATCH] Define (U)BaseType_t to 64-bit types on Windows (#715) Define (U)BaseType_t to 64-bit types on Windows This ensures that BaseType_t and UBaseType_t are correctly defined to 64-bit types on 64-bit Windows. Signed-off-by: Gaurav Aggarwal --- portable/MSVC-MingW/portmacro.h | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/portable/MSVC-MingW/portmacro.h b/portable/MSVC-MingW/portmacro.h index b1282b3d7..652792317 100644 --- a/portable/MSVC-MingW/portmacro.h +++ b/portable/MSVC-MingW/portmacro.h @@ -42,12 +42,19 @@ #define portLONG long #define portSHORT short #define portSTACK_TYPE size_t -#define portBASE_TYPE long #define portPOINTER_SIZE_TYPE size_t typedef portSTACK_TYPE StackType_t; -typedef long BaseType_t; -typedef unsigned long UBaseType_t; + +#if defined( __x86_64__) || defined( _M_X64 ) + #define portBASE_TYPE long long + typedef long long BaseType_t; + typedef unsigned long long UBaseType_t; +#else + #define portBASE_TYPE long + typedef long BaseType_t; + typedef unsigned long UBaseType_t; +#endif #if( configTICK_TYPE_WIDTH_IN_BITS == TICK_TYPE_WIDTH_16_BITS )