]> granicus.if.org Git - php/commitdiff
merge r293409: Fixes #50496. Drop stdbool.h dependency as it requires _STDC_C99
authorJohannes Schlüter <johannes@php.net>
Thu, 11 Feb 2010 17:53:22 +0000 (17:53 +0000)
committerJohannes Schlüter <johannes@php.net>
Thu, 11 Feb 2010 17:53:22 +0000 (17:53 +0000)
set on some systems. (dsp)

ext/standard/crypt_sha256.c
ext/standard/crypt_sha512.c

index b2f64f273792b430a77fc10ff06195db7c7c60b2..3e234cee9164c0b9757288161b101764f6abd577 100644 (file)
@@ -10,7 +10,6 @@
 
 #ifdef PHP_WIN32
 # include "win32/php_stdint.h"
-# include "win32/php_stdbool.h"
 # define __alignof__ __alignof
 # define alloca _alloca
 #else
@@ -368,7 +367,7 @@ char * php_sha256_crypt_r(const char *key, const char *salt, char *buffer, int b
        char *s_bytes;
        /* Default number of rounds.  */
        size_t rounds = ROUNDS_DEFAULT;
-       bool rounds_custom = false;
+       zend_bool rounds_custom = 0;
 
        /* Find beginning of salt string.  The prefix should normally always
        be present.  Just in case it is not.  */
@@ -384,7 +383,7 @@ char * php_sha256_crypt_r(const char *key, const char *salt, char *buffer, int b
                if (*endp == '$') {
                        salt = endp + 1;
                        rounds = MAX(ROUNDS_MIN, MIN(srounds, ROUNDS_MAX));
-                       rounds_custom = true;
+                       rounds_custom = 1;
                }
        }
 
index 267cd6e59495a7011e1242e5aa790b96aed76582..ba9a6391800d8cc1a194bb1a5087c4ebaba76db3 100644 (file)
@@ -9,7 +9,6 @@
 #include <limits.h>
 #ifdef PHP_WIN32
 # include "win32/php_stdint.h"
-# include "win32/php_stdbool.h"
 # define __alignof__ __alignof
 # define alloca _alloca
 #else
@@ -395,7 +394,7 @@ php_sha512_crypt_r(const char *key, const char *salt, char *buffer, int buflen)
        char *s_bytes;
        /* Default number of rounds.  */
        size_t rounds = ROUNDS_DEFAULT;
-       bool rounds_custom = false;
+       zend_bool rounds_custom = 0;
 
        /* Find beginning of salt string.  The prefix should normally always
         be present.  Just in case it is not.  */
@@ -412,7 +411,7 @@ php_sha512_crypt_r(const char *key, const char *salt, char *buffer, int buflen)
                if (*endp == '$') {
                        salt = endp + 1;
                        rounds = MAX(ROUNDS_MIN, MIN(srounds, ROUNDS_MAX));
-                       rounds_custom = true;
+                       rounds_custom = 1;
                }
        }