*** apr_md5.c.orig	Mon Jun  4 20:38:32 2001
--- apr_md5.c	Sat Jul 14 13:23:22 2001
***************
*** 100,105 ****
--- 100,106 ----
  #endif
  #include "apr_strings.h"
  #include "apr_md5.h"
+ #include "apr_crypt.h"
  #include "apr_lib.h"
  
  #if APR_HAVE_STRING_H
***************
*** 680,688 ****
                                                 const char *hash)
  {
      char sample[120];
- #if !defined(WIN32) && !defined(BEOS)
      char *crypt_pw;
- #endif
      if (!strncmp(hash, apr1_id, strlen(apr1_id))) {
          /*
           * The hash was created using our custom algorithm.
--- 681,687 ----
***************
*** 694,704 ****
           * It's not our algorithm, so feed it to crypt() if possible.
           */
  #if defined(WIN32) || defined(BEOS)
!         apr_cpystrn(sample, passwd, sizeof(sample) - 1);
  #else
          crypt_pw = crypt(passwd, hash);
-         apr_cpystrn(sample, crypt_pw, sizeof(sample) - 1);
  #endif
      }
      return (strcmp(sample, hash) == 0) ? APR_SUCCESS : APR_EMISMATCH;
  }
--- 693,703 ----
           * It's not our algorithm, so feed it to crypt() if possible.
           */
  #if defined(WIN32) || defined(BEOS)
!         crypt_pw = apr_crypt(passwd, hash);
  #else
          crypt_pw = crypt(passwd, hash);
  #endif
+         apr_cpystrn(sample, crypt_pw, sizeof(sample) - 1);
      }
      return (strcmp(sample, hash) == 0) ? APR_SUCCESS : APR_EMISMATCH;
  }
