]> granicus.if.org Git - php/commitdiff
add check for stdbool.h
authorThies C. Arntzen <thies@php.net>
Tue, 6 Jun 2000 14:13:35 +0000 (14:13 +0000)
committerThies C. Arntzen <thies@php.net>
Tue, 6 Jun 2000 14:13:35 +0000 (14:13 +0000)
ext/recode/config.m4
ext/recode/php_recode.h
ext/recode/recode.c

index 80ba17f86880a4ff7ecce396b0fdb4623df14c68..83b0b5b1932d595ae2f11ac5ab2d32d29b9caf54 100644 (file)
@@ -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
index 6f506de696fcef807b076bca1f82dbe6fac2f950..e20494087bd31bf65fde329d6105820baee73185 100644 (file)
  */
 #define HAVE_BROKEN_RECODE
 
-#include <stdbool.h>
+#ifdef HAVE_STDBOOL_H
+# include <stdbool.h>
+#else
+  typedef enum {false = 0, true = 1} bool;
+#endif
+
 #include <sys/types.h>
 #include <stdio.h>
 #include <recode.h>
index 5b63d37a51b2df35d14dcde88fd24e4af241fdee..e1ed131ec4cce32474490740021910845ff527aa 100644 (file)
@@ -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