From: Erwin Janssen Date: Sun, 18 Sep 2016 15:50:06 +0000 (+0200) Subject: Remove define and usage of HAVE_BOOL X-Git-Tag: untagged-4431b9bde391f1b69fe5^2~8 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b6ddb32201f1ce9934ad2f6744f8b5b36b7acccb;p=graphviz Remove define and usage of HAVE_BOOL This define was only used twice. Once surrounded by a `#if 0` and once only if HAVE_STDBOOL_H wasn't defined (HAVE_STDBOOL_H is part of the C99 standard library and is always defined). --- diff --git a/config.iffe b/config.iffe index be5be11f9..e735e4470 100644 --- a/config.iffe +++ b/config.iffe @@ -99,16 +99,6 @@ link{ #define HAVE_INTPTR_T 1 }end -compile{ - #ifdef HAVE_STDBOOL_H - #include - #endif - bool xx = true, yy = false; -}end yes{ -/* Define to 1 if compiler supports bool */ -#define HAVE_BOOL 1 -}end - compile{ #include iconv_t xx; diff --git a/configure.ac b/configure.ac index 8cde55a28..53a8bd11a 100644 --- a/configure.ac +++ b/configure.ac @@ -438,21 +438,6 @@ AC_HEADER_STDBOOL # Internationalization macros # AM_GNU_GETTEXT -# ----------------------------------- -# Test if compiler supports bool -AC_MSG_CHECKING([for bool]) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - #ifdef HAVE_STDBOOL_H> - #include - #endif - ]], [[ - bool foo==true, bar=false; - ]])],[ -AC_MSG_RESULT(yes) -AC_DEFINE(HAVE_BOOL, 1,[Define to 1 if compiler supports bool]) - ],[ -AC_MSG_RESULT(no)]) - # ----------------------------------- # Test for direct I/O AC_MSG_CHECKING([for struct dioattr]) diff --git a/contrib/diffimg/diffimg.c b/contrib/diffimg/diffimg.c index 8fb04e4b0..90041dc6d 100644 --- a/contrib/diffimg/diffimg.c +++ b/contrib/diffimg/diffimg.c @@ -59,9 +59,6 @@ #endif #define NOT(v) (!(v)) -#if ! defined HAVE_BOOL && ! defined HAVE_STDBOOL_H && ! defined __cplusplus -typedef unsigned char bool; -#endif #ifndef false #define false 0 #define true NOT(false) diff --git a/lib/common/logic.h b/lib/common/logic.h index 224c276ff..ea939986b 100644 --- a/lib/common/logic.h +++ b/lib/common/logic.h @@ -26,15 +26,6 @@ extern "C" { #define NOT(v) (!(v)) #endif -#if 0 -/* 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) -#endif -#endif - #ifndef FALSE #define FALSE (0) #endif diff --git a/windows/include/config.h b/windows/include/config.h index c69f0b21e..96ba033d8 100644 --- a/windows/include/config.h +++ b/windows/include/config.h @@ -44,9 +44,6 @@ /* Define if you have the ann library */ #define HAVE_ANN 1 -/* Define to 1 if compiler supports bool */ -#define HAVE_BOOL 1 - /* Define to 1 if you have the `cbrt' function. */ //#define HAVE_CBRT 1