svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/standard/config.m4 branches/PHP_5_3/ext/standard/crypt.c trunk/ext/standard/config.m4
trunk/ext/standard/crypt.c
| From: | Felipe Pena | Date: | Thu, 22 Apr 2010 20:54:35 +0000 |
| Subject: | svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/standard/config.m4 branches/PHP_5_3/ext/standard/crypt.c trunk/ext/standard/config.m4 trunk/ext/standard/crypt.c |
||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-62354@lists.php.net to get a copy of this message | ||
felipe Thu, 22 Apr 2010 20:54:35 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=298345
Log:
- Fixed bug #51435 (Missing ifdefs / logic bug in crypt code cause compile errors)
Bug: http://bugs.php.net/51435 (Open) Missing ifdefs / logic
bug in crypt code cause compile errors
Changed paths:
U php/php-src/branches/PHP_5_3/NEWS
U php/php-src/branches/PHP_5_3/ext/standard/config.m4
U php/php-src/branches/PHP_5_3/ext/standard/crypt.c
U php/php-src/trunk/ext/standard/config.m4
U php/php-src/trunk/ext/standard/crypt.c
Modified: php/php-src/branches/PHP_5_3/NEWS
===================================================================
--- php/php-src/branches/PHP_5_3/NEWS 2010-04-22 20:23:36 UTC (rev 298344)
+++ php/php-src/branches/PHP_5_3/NEWS 2010-04-22 20:54:35 UTC (rev 298345)
@@ -40,6 +40,8 @@
- Fixed bug #51577 (Uninitialized memory reference with oci_bind_array_by_name)
(Oracle Corp.)
- Fixed bug #51445 (var_dump() invalid/slow *RECURSION* detection). (Felipe)
+- Fixed bug #51435 (Missing ifdefs / logic bug in crypt code cause compile
+ errors). (Felipe)
- Fixed bug #51394 (Error line reported incorrectly if error handler throws an
exception). (Stas)
- Fixed bug #51393 (DateTime::createFromFormat() fails if format string contains
Modified: php/php-src/branches/PHP_5_3/ext/standard/config.m4
===================================================================
--- php/php-src/branches/PHP_5_3/ext/standard/config.m4 2010-04-22 20:23:36 UTC (rev 298344)
+++ php/php-src/branches/PHP_5_3/ext/standard/config.m4 2010-04-22 20:54:35 UTC (rev 298345)
@@ -306,6 +306,15 @@
fi
AC_DEFINE_UNQUOTED(PHP_EXT_DES_CRYPT, $ac_result, [Whether the system supports extended DES
salt])
+ if test "$ac_cv_crypt_md5" = "yes"; then
+ ac_result=1
+ ac_crypt_md5=1
+ else
+ ac_result=0
+ ac_crypt_md5=0
+ fi
+ AC_DEFINE_UNQUOTED(PHP_MD5_CRYPT, $ac_result, [Whether the system supports MD5 salt])
+
if test "$ac_cv_crypt_sha512" = "yes"; then
ac_result=1
ac_crypt_sha512=1
@@ -313,7 +322,7 @@
ac_result=0
ac_crypt_sha512=0
fi
- AC_DEFINE_UNQUOTED(PHP_EXT_SHA512_CRYPT, $ac_result, [Whether the system supports SHA512 salt])
+ AC_DEFINE_UNQUOTED(PHP_SHA512_CRYPT, $ac_result, [Whether the system supports SHA512 salt])
if test "$ac_cv_crypt_sha256" = "yes"; then
ac_result=1
@@ -322,7 +331,7 @@
ac_result=0
ac_crypt_sha256=0
fi
- AC_DEFINE_UNQUOTED(PHP_EXT_SHA256_CRYPT, $ac_result, [Whether the system supports SHA256 salt])
+ AC_DEFINE_UNQUOTED(PHP_SHA256_CRYPT, $ac_result, [Whether the system supports SHA256 salt])
AC_DEFINE_UNQUOTED(PHP_USE_PHP_CRYPT_R, 0, [Whether PHP has to use its own crypt_r for blowfish,
des and ext des])
fi
Modified: php/php-src/branches/PHP_5_3/ext/standard/crypt.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/standard/crypt.c 2010-04-22 20:23:36 UTC (rev 298344)
+++ php/php-src/branches/PHP_5_3/ext/standard/crypt.c 2010-04-22 20:54:35 UTC (rev 298345)
@@ -29,7 +29,7 @@
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
-#ifdef PHP_USE_PHP_CRYPT_R
+#if PHP_USE_PHP_CRYPT_R
# include "php_crypt_r.h"
# include "crypt_freesec.h"
#else
@@ -111,7 +111,7 @@
REGISTER_LONG_CONSTANT("CRYPT_SHA512", PHP_SHA512_CRYPT, CONST_CS | CONST_PERSISTENT);
-#ifdef PHP_USE_PHP_CRYPT_R
+#if PHP_USE_PHP_CRYPT_R
php_init_crypt_r();
#endif
@@ -121,7 +121,7 @@
PHP_MSHUTDOWN_FUNCTION(crypt) /* {{{ */
{
-#ifdef PHP_USE_PHP_CRYPT_R
+#if PHP_USE_PHP_CRYPT_R
php_shutdown_crypt_r();
#endif
Modified: php/php-src/trunk/ext/standard/config.m4
===================================================================
--- php/php-src/trunk/ext/standard/config.m4 2010-04-22 20:23:36 UTC (rev 298344)
+++ php/php-src/trunk/ext/standard/config.m4 2010-04-22 20:54:35 UTC (rev 298345)
@@ -306,6 +306,15 @@
fi
AC_DEFINE_UNQUOTED(PHP_EXT_DES_CRYPT, $ac_result, [Whether the system supports extended DES
salt])
+ if test "$ac_cv_crypt_md5" = "yes"; then
+ ac_result=1
+ ac_crypt_md5=1
+ else
+ ac_result=0
+ ac_crypt_md5=0
+ fi
+ AC_DEFINE_UNQUOTED(PHP_MD5_CRYPT, $ac_result, [Whether the system supports MD5 salt])
+
if test "$ac_cv_crypt_sha512" = "yes"; then
ac_result=1
ac_crypt_sha512=1
@@ -313,7 +322,7 @@
ac_result=0
ac_crypt_sha512=0
fi
- AC_DEFINE_UNQUOTED(PHP_EXT_SHA512_CRYPT, $ac_result, [Whether the system supports SHA512 salt])
+ AC_DEFINE_UNQUOTED(PHP_SHA512_CRYPT, $ac_result, [Whether the system supports SHA512 salt])
if test "$ac_cv_crypt_sha256" = "yes"; then
ac_result=1
@@ -322,7 +331,7 @@
ac_result=0
ac_crypt_sha256=0
fi
- AC_DEFINE_UNQUOTED(PHP_EXT_SHA256_CRYPT, $ac_result, [Whether the system supports SHA256 salt])
+ AC_DEFINE_UNQUOTED(PHP_SHA256_CRYPT, $ac_result, [Whether the system supports SHA256 salt])
AC_DEFINE_UNQUOTED(PHP_USE_PHP_CRYPT_R, 0, [Whether PHP has to use its own crypt_r for blowfish,
des and ext des])
fi
Modified: php/php-src/trunk/ext/standard/crypt.c
===================================================================
--- php/php-src/trunk/ext/standard/crypt.c 2010-04-22 20:23:36 UTC (rev 298344)
+++ php/php-src/trunk/ext/standard/crypt.c 2010-04-22 20:54:35 UTC (rev 298345)
@@ -29,7 +29,7 @@
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
-#ifdef PHP_USE_PHP_CRYPT_R
+#if PHP_USE_PHP_CRYPT_R
# include "php_crypt_r.h"
# include "crypt_freesec.h"
#else
@@ -116,7 +116,7 @@
REGISTER_LONG_CONSTANT("CRYPT_SHA512", PHP_SHA512_CRYPT, CONST_CS | CONST_PERSISTENT);
#endif
-#ifdef PHP_USE_PHP_CRYPT_R
+#if PHP_USE_PHP_CRYPT_R
php_init_crypt_r();
#endif
@@ -126,7 +126,7 @@
PHP_MSHUTDOWN_FUNCTION(crypt) /* {{{ */
{
-#ifdef PHP_USE_PHP_CRYPT_R
+#if PHP_USE_PHP_CRYPT_R
php_shutdown_crypt_r();
#endif