From: Thies C. Arntzen Date: Tue, 6 Jun 2000 14:13:35 +0000 (+0000) Subject: add check for stdbool.h X-Git-Tag: PRE_EIGHT_BYTE_ALLOC_PATCH~73 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=11fabacc3c998456e334be142d558a0f0274bc65;p=php add check for stdbool.h --- diff --git a/ext/recode/config.m4 b/ext/recode/config.m4 index 80ba17f868..83b0b5b193 100644 --- a/ext/recode/config.m4 +++ b/ext/recode/config.m4 @@ -58,5 +58,8 @@ recode_format_table(); fi AC_DEFINE(HAVE_LIBRECODE, 1, [Whether we have librecode 3.5 or higher]) + + AC_CHECK_HEADERS(stdbool.h) + PHP_EXTENSION(recode,$ext_shared) fi diff --git a/ext/recode/php_recode.h b/ext/recode/php_recode.h index 6f506de696..e20494087b 100644 --- a/ext/recode/php_recode.h +++ b/ext/recode/php_recode.h @@ -45,7 +45,12 @@ */ #define HAVE_BROKEN_RECODE -#include +#ifdef HAVE_STDBOOL_H +# include +#else + typedef enum {false = 0, true = 1} bool; +#endif + #include #include #include diff --git a/ext/recode/recode.c b/ext/recode/recode.c index 5b63d37a51..e1ed131ec4 100644 --- a/ext/recode/recode.c +++ b/ext/recode/recode.c @@ -29,6 +29,7 @@ #include "ext/standard/php_string.h" #include "zend_list.h" + #ifdef HAVE_BROKEN_RECODE extern char *program_name; char *program_name = "php"; @@ -110,7 +111,7 @@ PHP_FUNCTION(recode_string) char *r = NULL; pval **str; pval **req; - int success; + bool success; ReSLS_FETCH(); if (ZEND_NUM_ARGS() != 2