From: ellson Date: Sat, 28 Jan 2006 00:20:45 +0000 (+0000) Subject: the configure test for bool tested only the CC compiler, but we already know that... X-Git-Tag: LAST_LIBGRAPH~32^2~6823 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b21524ddb40b4309cb080a48b4d01e899db7b0ce;p=graphviz the configure test for bool tested only the CC compiler, but we already know that C++ defines bool --- diff --git a/lib/common/logic.h b/lib/common/logic.h index dd08c8a9e..14549b953 100644 --- a/lib/common/logic.h +++ b/lib/common/logic.h @@ -21,13 +21,14 @@ extern "C" { #endif -#ifdef HAVE_STDBOOL_H +#if defined HAVE_STDBOOL_H && ! defined __cplusplus #include #endif #define NOT(v) (!(v)) -#ifndef HAVE_BOOL +/* HAVE_BOOL only tested the CC compiler, we know C++ must define bool */ +#if ! defined HAVE_BOOL && ! defined __cplusplus typedef unsigned char bool; #define false 0 #define true NOT(false)