David Jones wrote:
> ok here's the simple patch at the 2.0.x level that just checks platforms
> for htdbm.c
>
> Also appended is the semi-related patch for htpasswd.c that adds TPF to
> the platforms checked in 2 cases where its missed, which seems like an
> oversight.
+1
> ===================================================================
> --- htdbm.c (revision 521875)
> +++ htdbm.c (working copy)
> @@ -66,7 +66,7 @@
> #define ALG_APMD5 1
> #define ALG_APSHA 2
>
> -#if APR_HAVE_CRYPT_H
> +#if (!(defined(WIN32) || defined(TPF) || defined(NETWARE)))
> #define ALG_CRYPT 3
> #endif
>
> @@ -309,7 +309,7 @@
> /* XXX this len limitation is not in sync with any HTTPd
> len. */
> apr_cpystrn(cpw,htdbm->userpass,sizeof(cpw));
> break;
> -#if APR_HAVE_CRYPT_H
> +#if (!(defined(WIN32) || defined(TPF) || defined(NETWARE)))
> case ALG_CRYPT:
> (void) srand((int) time((time_t *) NULL));
> to64(&salt[0], rand(), 8);
> @@ -340,7 +340,7 @@
> static void htdbm_usage(void)
> {
>
> -#if APR_HAVE_CRYPT_H
> +#if (!(defined(WIN32) || defined(TPF) || defined(NETWARE)))
> #define CRYPT_OPTION "d"
> #else
> #define CRYPT_OPTION ""
> @@ -360,7 +360,7 @@
> fprintf(stderr, " -c Create a new database.\n");
> fprintf(stderr, " -n Don't update database; display results on
> stdout.\n");
> fprintf(stderr, " -m Force MD5 encryption of the password
> (default).\n");
> -#if APR_HAVE_CRYPT_H
> +#if (!(defined(WIN32) || defined(TPF) || defined(NETWARE)))
> fprintf(stderr, " -d Force CRYPT encryption of the password
> (now deprecated).\n");
> #endif
> fprintf(stderr, " -p Do not encrypt the password (plaintext).\n");
> @@ -467,7 +467,7 @@
> case 's':
> h->alg = ALG_APSHA;
> break;
> -#if APR_HAVE_CRYPT_H
> +#if (!(defined(WIN32) || defined(TPF) || defined(NETWARE)))
> case 'd':
> h->alg = ALG_CRYPT;
> break;