From 9ac0a6e63b5362f610570bc0831d2502155456eb Mon Sep 17 00:00:00 2001 From: dwarning Date: Tue, 29 Oct 2024 11:48:31 +0100 Subject: [PATCH] BOOLEAN hack for include windows.h --- src/misc/misc_time.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/misc/misc_time.c b/src/misc/misc_time.c index 7a294a838..5c52b6619 100644 --- a/src/misc/misc_time.c +++ b/src/misc/misc_time.c @@ -9,9 +9,20 @@ Copyright 1990 Regents of the University of California. All rights reserved. #include "ngspice/ngspice.h" #include +#if defined(HAS_WINGUI) || defined(__MINGW32__) || defined(_MSC_VER) #ifdef HAVE_QUERYPERFORMANCECOUNTER +#define WIN32_LEAN_AND_MEAN + /* + * The ngspice.h file included above defines BOOLEAN (via bool.h) and this + * clashes with the definition obtained from windows.h (via winnt.h). + * However, BOOLEAN is not used by this file so we can work round this problem + * by undefining BOOLEAN before including windows.h + * SJB - April 2005 + */ +#undef BOOLEAN #include #endif +#endif #include "misc_time.h"