summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikita Popov <nikic@php.net>2016-03-25 21:06:10 +0100
committerNikita Popov <nikic@php.net>2016-03-25 21:09:47 +0100
commitd3ed75b9ebc998b8cf325e0e3ab954bd10989918 (patch)
tree92ddae9a4a87f7f410f954c393a56ee22c256238
parentbe7a50b9ab4f17b224f82e32dddd249b17f6ba36 (diff)
downloadphp-git-d3ed75b9ebc998b8cf325e0e3ab954bd10989918.tar.gz
Remove HAVE_CRYPT checks
We always provide a crypt implementation. HAVE_CRYPT is only relevant as to whether the crypt() C function exists.
-rw-r--r--ext/opcache/Optimizer/zend_func_info.c2
-rw-r--r--ext/standard/basic_functions.c10
-rw-r--r--ext/standard/crypt.c2
-rw-r--r--ext/standard/password.c2
-rw-r--r--ext/standard/php_crypt.h2
-rw-r--r--win32/build/config.w32.h.in3
6 files changed, 0 insertions, 21 deletions
diff --git a/ext/opcache/Optimizer/zend_func_info.c b/ext/opcache/Optimizer/zend_func_info.c
index d1b6e760d0..2aa3ecb928 100644
--- a/ext/opcache/Optimizer/zend_func_info.c
+++ b/ext/opcache/Optimizer/zend_func_info.c
@@ -699,9 +699,7 @@ static const func_info_t func_infos[] = {
F1("pack", MAY_BE_FALSE | MAY_BE_STRING),
F1("unpack", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY),
F1("get_browser", MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_OBJECT | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_ANY),
-#if HAVE_CRYPT
F1("crypt", MAY_BE_NULL | MAY_BE_STRING),
-#endif
F1("opendir", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_RESOURCE),
F1("closedir", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_TRUE),
F1("chdir", MAY_BE_FALSE | MAY_BE_TRUE),
diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c
index 10d7622ee1..6323d18b5f 100644
--- a/ext/standard/basic_functions.c
+++ b/ext/standard/basic_functions.c
@@ -872,12 +872,10 @@ ZEND_END_ARG_INFO()
/* }}} */
/* {{{ crypt.c */
-#if HAVE_CRYPT
ZEND_BEGIN_ARG_INFO_EX(arginfo_crypt, 0, 0, 1)
ZEND_ARG_INFO(0, str)
ZEND_ARG_INFO(0, salt)
ZEND_END_ARG_INFO()
-#endif
/* }}} */
/* {{{ cyr_convert.c */
ZEND_BEGIN_ARG_INFO(arginfo_convert_cyr_string, 0)
@@ -3170,10 +3168,8 @@ const zend_function_entry basic_functions[] = { /* {{{ */
/* functions from browscap.c */
PHP_FE(get_browser, arginfo_get_browser)
-#if HAVE_CRYPT
/* functions from crypt.c */
PHP_FE(crypt, arginfo_crypt)
-#endif
/* functions from dir.c */
PHP_FE(opendir, arginfo_opendir)
@@ -3643,10 +3639,7 @@ PHP_MINIT_FUNCTION(basic) /* {{{ */
BASIC_MINIT_SUBMODULE(nl_langinfo)
#endif
-#if HAVE_CRYPT
BASIC_MINIT_SUBMODULE(crypt)
-#endif
-
BASIC_MINIT_SUBMODULE(lcg)
BASIC_MINIT_SUBMODULE(dir)
@@ -3715,10 +3708,7 @@ PHP_MSHUTDOWN_FUNCTION(basic) /* {{{ */
#if defined(HAVE_LOCALECONV) && defined(ZTS)
BASIC_MSHUTDOWN_SUBMODULE(localeconv)
#endif
-#if HAVE_CRYPT
BASIC_MSHUTDOWN_SUBMODULE(crypt)
-#endif
-
BASIC_MSHUTDOWN_SUBMODULE(random)
zend_hash_destroy(&basic_submodules);
diff --git a/ext/standard/crypt.c b/ext/standard/crypt.c
index a5cb7faf9b..9249d9d96b 100644
--- a/ext/standard/crypt.c
+++ b/ext/standard/crypt.c
@@ -24,7 +24,6 @@
#include <stdlib.h>
#include "php.h"
-#if HAVE_CRYPT
#if HAVE_UNISTD_H
#include <unistd.h>
@@ -287,7 +286,6 @@ PHP_FUNCTION(crypt)
RETURN_STR(result);
}
/* }}} */
-#endif
/*
* Local variables:
diff --git a/ext/standard/password.c b/ext/standard/password.c
index a46f4889e5..2a5cec3e93 100644
--- a/ext/standard/password.c
+++ b/ext/standard/password.c
@@ -21,7 +21,6 @@
#include <stdlib.h>
#include "php.h"
-#if HAVE_CRYPT
#include "fcntl.h"
#include "php_password.h"
@@ -384,7 +383,6 @@ PHP_FUNCTION(password_hash)
}
/* }}} */
-#endif /* HAVE_CRYPT */
/*
* Local variables:
* tab-width: 4
diff --git a/ext/standard/php_crypt.h b/ext/standard/php_crypt.h
index bf7a13333f..cff71d867b 100644
--- a/ext/standard/php_crypt.h
+++ b/ext/standard/php_crypt.h
@@ -25,11 +25,9 @@
PHPAPI zend_string *php_crypt(const char *password, const int pass_len, const char *salt, int salt_len, zend_bool quiet);
PHP_FUNCTION(crypt);
-#if HAVE_CRYPT
PHP_MINIT_FUNCTION(crypt);
PHP_MSHUTDOWN_FUNCTION(crypt);
PHP_RINIT_FUNCTION(crypt);
-#endif
#endif
diff --git a/win32/build/config.w32.h.in b/win32/build/config.w32.h.in
index d92f9227af..2a8297a144 100644
--- a/win32/build/config.w32.h.in
+++ b/win32/build/config.w32.h.in
@@ -22,9 +22,6 @@
#define PHP_PREFIX "@PREFIX@"
#define PHP_SYSCONFDIR "@PREFIX@"
-/* Enable / Disable crypt() function (default: enabled) */
-#define HAVE_CRYPT 1
-
/* PHP Runtime Configuration */
#define PHP_URL_FOPEN 1
#define USE_CONFIG_FILE 1