BOOLEAN hack for include windows.h

This commit is contained in:
dwarning 2024-10-29 11:48:31 +01:00
parent e4a8019215
commit 9ac0a6e63b
1 changed files with 11 additions and 0 deletions

View File

@ -9,9 +9,20 @@ Copyright 1990 Regents of the University of California. All rights reserved.
#include "ngspice/ngspice.h"
#include <string.h>
#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 <windows.h>
#endif
#endif
#include "misc_time.h"