summaryrefslogtreecommitdiff
path: root/ext/standard/crypt.c
diff options
context:
space:
mode:
authorSascha Schumann <sas@php.net>2000-05-05 10:36:00 +0000
committerSascha Schumann <sas@php.net>2000-05-05 10:36:00 +0000
commit8570e0e3ba5c4753abc8bf86db759ad01fdc07a3 (patch)
treeaee6314b1f19f8f0fd7fad58398c62e812af4919 /ext/standard/crypt.c
parent0d194ec80b826110ee682fbff94820c0b8a2bddf (diff)
downloadphp-git-8570e0e3ba5c4753abc8bf86db759ad01fdc07a3.tar.gz
Put in a hack, so that users can compile PHP, even if the configure-time
checks failed to detect the capabilities of crypt().
Diffstat (limited to 'ext/standard/crypt.c')
-rw-r--r--ext/standard/crypt.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/ext/standard/crypt.c b/ext/standard/crypt.c
index 2ac3400b99..5e542049cd 100644
--- a/ext/standard/crypt.c
+++ b/ext/standard/crypt.c
@@ -70,6 +70,17 @@ extern char *crypt(char *__key,char *__salt);
#define PHP_MAX_SALT_LEN 17
#endif
+ /*
+ * If the configure-time checks fail, we provide DES.
+ * XXX: This is a hack. Fix the real problem
+ */
+
+#ifndef PHP_MAX_SALT_LEN
+#define PHP_MAX_SALT_LEN 2
+#undef PHP_STD_DES_CRYPT
+#define PHP_STD_DES_CRYPT 1
+#endif
+
#if HAVE_LRAND48
#define PHP_CRYPT_RAND lrand48()
#else