From c9120c1d8cf2299169d003bf1fd427443769fb98 Mon Sep 17 00:00:00 2001 From: sjborley Date: Tue, 17 May 2005 21:50:05 +0000 Subject: [PATCH] Fixed problem of duplicated define of BOOL when compiled with MinGW --- src/frontend/wdisp/windisp.c | 10 ++++++++++ src/frontend/wdisp/winprint.c | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/src/frontend/wdisp/windisp.c b/src/frontend/wdisp/windisp.c index 24a092aa1..00cc0bea0 100644 --- a/src/frontend/wdisp/windisp.c +++ b/src/frontend/wdisp/windisp.c @@ -12,6 +12,16 @@ #include "graph.h" #include "ftedev.h" #include "ftedbgra.h" + +/* + * 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 - May 2005 + */ +#undef BOOLEAN + #pragma warn -dup // wegen Redefinition von NUMCOLORS #include #include diff --git a/src/frontend/wdisp/winprint.c b/src/frontend/wdisp/winprint.c index e7b751c29..7c09de9f2 100644 --- a/src/frontend/wdisp/winprint.c +++ b/src/frontend/wdisp/winprint.c @@ -12,6 +12,16 @@ #include "graph.h" #include "ftedev.h" #include "ftedbgra.h" + +/* + * 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 - May 2005 + */ +#undef BOOLEAN + #pragma warn -dup #include #include