From: Willem Toorop Date: Wed, 19 Nov 2014 19:25:21 +0000 (+0100) Subject: bugfix #623: Do not redefine bool type and values X-Git-Tag: release-1.7.0-rc1~122 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=581f25039fc626d7bd458a3090b97303fa01f5b7;p=thirdparty%2Fldns.git bugfix #623: Do not redefine bool type and values Thanks Jakob Petsovits --- diff --git a/Changelog b/Changelog index 4e350ba2..2abee86a 100644 --- a/Changelog +++ b/Changelog @@ -36,6 +36,8 @@ TBD Thanks Peter Koch * bugfix #697: Double free with ldns-dane create Thanks Carsten Strotmann + * bugfix #623: Do not redefine bool type and boolean values + Thanks Jakob Petsovits 1.6.17 2014-01-10 * Fix ldns_dnssec_zone_new_frm_fp_l to allow the last parsed line of a diff --git a/ldns/common.h.in b/ldns/common.h.in index 8bf9654b..805eb8bf 100644 --- a/ldns/common.h.in +++ b/ldns/common.h.in @@ -37,20 +37,22 @@ */ /*@ignore@*/ /* splint barfs on this construct */ -#ifdef HAVE_STDBOOL_H -# include -#else -# ifndef HAVE__BOOL -# ifdef __cplusplus +#ifndef __bool_true_false_are_defined +# ifdef HAVE_STDBOOL_H +# include +# else +# ifndef HAVE__BOOL +# ifdef __cplusplus typedef bool _Bool; -# else -# define _Bool signed char +# else +# define _Bool signed char +# endif # endif +# define bool _Bool +# define false 0 +# define true 1 +# define __bool_true_false_are_defined 1 # endif -# define bool _Bool -# define false 0 -# define true 1 -# define __bool_true_false_are_defined 1 #endif /*@end@*/