From 8e6da6b844e8c045fb0bd0ae8abde2cd58e9f74a Mon Sep 17 00:00:00 2001 From: Chandrashekara K R Date: Wed, 13 Apr 2022 10:03:27 +0530 Subject: [PATCH] Added the checks to not defining the bool type for C++ code in windows to avoid redefinition build time errror. AMD-Internal: [CPUPL-2037] Change-Id: I065da9206ab06f60876324f258ee12fb9fe83f88 --- frame/include/bli_type_defs.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/frame/include/bli_type_defs.h b/frame/include/bli_type_defs.h index cb4e4e4b8..584c221ba 100644 --- a/frame/include/bli_type_defs.h +++ b/frame/include/bli_type_defs.h @@ -89,10 +89,14 @@ typedef unsigned long int guint_t; // -- Boolean type -- // NOTE: bool_t is no longer used and has been replaced with C99's bool type. +// Not defining the bool type for C++ code in windows platform to avoid +// duplicate definition build error. #ifdef _WIN32 +#ifndef __cplusplus #undef bool typedef gint_t bool; #endif +#endif // BLIS uses TRUE and FALSE macro constants as possible boolean values, but we // define these macros in terms of true and false, respectively, which are // defined by C99 in stdbool.h.