diff options
author | Jeff Trawick <trawick@apache.org> | 2011-04-07 17:16:20 +0200 |
---|---|---|
committer | Jeff Trawick <trawick@apache.org> | 2011-04-07 17:16:20 +0200 |
commit | f97551a62584a7ce0b1a8e8d43381653aabfc35f (patch) | |
tree | 2d7f35d2acf28ae247b32f8ebcd68ad4e5888c1f /support | |
parent | Remove mentions of the 1.3 generation of the server. (diff) | |
download | apache2-f97551a62584a7ce0b1a8e8d43381653aabfc35f.tar.xz apache2-f97551a62584a7ce0b1a8e8d43381653aabfc35f.zip |
hide some unused code on Win32 and NetWare
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1089910 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'support')
-rw-r--r-- | support/htpasswd.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/support/htpasswd.c b/support/htpasswd.c index 98865c434e..001d904592 100644 --- a/support/htpasswd.c +++ b/support/htpasswd.c @@ -104,6 +104,13 @@ apr_file_t *ftemp = NULL; #define NL APR_EOL_STR +#if defined(WIN32) || defined(NETWARE) +#define CRYPT_ALGO_SUPPORTED 0 +#else +#define CRYPT_ALGO_SUPPORTED 1 +#endif + +#if CRYPT_ALGO_SUPPORTED static void to64(char *s, unsigned long v, int n) { static unsigned char itoa64[] = /* 0 ... 63 => ASCII - 64 */ @@ -114,6 +121,7 @@ static void to64(char *s, unsigned long v, int n) v >>= 6; } } +#endif static void generate_salt(char *s, size_t size) { @@ -209,7 +217,7 @@ static int mkrecord(char *user, char *record, apr_size_t rlen, char *passwd, apr_cpystrn(cpw,pw,sizeof(cpw)); break; -#if (!(defined(WIN32) || defined(NETWARE))) +#if CRYPT_ALGO_SUPPORTED case ALG_CRYPT: default: if (seed_rand()) { @@ -229,7 +237,7 @@ static int mkrecord(char *user, char *record, apr_size_t rlen, char *passwd, free(truncpw); } break; -#endif +#endif /* CRYPT_ALGO_SUPPORTED */ } memset(pw, '\0', strlen(pw)); @@ -476,14 +484,14 @@ int main(int argc, const char * const argv[]) check_args(pool, argc, argv, &alg, &mask, &user, &pwfilename, &password); -#if defined(WIN32) || defined(NETWARE) +#if !CRYPT_ALGO_SUPPORTED if (alg == ALG_CRYPT) { alg = ALG_APMD5; apr_file_printf(errfile, "Automatically using MD5 format." NL); } #endif -#if (!(defined(WIN32) || defined(NETWARE))) +#if CRYPT_ALGO_SUPPORTED if (alg == ALG_PLAIN) { apr_file_printf(errfile,"Warning: storing passwords as plain text " "might just not work on this platform." NL); |