]> granicus.if.org Git - php/commitdiff
Fixes #50496. Drop stdbool.h dependency as it requires _STDC_C99 set on some systems.
authorDavid Soria Parra <dsp@php.net>
Mon, 11 Jan 2010 16:22:12 +0000 (16:22 +0000)
committerDavid Soria Parra <dsp@php.net>
Mon, 11 Jan 2010 16:22:12 +0000 (16:22 +0000)
ext/standard/crypt_sha256.c
ext/standard/crypt_sha512.c

index 7f93e582d91faed16c799193afb3f787726b69ff..a62aee42c805954786371b3a21eb61b55e0a06d2 100644 (file)
@@ -12,7 +12,6 @@
 
 #ifdef PHP_WIN32
 # include "win32/php_stdint.h"
-# include "win32/php_stdbool.h"
 # define __alignof__ __alignof
 # define alloca _alloca
 #else
@@ -21,7 +20,6 @@
 # elif HAVE_STDINT_H
 #  include <stdint.h>
 # endif
-# include <stdbool.h>
 #endif
 
 #include <stdio.h>
@@ -357,7 +355,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.  */
@@ -373,7 +371,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 67244ef54bc9a7bc26d92e97c08063e71316b130..67c5a54e50f1d7c49804faed4b28e3c5919cc4b0 100644 (file)
@@ -11,7 +11,6 @@
 #include <limits.h>
 #ifdef PHP_WIN32
 # include "win32/php_stdint.h"
-# include "win32/php_stdbool.h"
 # define __alignof__ __alignof
 # define alloca _alloca
 #else
@@ -20,7 +19,6 @@
 # elif HAVE_STDINT_H
 #  include <stdint.h>
 # endif
-# include <stdbool.h>
 #endif
 
 #include <stdio.h>
@@ -384,7 +382,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.  */
@@ -401,7 +399,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;
                }
        }